From 5cf4fbc91923b21b1c415cebd58972d868a48576 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 23 Nov 2021 09:43:25 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pylint/checkers/classes.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py index 3a356c26733..bd6d69251bc 100644 --- a/pylint/checkers/classes.py +++ b/pylint/checkers/classes.py @@ -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