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
Thanks a lot for working on pylint, astroid, and the related projects!
It seems that pylint does not "listen to" isinstance() checks and type annotations when a program attempts to make sure that a variable that is guaranteed to be an instance of a base class is actually an instance of a specific class derived from the base one. See the attached file; pylint 2.14.5 / astroid 2.11.7 issue "no-member" messages for both the print(expr.name) and print(expr.op_name) lines.
Thanks in advance for your time, and keep up the great work!
Configuration
No response
Command used
pylint pyclass.py
Pylint output
************* Module pyclass
pyclass.py:86:10: E1101: Instance of 'Expr' has no 'name' member (no-member)
pyclass.py:97:10: E1101: Instance of 'Expr' has no 'op_name' member (no-member)
------------------------------------------------------------------
Your code has been rated at 7.83/10 (previous run: 7.73/10, +0.1
Debian testing on a x86_64 host, Python from the python3 package (3.10.5-3), pylint installed via tox with a deps: pylint >= 2.14 testenv configuration.
Additional dependencies
No response
The text was updated successfully, but these errors were encountered:
Bug description
pyclass.txt
Hi,
Thanks a lot for working on pylint, astroid, and the related projects!
It seems that pylint does not "listen to" isinstance() checks and type annotations when a program attempts to make sure that a variable that is guaranteed to be an instance of a base class is actually an instance of a specific class derived from the base one. See the attached file; pylint 2.14.5 / astroid 2.11.7 issue "no-member" messages for both the
print(expr.name)
andprint(expr.op_name)
lines.Thanks in advance for your time, and keep up the great work!
Configuration
No response
Command used
Pylint output
Expected behavior
No diagnostic messages at all.
Pylint version
OS / Environment
Debian testing on a x86_64 host, Python from the python3 package (3.10.5-3), pylint installed via tox with a
deps: pylint >= 2.14
testenv configuration.Additional dependencies
No response
The text was updated successfully, but these errors were encountered: