Skip to content

Commit

Permalink
[unbalanced-tuple-unpacking] Add a regression tests for pylint-dev#7710
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Sep 17, 2023
1 parent 3f93f1e commit 48b569c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/whatsnew/fragments/7710.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
``sys.argv`` is now always correctly considered as impossible to infer (instead of
using the actual values given to pylint).

Closes #7710
7 changes: 7 additions & 0 deletions tests/functional/u/unbalanced/unbalanced_tuple_unpacking.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Check possible unbalanced tuple unpacking """
from __future__ import absolute_import

import sys
from typing import NamedTuple
from functional.u.unpacking.unpacking import unpack

Expand Down Expand Up @@ -160,3 +162,8 @@ def my_function(mystring):

# https://github.com/pylint-dev/pylint/issues/5998
x, y, z = (1, 2) # [unbalanced-tuple-unpacking]

# https://github.com/pylint-dev/pylint/issues/7710
# Using a lot of args, so we have a high probability to still trigger the problem if
# we add arguments to our unittest command later
(p, q, r, s, t, u, v, w, x, y, z) = sys.argv

0 comments on commit 48b569c

Please sign in to comment.