Skip to content

Commit 9bd0610

Browse files
committed
detect attr
1 parent 1efc1e8 commit 9bd0610

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pylint/checkers/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,8 @@ def class_is_abstract(node: nodes.ClassDef) -> bool:
11741174

11751175
# As well as directly inherited ABC class
11761176
for base in node.bases:
1177-
if base.as_string() in ("abc.ABC", "ABC"):
1177+
base_class_name = base.attrname if isinstance(base, astroid.Attribute) else base.as_string()
1178+
if base_class_name == "ABC":
11781179
# abc.ABC inheritance
11791180
return True
11801181

0 commit comments

Comments
 (0)