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

This reverts commit 6d75604ef135925e8c85363c2f4a5e0b6f7fef28.

Reverted https://github.com/pytorch/pytorch/pull/129426 on behalf of https://github.com/XuehaiPan due to recognize `Path` as new exported API ([comment](https://github.com/pytorch/pytorch/pull/129426#issuecomment-2198371625))
This commit is contained in:
PyTorch MergeBot
2024-06-29 23:24:06 +00:00
parent 67c9ec2b6d
commit 2effbcfcd8
33 changed files with 140 additions and 159 deletions

View File

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