-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
no-member false positive from NewType #3162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for reporting the issue. We currently do not support |
Looks like a duplicate of #2296. Are there any plans of fixing this soon? This is a real show-stopper for pylint in projects which take typing a bit more seriously. |
@svenpanne Feel free to start working on this yourself. This project currently has ~500 opened issues and overburdened maintainers so your "pet" issue might not be fixed "soon". After all, the code is open source, feel free to fork the project and do whatever you want with it. |
Well, my proposal is simply to revert the commit mentioned in #2296, as it obviously does more harm than good... |
NewTypes are assumed not to inherit any members from their base classes. This results in incorrect inference results. Avoid this by changing the transformation for NewTypes to treat them like any other subclass. pylint-dev/pylint#3162 pylint-dev/pylint#2296
NewTypes are assumed not to inherit any members from their base classes. This results in incorrect inference results. Avoid this by changing the transformation for NewTypes to treat them like any other subclass. pylint-dev/pylint#3162 pylint-dev/pylint#2296
NewTypes are assumed not to inherit any members from their base classes. This results in incorrect inference results. Avoid this by changing the transformation for NewTypes to treat them like any other subclass. pylint-dev/pylint#3162 pylint-dev/pylint#2296
NewTypes are assumed not to inherit any members from their base classes. This results in incorrect inference results. Avoid this by changing the transformation for NewTypes to treat them like any other subclass. pylint-dev/pylint#3162 pylint-dev/pylint#2296
NewTypes are assumed not to inherit any members from their base classes. This results in incorrect inference results. Avoid this by changing the transformation for NewTypes to treat them like any other subclass. pylint-dev/pylint#3162 pylint-dev/pylint#2296
NewTypes are assumed not to inherit any members from their base classes. This results in incorrect inference results. Avoid this by changing the transformation for NewTypes to treat them like any other subclass. pylint-dev/pylint#3162 pylint-dev/pylint#2296
NewTypes are assumed not to inherit any members from their base classes. This results in incorrect inference results. Avoid this by changing the transformation for NewTypes to treat them like any other subclass. pylint-dev/pylint#3162 pylint-dev/pylint#2296
NewTypes are assumed not to inherit any members from their base classes. This results in incorrect inference results. Avoid this by changing the transformation for NewTypes to treat them like any other subclass. pylint-dev/pylint#3162 pylint-dev/pylint#2296
NewTypes are assumed not to inherit any members from their base classes. This results in incorrect inference results. Avoid this by changing the transformation for NewTypes to treat them like any other subclass. pylint-dev/pylint#3162 pylint-dev/pylint#2296
This is a weird interaction between the typing library and pylint, so I'm not sure if this is the right place to file the bug, but here goes.
Steps to reproduce
Current behavior
Pylint flags a no-member error when accessing members of objects with a NewType class.
Expected behavior
Pylint flags no errors.
pylint --version output
pylint 2.4.2
astroid 2.3.1
Python 3.7.4 (default, Sep 20 2019, 11:46:08)
[GCC 8.3.0]
The text was updated successfully, but these errors were encountered: