-
-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update _can_assign_attr to return False for builtins.object (#946)
* Add tests of expected behaviour for delayed attr assign Ref #945 * Update _can_assign_attr to return False for builtins.object Ref #945, pylint#4232, pylint#3970, pylint#3595. Various interactions had been previously noticed with the typing/collections modules and methods named prev/next on objects. This was due to inference setting these values as instance attributes on the builtin object class due to a sentinel object and an incorrectly inferred return value in the OrderedDict definition. This change updates _can_assign_attr (and the resulting delayed_assattr behaviour) to ignore attempts to assign to object() since these would fail. * Fix test definition for MRO inference * Update changelog
- Loading branch information
Showing
4 changed files
with
61 additions
and
3 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