From 956413fd7292e25069c3ae5021127aedce1976a7 Mon Sep 17 00:00:00 2001 From: Nick Drozd Date: Tue, 5 Sep 2023 11:53:16 -0400 Subject: [PATCH] Use better variable names --- pylint/pyreverse/diagrams.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pylint/pyreverse/diagrams.py b/pylint/pyreverse/diagrams.py index 80e30cb7d7..184ee3c159 100644 --- a/pylint/pyreverse/diagrams.py +++ b/pylint/pyreverse/diagrams.py @@ -122,15 +122,15 @@ def get_attrs(self, node: nodes.ClassDef) -> list[str]: """Return visible attributes, possibly with class name.""" attrs = [] properties = { - n: m - for n, m in node.items() - if isinstance(m, nodes.FunctionDef) and decorated_with_property(m) + name: attr + for name, attr in node.items() + if isinstance(attr, nodes.FunctionDef) and decorated_with_property(attr) } - for n, m in list(node.locals_type.items()) + list( + for name, attr in list(node.locals_type.items()) + list( node.instance_attrs_type.items() ): - if n not in properties: - properties[n] = m + if name not in properties: + properties[name] = attr for node_name, associated_nodes in properties.items(): if not self.show_attr(node_name):