Skip to content

Commit 28128d9

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f58a7b6 commit 28128d9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pylint/checkers/variables.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,12 +3109,14 @@ def _check_unpacking(
31093109

31103110
# Skip check for function calls with empty inference from external modules.
31113111
# This avoids false positives when static analysis fails on library functions.
3112-
if (isinstance(node.value, nodes.Call) and
3113-
isinstance(inferred, (nodes.List, nodes.Tuple)) and
3114-
len(inferred.elts) == 0 and
3115-
hasattr(inferred, 'parent') and
3116-
isinstance(inferred.parent, nodes.Assign) and
3117-
node.root().name != inferred.root().name):
3112+
if (
3113+
isinstance(node.value, nodes.Call)
3114+
and isinstance(inferred, (nodes.List, nodes.Tuple))
3115+
and len(inferred.elts) == 0
3116+
and hasattr(inferred, "parent")
3117+
and isinstance(inferred.parent, nodes.Assign)
3118+
and node.root().name != inferred.root().name
3119+
):
31183120
return
31193121

31203122
# Attempt to check unpacking is properly balanced

0 commit comments

Comments
 (0)