diff options
Diffstat (limited to 'pylint/checkers/python3.py')
-rw-r--r-- | pylint/checkers/python3.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pylint/checkers/python3.py b/pylint/checkers/python3.py index e708c4a..a60d0de 100644 --- a/pylint/checkers/python3.py +++ b/pylint/checkers/python3.py @@ -78,6 +78,12 @@ def _in_iterating_context(node): elif isinstance(parent.func, astroid.Getattr): if parent.func.attrname == 'join': return True + # If the call is in an unpacking, there's no need to warn, + # since it can be considered iterating. + elif (isinstance(parent, astroid.Assign) and + isinstance(parent.targets[0], (astroid.List, astroid.Tuple))): + if len(parent.targets[0].elts) > 1: + return True return False |