Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Release date: TBA
attribute to itself without any prior assignment.

Closes #1555
Closes #6221

* The concept of checker priority has been removed.

Expand Down
1 change: 1 addition & 0 deletions doc/whatsnew/2.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ Other Changes
attribute to itself without any prior assignment.

Closes #1555
Closes #6221
5 changes: 5 additions & 0 deletions pylint/checkers/typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,11 @@ def visit_attribute(self, node: nodes.Attribute) -> None:
missingattr.add((owner, name))
continue
else:
if isinstance(attr_nodes, nodes.NodeNG):
# If owner was a living object, attr_nodes might be a node itself
# Faster than retrieving the module object and testing _is_c_extension()
# https://github.com/PyCQA/pylint/pull/6235#issuecomment-1093098869
break # pragma: no cover
for attr_node in attr_nodes:
attr_parent = attr_node.parent
# Skip augmented assignments
Expand Down