Skip to content

Commit

Permalink
add fuzzer test case
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Aug 8, 2024
1 parent 3e2f778 commit d165c3e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,9 @@ def indent(x, y, w, z):
# comment
c = 3
return z

def f():
if True:
return True
else:
return False
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,12 @@ RET505.py:237:5: RET505 Unnecessary `else` after `return` statement
|
= help: Remove unnecessary `else`


RET505.py:245:2: RET505 Unnecessary `else` after `return` statement
|
243 | if True:
244 | return True
245 | else:
| ^^^^ RET505
246 | return False
|
= help: Remove unnecessary `else`
Original file line number Diff line number Diff line change
Expand Up @@ -460,5 +460,24 @@ RET505.py:237:5: RET505 [*] Unnecessary `else` after `return` statement
240 |- return z
238 |+ c = 3
239 |+ return z
241 240 |
242 241 | def f():
243 242 | if True:

RET505.py:245:2: RET505 [*] Unnecessary `else` after `return` statement
|
243 | if True:
244 | return True
245 | else:
| ^^^^ RET505
246 | return False
|
= help: Remove unnecessary `else`

Safe fix
242 242 | def f():
243 243 | if True:
244 244 | return True
245 |- else:
246 |- return False
245 |+ return False

0 comments on commit d165c3e

Please sign in to comment.