B013 false positive when using iterable unpacking in except clause #12450
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Contributions especially welcome
rule
Implementing or modifying a lint rule
When unpacking an iterable into a tuple as part of an except clause,
B013
is triggered even though the unpacking can cause the tuple to contain multiple exceptions.Example:
Repro on ruff playground: https://play.ruff.rs/6b9daf6a-96fb-48ab-9be6-db236f86ec21
Ruff version: 0.5.4
As a workaround for my specific use case, the
tuple
constructor accepts an iterable, making the following possible:The text was updated successfully, but these errors were encountered: