forked from pylint-dev/astroid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inferring property fields in a class context when metaclass is present (
pylint-dev#941) * Add tests of failing property inference Ref pylint-dev#940 * Fix inference of properties in a class context Ref pylint-dev#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__
- Loading branch information
Showing
4 changed files
with
173 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters