potiuk commented on code in PR #40720: URL: https://github.com/apache/airflow/pull/40720#discussion_r1689601732
########## scripts/ci/pre_commit/check_system_tests.py: ########## @@ -52,13 +53,14 @@ def _check_file(file: Path): content = file.read_text() if "from tests.system.utils.watcher import watcher" in content: - index = content.find(WATCHER_APPEND_INSTRUCTION) + for watcher_instruction in [WATCHER_APPEND_INSTRUCTION, WATCHER_APPEND_INSTRUCTION_SHORT]: + index = content.find(watcher_instruction) Review Comment: NIT: I think this is superfluous to do the FOR loop. a) result of first check is always discarded anyway b) SHORT is already covering the full instruction find. so just checking for SHORT instructions will work - and we can always print the full instruction few lines below. -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org