Closed kasium closed 2 years ago
Here's another false positive:
a = False
b = True
c = True
if a:
z = 1
elif b:
z = 2
elif c:
z = 1
The a
and c
branches cannot be merged into a single body because of the b
branch inbetween.
I noticed the buggy behavior happens on Python 3.6 but not on 3.8 (haven't checked 3.7).
@oliver-sanders Uh, good catch! I haven't thought about something like this!
Also happening on 3.7.10
https://github.com/MirahezeBots/sopel-channelmgnt/runs/4704103764?check_suite_focus=true we are running into the same issue.
Fixed in flake8-simplify==0.14.3
Desired change
Explanation
The current one is wrong 😄
Example