mirror of
https://github.com/astral-sh/ruff
synced 2026-01-20 21:10:48 -05:00
Avoid removing side effects for boolean simplifications (#1984)
Closes #1978.
This commit is contained in:
@@ -7,8 +7,12 @@ if (a or b) or True: # SIM223
|
||||
if a or (b or True): # SIM223
|
||||
pass
|
||||
|
||||
if a and True:
|
||||
if a and True: # OK
|
||||
pass
|
||||
|
||||
if True:
|
||||
if True: # OK
|
||||
pass
|
||||
|
||||
|
||||
def validate(self, value):
|
||||
return json.loads(value) or True # OK
|
||||
|
||||
Reference in New Issue
Block a user