[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:
Xuehai Pan
2024-07-08 00:02:13 +08:00
committed by PyTorch MergeBot
parent fa5f572748
commit 4d7bf72d93
35 changed files with 64 additions and 177 deletions

View File

@ -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):