-
-
Notifications
You must be signed in to change notification settings - Fork 129
Support PEP 723 scripts for Python hooks #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Nice! |
Fix Debug windows debug Fix # Conflicts: # tests/languages/python.rs
|
This is a really cool feature. |
|
Indeed ;) |
potiuk
added a commit
to potiuk/airflow
that referenced
this pull request
Aug 25, 2025
Following the change in j178/prek#529 and release of prek 0.1.3, we convert all our Python scripts to use PEP-723-compliant inline scripts. This will remove decoupling of scripts from their dependencies, and will allow to run them easily by `uv run` as well as easier debugging and testing.
potiuk
added a commit
to potiuk/airflow
that referenced
this pull request
Aug 25, 2025
Following the change in j178/prek#529 and release of prek 0.1.3, we convert all our Python scripts to use PEP-723-compliant inline scripts. This will remove decoupling of scripts from their dependencies, and will allow to run them easily by `uv run` as well as easier debugging and testing.
potiuk
added a commit
to potiuk/airflow
that referenced
this pull request
Aug 25, 2025
Following the change in j178/prek#529 and release of prek 0.1.3, we convert all our Python scripts to use PEP-723-compliant inline scripts. This will remove decoupling of scripts from their dependencies, and will allow to run them easily by `uv run` as well as easier debugging and testing.
potiuk
added a commit
to potiuk/airflow
that referenced
this pull request
Aug 25, 2025
Following the change in j178/prek#529 and release of prek 0.1.3, we convert all our Python scripts to use PEP-723-compliant inline scripts. This will remove decoupling of scripts from their dependencies, and will allow to run them easily by `uv run` as well as easier debugging and testing.
potiuk
added a commit
to apache/airflow
that referenced
this pull request
Aug 25, 2025
…54917) Following the change in j178/prek#529 and release of prek 0.1.3, we convert all our Python scripts to use PEP-723-compliant inline scripts. This will remove decoupling of scripts from their dependencies, and will allow to run them easily by `uv run` as well as easier debugging and testing.
mangal-vairalkar
pushed a commit
to mangal-vairalkar/airflow
that referenced
this pull request
Aug 30, 2025
…pache#54917) Following the change in j178/prek#529 and release of prek 0.1.3, we convert all our Python scripts to use PEP-723-compliant inline scripts. This will remove decoupling of scripts from their dependencies, and will allow to run them easily by `uv run` as well as easier debugging and testing.
nothingmin
pushed a commit
to nothingmin/airflow
that referenced
this pull request
Sep 2, 2025
…pache#54917) Following the change in j178/prek#529 and release of prek 0.1.3, we convert all our Python scripts to use PEP-723-compliant inline scripts. This will remove decoupling of scripts from their dependencies, and will allow to run them easily by `uv run` as well as easier debugging and testing.
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
Oct 24, 2025
…#54917) Following the change in j178/prek#529 and release of prek 0.1.3, we convert all our Python scripts to use PEP-723-compliant inline scripts. This will remove decoupling of scripts from their dependencies, and will allow to run them easily by `uv run` as well as easier debugging and testing. GitOrigin-RevId: 0df08334cd1c6272db09d95b94aa250a3340630b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #509
For Python hooks without
additional_dependencies, prek will try to read the PEP 723 inline metadata from theentryfield. (ifshlex.split(entry)[0]is a local file.)For example:
.pre-commit-config.yaml:echo.py:Note that:
entryfield must be a path to the Python script.additional_dependenciesin.pre-commit-config.yaml, script metadata will not be read.language_versionin.pre-commit-config.yamlandrequiest-pythonin the inline metadata, thelanguage_versionwill be ignored.dependenciesandrequires-pythonin inline metadata are supported, other fields liketool.uvare all ignored.