[BE][Easy] replace import pathlib with from pathlib import Path (#129426)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/129426
Approved by: https://github.com/malfet
This commit is contained in:
Xuehai Pan
2024-06-30 07:28:38 +08:00
committed by PyTorch MergeBot
parent 2effbcfcd8
commit 4ee1cb9b95
32 changed files with 156 additions and 137 deletions

View File

@ -1,13 +1,13 @@
from __future__ import annotations
import functools
import pathlib
import random
import sys
import unittest
from collections import defaultdict
from pathlib import Path
REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent.parent
REPO_ROOT = Path(__file__).resolve().parent.parent.parent
try:
# using tools/ to optimize test run.
sys.path.append(str(REPO_ROOT))