About superfluous-else-raise (**RET506**) and elif
#12468
-
|
Currently, a combination of two Two separated Why would it be a bad idea to allow
|
Beta Was this translation helpful? Give feedback.
Answered by
guillermodotn
Feb 17, 2026
Replies: 1 comment
-
|
RET506 is correct here. If every branch of an if ends with |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
amyreese
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RET506 is correct here.
If every branch of an if ends with
raise(orreturn/break/continue), then theelse/elifis unnecessary because the code after the block is only reachable when the condition wasn't met anyway.