mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:23 +00:00
[flake8-return
] - Add fixes for (RET505
, RET506
, RET507
, RET508
) (#9595)
This commit is contained in:
parent
dba2cb79cb
commit
ffd13e65ae
11 changed files with 1027 additions and 7 deletions
|
@ -131,6 +131,37 @@ def bar3(x, y, z):
|
|||
return None
|
||||
|
||||
|
||||
def bar4(x):
|
||||
if True:
|
||||
return
|
||||
else:
|
||||
# comment
|
||||
pass
|
||||
|
||||
|
||||
def bar5():
|
||||
if True:
|
||||
return
|
||||
else: # comment
|
||||
pass
|
||||
|
||||
|
||||
def bar6():
|
||||
if True:
|
||||
return
|
||||
else\
|
||||
:\
|
||||
# comment
|
||||
pass
|
||||
|
||||
|
||||
def bar7():
|
||||
if True:
|
||||
return
|
||||
else\
|
||||
: # comment
|
||||
pass
|
||||
|
||||
x = 0
|
||||
|
||||
if x == 1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue