Skip to content

Consolidate importing of os.path.* - #34060

Merged
potiuk merged 2 commits into
apache:mainfrom
eumiro:import-os-path
Sep 7, 2023
Merged

Consolidate importing of os.path.*#34060
potiuk merged 2 commits into
apache:mainfrom
eumiro:import-os-path

Conversation

@eumiro

Copy link
Copy Markdown
Contributor

No description provided.

Comment threadairflow/www/extensions/init_views.py Outdated
Comment threadairflow/www/extensions/init_views.py Outdated
Comment threadscripts/ci/pre_commit/pre_commit_check_order_setup.py Outdated
Comment threadscripts/ci/pre_commit/pre_commit_inline_scripts_in_docker.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
AIRFLOW_SOURCES_DIR=Path(__file__).resolve().parents[3]
AIRFLOW_SOURCES_DIR=Path(__file__).parents[3].resolve()

or

Suggested change
AIRFLOW_SOURCES_DIR=Path(__file__).resolve().parents[3]
AIRFLOW_SOURCES_DIR=Path(__file__).parents[3]

since the original code seems to work without resolving anyway?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 13 occurrences of resolve().parents in the repo. Should we fix them all?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’d be awesome, although we can focus on the lines changed in this PR first.

@potiukpotiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. That always bothered me :)

@potiuk

Copy link
Copy Markdown
Member

pending @uranusjr chaanges.

@potiuk
potiuk merged commit 9079093 into apache:mainSep 7, 2023
@eumiro
eumiro deleted the import-os-path branch September 7, 2023 17:35
@ephraimbuddyephraimbuddy added this to the Airflow 2.7.2 milestone Oct 3, 2023
@ephraimbuddyephraimbuddy added the type:misc/internal Changelog: Misc changes that should appear in change log label Oct 3, 2023
ephraimbuddy pushed a commit that referenced this pull request Oct 5, 2023
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
(cherry picked from commit 9079093)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-toolsarea:providersarea:system-testsarea:webserverWebserver related Issueskind:documentationprovider:amazonAWS/Amazon - related issuesprovider:ftpprovider:googleGoogle (including GCP) related issuestype:misc/internalChangelog: Misc changes that should appear in change log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@eumiro@potiuk@uranusjr@ephraimbuddy