Skip to content

Commit

Permalink
Fix pre-commit inserting airflow_version var (apache#42378)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish authored Sep 20, 2024
1 parent 5ed3f49 commit 0d5b089
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions scripts/in_container/run_migration_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,13 @@ def insert_version(old_content, file, app):
old_content,
flags=re.MULTILINE,
)
return

new_content = re.sub(
r"(^depends_on.*)",
lambda x: f'{x.group(1)}\nfab_version = "{fab_version}"',
old_content,
flags=re.MULTILINE,
)
else:
new_content = re.sub(
r"(^depends_on.*)",
lambda x: f'{x.group(1)}\nfab_version = "{fab_version}"',
old_content,
flags=re.MULTILINE,
)
file.write_text(new_content)


Expand Down

0 comments on commit 0d5b089

Please sign in to comment.