You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "eumiro (via GitHub)" <gi...@apache.org> on 2023/09/04 08:49:32 UTC
[GitHub] [airflow] eumiro commented on a diff in pull request #34060: Consolidate importing of os.path.*
eumiro commented on code in PR #34060:
URL: https://github.com/apache/airflow/pull/34060#discussion_r1314631178
##########
scripts/ci/pre_commit/pre_commit_inline_scripts_in_docker.py:
##########
@@ -45,16 +44,16 @@ def insert_content(file_path: Path, content: list[str], header: str, footer: str
SCRIPTS_DOCKER_DIR = AIRFLOW_SOURCES_DIR / "scripts" / "docker"
for file in [DOCKERFILE_FILE, DOCKERFILE_CI_FILE]:
- for script in listdir(SCRIPTS_DOCKER_DIR):
- script_content = (SCRIPTS_DOCKER_DIR / script).read_text().splitlines(keepends=True)
+ for script in SCRIPTS_DOCKER_DIR.listdir():
Review Comment:
Should by `iterdir()` actually.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org