You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same thing if the if-chain is contained in a loop and the return is a break instead.
Note that not using an elif after causes a behavior change: print("2") will be called when it shouldn't be. These warnings should only trigger if every case in the if/elif/else chain returns, breaks, or raises.
The text was updated successfully, but these errors were encountered:
Description
R505 & R508 produce false-positives when an earlier branch does not
return
/break
.What I did
Same thing if the
if
-chain is contained in a loop and thereturn
is abreak
instead.Note that not using an
elif
after causes a behavior change:print("2")
will be called when it shouldn't be. These warnings should only trigger if every case in theif
/elif
/else
chainreturn
s,break
s, orraise
s.The text was updated successfully, but these errors were encountered: