[3/N] Apply py39 ruff fixes (#142115)

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/142115
Approved by: https://github.com/ezyang
This commit is contained in:
cyy
2024-12-11 17:50:07 +00:00
committed by PyTorch MergeBot
parent f7e621c3ce
commit 82aaf64422
31 changed files with 137 additions and 91 deletions

View File

@ -4,12 +4,16 @@ import math
import os
import subprocess
from pathlib import Path
from typing import Callable, Sequence
from typing import Callable, TYPE_CHECKING
from tools.stats.import_test_stats import get_disabled_tests
from tools.testing.test_run import ShardedTest, TestRun
if TYPE_CHECKING:
from collections.abc import Sequence
REPO_ROOT = Path(__file__).resolve().parent.parent.parent
IS_MEM_LEAK_CHECK = os.getenv("PYTORCH_TEST_CUDA_MEM_LEAK_CHECK", "0") == "1"