Skip to content

Commit

Permalink
Still better variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdrozd committed Sep 5, 2023
1 parent 956413f commit 306e454
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pylint/pyreverse/diagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,16 @@ def get_attrs(self, node: nodes.ClassDef) -> list[str]:
"""Return visible attributes, possibly with class name."""
attrs = []
properties = {
name: attr
for name, attr in node.items()
if isinstance(attr, nodes.FunctionDef) and decorated_with_property(attr)
local_name: local_node
for local_name, local_node in node.items()
if isinstance(local_node, nodes.FunctionDef)
and decorated_with_property(local_node)
}
for name, attr in list(node.locals_type.items()) + list(
for attr_name, attr_type in list(node.locals_type.items()) + list(
node.instance_attrs_type.items()
):
if name not in properties:
properties[name] = attr
if attr_name not in properties:
properties[attr_name] = attr_type

for node_name, associated_nodes in properties.items():
if not self.show_attr(node_name):
Expand Down

0 comments on commit 306e454

Please sign in to comment.