-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
False positive E1102 when adding a non-callable attribute to object #4221
Comments
nelfin
added a commit
to nelfin/pylint
that referenced
this issue
Apr 13, 2021
4 tasks
nelfin
added a commit
to nelfin/pylint
that referenced
this issue
Apr 13, 2021
cdce8p
pushed a commit
that referenced
this issue
May 30, 2021
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Current behavior
Expected behavior
No errors.
pylint --version output
Pylint probably reasons like this:
str
is a subclass ofobject
;object
's attribute is assigned to non-callable; thus,str
's attribute by the same name should be non-callable. I can see the logic here, but the error is reported on the very first line, before the attribute has the chance to get re-assigned.By itself, the above example code is not very meaningful. I'm reporting it because this seems to be the underlying cause of #3970 (comment). Also, it might manifest itself in other, more practical scenarios than the example above.
The text was updated successfully, but these errors were encountered: