Skip to content

multiple-starred-expressions

Pythoncorrectnessno fixdefault: warnpython/ruff

Reports an assignment target with two starred names, such as a, *b, *c = x.

Python rejects the file with SyntaxError: multiple starred expressions in assignment, since it cannot tell how to split the values between them.

To fix, keep one starred name.

Reported
...
...
*a, *b = range(3)
python:
lint:
rules:
multiple-starred-expressions: warn # off, warn (default), error

Enabled by the presets: python/ruff.

Suppress one line with sudsy-disable-next-line multiple-starred-expressions in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
ruff F622 full