summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-09-29 09:00:52 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2018-09-29 09:00:52 +0200
commitd9a115d7537c55cdff910eee97c683d4dd795634 (patch)
tree9e0fd5fd19a1782331c2735d1f7e9b3633f1e87b
parent3c2fb0ef2f640675079a1f9c56d2bc81f7b809dd (diff)
downloadpylint-git-d9a115d7537c55cdff910eee97c683d4dd795634.tar.gz
Change ``unbalanced-tuple-unpacking`` back to a warning.
It used to be a warning until a couple of years ago, after it was promoted to an error. But the check might be suggesting the wrong thing in some cases, for instance when checking against ``sys.argv`` which cannot be known at static analysis time. Given it might rely on potential unknown data, it's best to have it as a warning. Close #2522
-rw-r--r--ChangeLog10
-rw-r--r--pylint/checkers/variables.py4
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e27fcc82..0b30a87ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,16 @@ What's New in Pylint 2.2?
Release date: TBA
+ * Change ``unbalanced-tuple-unpacking`` back to a warning.
+
+ It used to be a warning until a couple of years ago, after it was promoted to
+ an error. But the check might be suggesting the wrong thing in some cases,
+ for instance when checking against ``sys.argv`` which cannot be known at static
+ analysis time. Given it might rely on potential unknown data, it's best to
+ have it as a warning.
+
+ Close #2522
+
* Remove ``enumerate`` usage suggestion when defining ``__iter__`` (C0200)
Close #2477
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index e9c7ccb23..bf6825644 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -376,13 +376,13 @@ MSGS = {
"a list comprehension or a generator expression) is used outside "
"the loop.",
),
- "E0632": (
+ "W0632": (
"Possible unbalanced tuple unpacking with "
"sequence%s: "
"left side has %d label(s), right side has %d value(s)",
"unbalanced-tuple-unpacking",
"Used when there is an unbalanced tuple unpacking in assignment",
- {"old_names": [("W0632", "unbalanced-tuple-unpacking")]},
+ {"old_names": [("E0632", "unbalanced-tuple-unpacking")]},
),
"E0633": (
"Attempting to unpack a non-sequence%s",