uranusjr commented on code in PR #34060:
URL: https://github.com/apache/airflow/pull/34060#discussion_r1314532886


##########
scripts/ci/pre_commit/pre_commit_check_order_setup.py:
##########
@@ -26,15 +26,14 @@
 import re
 import sys
 import textwrap
-from os.path import abspath, dirname
+from pathlib import Path
 
 from rich import print
 
 errors: list[str] = []
 
-MY_DIR_PATH = os.path.dirname(__file__)
-SOURCE_DIR_PATH = os.path.abspath(os.path.join(MY_DIR_PATH, os.pardir, 
os.pardir, os.pardir))
-sys.path.insert(0, SOURCE_DIR_PATH)
+SOURCE_DIR_PATH = Path(__file__).resolve().parents[3]

Review Comment:
   ```suggestion
   SOURCE_DIR_PATH = Path(__file__).parents[3].resolve()
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to