diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-06-30 23:03:47 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-06-30 23:13:20 +0200 |
commit | 634cba69712afd172ba7fb5b375b0e41ad047425 (patch) | |
tree | 350d95bfb7c56ad62483e02de318a0a20fd83f1e | |
parent | aa6d91f45407544e49287ca5b43d6c86d317f5a7 (diff) | |
download | pylint-git-634cba69712afd172ba7fb5b375b0e41ad047425.tar.gz |
[unused-private-member] Remove a check that is done later anyway
See https://github.com/PyCQA/pylint/pull/4642\#discussion_r661805293
-rw-r--r-- | pylint/checkers/classes.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py index a85e216c5..4c9228d2d 100644 --- a/pylint/checkers/classes.py +++ b/pylint/checkers/classes.py @@ -909,14 +909,10 @@ a metaclass class method.", continue for attribute in node.nodes_of_class(astroid.Attribute): attribute = cast(astroid.Attribute, attribute) - if attribute.expr is None: - # attribute.expr is an Optional[NodeNG] it can be None - continue if ( attribute.attrname != function_def.name - or attribute.scope() == function_def + or attribute.scope() == function_def # We ignore recursive calls ): - # We ignore recursive calls continue if isinstance(attribute.expr, astroid.Name) and attribute.expr.name in ( "self", |