Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 23, 2021
1 parent b1af0c0 commit 5cf4fbc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pylint/checkers/classes.py
Expand Up @@ -996,10 +996,14 @@ def _check_unused_private_attributes(self, node: nodes.ClassDef) -> None:
if attribute.attrname != assign_attr.attrname:
continue

if assign_attr.expr.name in {
"cls",
node.name,
} and attribute.expr.name in {"cls", "self", node.name}:
if (
assign_attr.expr.name
in {
"cls",
node.name,
}
and attribute.expr.name in {"cls", "self", node.name}
):
# If assigned to cls or class name, can be accessed by cls/self/class name
break

Expand Down

0 comments on commit 5cf4fbc

Please sign in to comment.