[BE] Enable ruff's UP rules and autoformat tools and scripts (#105428)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/105428
Approved by: https://github.com/albanD, https://github.com/soulitzer, https://github.com/malfet
This commit is contained in:
Justin Chu
2023-07-18 21:12:48 +00:00
committed by PyTorch MergeBot
parent 5666d20bb8
commit 14d87bb5ff
48 changed files with 125 additions and 146 deletions

View File

@ -26,7 +26,7 @@ def fn(base: str) -> str:
return str(base / Path("aten/src/ATen/native/native_functions.yaml"))
with open(Path(__file__).parent.parent.parent / fn("."), "r") as f:
with open(Path(__file__).parent.parent.parent / fn(".")) as f:
contents = f.read()
yaml = ruamel.yaml.YAML() # type: ignore[attr-defined]