Implement flake8-simplify SIM103 (#1712)

Ref #998

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
messense
2023-01-07 20:33:24 +08:00
committed by GitHub
parent 5cdd7ccdb8
commit 402feffe85
9 changed files with 104 additions and 5 deletions

View File

@@ -0,0 +1,20 @@
def f():
if a: # SIM103
return True
else:
return False
def f():
if a: # OK
foo()
return True
else:
return False
def f():
if a: # OK
return "foo"
else:
return False