Skip to content

Commit

Permalink
fixup! fix: ignore fix if "bool" is not builtin (astral-sh#2429)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceone committed Feb 1, 2023
1 parent 1a47d8d commit 2e8cc39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions resources/test/fixtures/flake8_simplify/SIM210.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

a = False if b else True # OK

def bool():
return False
def f():
# OK
def bool():
return False

a = True if b else False # OK
a = True if b else False
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ expression: diagnostics
IfExprWithTrueFalse:
expr: b
location:
row: 12
column: 4
row: 14
column: 8
end_location:
row: 12
column: 24
row: 14
column: 28
fix: ~
parent: ~

0 comments on commit 2e8cc39

Please sign in to comment.