[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

@ -46,7 +46,7 @@ def fetch_and_cache(
if os.path.exists(path) and is_cached_file_valid():
# Another test process already download the file, so don't re-do it
with open(path, "r") as f:
with open(path) as f:
return cast(Dict[str, Any], json.load(f))
for _ in range(3):