Skip to content

Commit 474c0fc

Browse files
Fix in util
1 parent 05de254 commit 474c0fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pylint/checkers/utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,8 @@ def decorated_with(
873873
decorator_node = decorator_node.func
874874
try:
875875
if any(
876-
i.name in qnames or i.qname() in qnames
876+
hasattr(i, "name")
877+
and (i.name in qnames or (hasattr(i, "qname") and i.qname() in qnames))
877878
for i in decorator_node.infer()
878879
if i is not None and not isinstance(i, util.UninferableBase)
879880
):

0 commit comments

Comments
 (0)