-
-
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 'unsubscriptable-object' reported for Enum.__members__
attribute
#4358
Labels
Bug 🪲
False Positive 🦟
A message is emitted but nothing is wrong with the code
Needs astroid Brain 🧠
Needs a brain tip in astroid (then an astroid upgrade)
Comments
benburk
changed the title
Incorrect 'unsubscriptable-object' reported for
False positive 'unsubscriptable-object' reported for May 8, 2021
Enum.__members__
attributeEnum.__members__
attribute
Merged
2 tasks
@benburk thanks for the report. It seems that @nelfin is working on a fix through pylint-dev/astroid#941. |
hippo91
added
Needs astroid Brain 🧠
Needs a brain tip in astroid (then an astroid upgrade)
Bug 🪲
False Positive 🦟
A message is emitted but nothing is wrong with the code
labels
May 13, 2021
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
May 13, 2021
Ref pylint-dev/pylint#2626. Ref pylint-dev/pylint#3535. Ref pylint-dev/pylint#4358. This updates the namedtuple/enum brain to add a dictionary for __members__
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
May 13, 2021
Ref pylint-dev/pylint#2626. Ref pylint-dev/pylint#3535. Ref pylint-dev/pylint#4358. This updates the namedtuple/enum brain to add a dictionary for __members__
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
May 14, 2021
Ref pylint-dev/pylint#3535. Ref pylint-dev/pylint#4358. This updates the namedtuple/enum brain to add a dictionary for __members__
4 tasks
cdce8p
pushed a commit
to pylint-dev/astroid
that referenced
this issue
May 15, 2021
#941) * Add tests of failing property inference Ref #940 * Fix inference of properties in a class context Ref #940. If we are accessing an attribute and it is found on type(A).__dict__ *and* it is a data descriptor, then we resolve that descriptor. For the case of inferring a property which is accessed as a class attribute, this equates to the property being defined on the metaclass (which may be anywhere in the class hierarchy). * Fix inference of Enum.__members__ property for subclasses Ref pylint-dev/pylint#3535. Ref pylint-dev/pylint#4358. This updates the namedtuple/enum brain to add a dictionary for __members__
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug 🪲
False Positive 🦟
A message is emitted but nothing is wrong with the code
Needs astroid Brain 🧠
Needs a brain tip in astroid (then an astroid upgrade)
Steps to reproduce
Current behavior
Final line alerts "Value '
Foo.__members__
' is unsubscriptable"Expected behavior
No error
pylint --version output
Result of
pylint --version
output:The text was updated successfully, but these errors were encountered: