mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE][Easy] fix ruff rule needless-bool (SIM103) (#130206)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/130206 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
fa5f572748
commit
4d7bf72d93
@ -104,9 +104,7 @@ def maybe_set_hip_visible_devies():
|
||||
|
||||
|
||||
def strtobool(s):
|
||||
if s.lower() in ["", "0", "false", "off"]:
|
||||
return False
|
||||
return True
|
||||
return s.lower() not in {"", "0", "false", "off"}
|
||||
|
||||
|
||||
class TestChoices(list):
|
||||
|
Reference in New Issue
Block a user