Skip to content

New checker - unbalanced-dictionary-unpacking #5797

Closed
@mbyrnepr2

Description

@mbyrnepr2

Bug description

Also mentioned in discussion in #5113.

The following situation does not issue a message from Pylint:
a.py:

for a, b, c, d, e, f, g in {1: 2}.items():
    pass

On the other hand, Python gives:

Traceback (most recent call last):
  File "a.py", line 1, in <module>
    for a, b, c, d, e, f, g in {1: 2}.items():
ValueError: not enough values to unpack (expected 7, got 2)

Configuration

No response

Command used

pylint a.py

Pylint output

No output

Expected behavior

Emit a message indicating the unpacking error.

Pylint version

pylint 2.13.0-dev0
astroid 2.9.3
Python 3.10.0b2 (v3.10.0b2:317314165a, May 31 2021, 10:02:22) [Clang 12.0.5 (clang-1205.0.22.9)]

OS / Environment

No response

Additional dependencies

No response

Metadata

Metadata

Assignees

Labels

Enhancement ✨Improvement to a componentGood first issueFriendly and approachable by new contributorsHacktoberfestHelp wanted 🙏Outside help would be appreciated, good for new contributorsNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions