You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
According to Python documentation of module collections[1], methods in _collections_abc will be moved from collections to collections.abc. And now Pylint hasn't checked it.
Describe the solution you'd like
I suggest to add methods in _collections_abc.__all__ to DEPRECATED_METHODS[3] of Pylint.
Additional context
Test code is
from collections import Iterable
print(isinstance(None, Iterable))
I guess adding them to DEPRECATED_METHODS will not be sufficient as a "method" is only detected when called as a function. So that code like isinstance(obj, collections.Iterable) will not be detected. Probably we will need a new type of message like deprecated-class or deprecated-member.
I guess adding them to DEPRECATED_METHODS will not be sufficient as a "method" is only detected when called as a function. So that code like isinstance(obj, collections.Iterable) will not be detected. Probably we will need a new type of message like deprecated-class or deprecated-member.
Is your feature request related to a problem? Please describe
According to Python documentation of module
collections
[1], methods in_collections_abc
will be moved fromcollections
tocollections.abc
. And now Pylint hasn't checked it.Describe the solution you'd like
I suggest to add methods in
_collections_abc.__all__
toDEPRECATED_METHODS
[3] of Pylint.Additional context
Test code is
pylint 2.7.4
astroid 2.5.3
Python 3.7.2
[1]https://docs.python.org/3/library/collections.html
[2]https://github.com/python/cpython/blob/3.9/Lib/_collections_abc.py#L18
[3]https://github.com/PyCQA/pylint/blob/af52033971eccecea47597ebbfaeac15773b3e1b/pylint/checkers/stdlib.py#L85
The text was updated successfully, but these errors were encountered: