possibly-used-before-assignment
does not handle match
in nested if
#9668
Labels
C: used-before-assignment
Issues related to 'used-before-assignment' check
False Positive 🦟
A message is emitted but nothing is wrong with the code
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Bug description
Configuration
No response
Command used
Pylint output
Expected behavior
The first two functions are correctly handled by pylint, i.e.
match
worksif
s workI though this was a variant of #9643 at first, with
match
not properly supported, but it's apparently a bit more complicated: it seems pylint has trouble understanding that thematch
nested under the firstif
is also "exhaustive". Note that this is triggered whatever "exit" type is used in thecase _:
fallthrough (return
,raise
orassert_never
)Pylint version
OS / Environment
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: