Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Aug 19, 2025

We are not using black-related functionality in prek hooks any more - the only remaining hook is 'blacken-docs` - but there is no need to synchronize and upgrade black version any more for it.

Upgraded to latest black version for blacken-docs manually.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

We are not using black-related functionality in prek hooks any more - the
only remaining hook is 'blacken-docs` - but there is no need to synchronize
and upgrade black version any more for it.

Upgraded to latest black version for blacken-docs manually.
@boring-cyborg boring-cyborg bot added area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch labels Aug 19, 2025
@potiuk potiuk requested review from Lee-W and jscheffl August 19, 2025 10:27
Copy link
Member

@ashb ashb left a comment

Choose a reason for hiding this comment

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

Makes sense

@ashb
Copy link
Member

ashb commented Aug 19, 2025

Somewhat relatedly, I wonder if we should switch these scripts from additional_deps to the # /// script inline metadata approach?

@Lee-W
Copy link
Member

Lee-W commented Aug 19, 2025

Somewhat relatedly, I wonder if we should switch these scripts from additional_deps to the # /// script inline metadata approach?

+1

@potiuk
Copy link
Member Author

potiuk commented Aug 19, 2025

Somewhat relatedly, I wonder if we should switch these scripts from additional_deps to the # /// script inline metadata approach?

If prek will supports it - yes absolutely but I doubt it does - @j178 - what do you think ? Can prek support inline dependencies when creating venvs ? I think pre-commit did the optimisation that it reused the venvs if they had the same deps - but with uv doing all the heavy lifting and caching and hard-linking packages, maybe just 'per hook venvs created on the flight` is not such a bad idea ?

@potiuk potiuk merged commit 4e6fa29 into apache:main Aug 19, 2025
107 checks passed
@potiuk potiuk deleted the cleanup-black-deps-in-prek-hooks branch August 19, 2025 12:26
@github-actions
Copy link

Backport failed to create: v3-0-test. View the failure log Run details

Status Branch Result
v3-0-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 4e6fa29 v3-0-test

This should apply the commit to the v3-0-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

Lee-W pushed a commit to astronomer/airflow that referenced this pull request Aug 19, 2025
We are not using black-related functionality in prek hooks any more - the
only remaining hook is 'blacken-docs` - but there is no need to synchronize
and upgrade black version any more for it.

Upgraded to latest black version for blacken-docs manually.

(cherry picked from commit 4e6fa29)
@Lee-W
Copy link
Member

Lee-W commented Aug 19, 2025

#54664

potiuk added a commit that referenced this pull request Aug 19, 2025
We are not using black-related functionality in prek hooks any more - the
only remaining hook is 'blacken-docs` - but there is no need to synchronize
and upgrade black version any more for it.

Upgraded to latest black version for blacken-docs manually.

(cherry picked from commit 4e6fa29)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@potiuk
Copy link
Member Author

potiuk commented Aug 19, 2025

Created an issue in prek j178/prek#509 to support inline script metadata

mangal-vairalkar pushed a commit to mangal-vairalkar/airflow that referenced this pull request Aug 30, 2025
We are not using black-related functionality in prek hooks any more - the
only remaining hook is 'blacken-docs` - but there is no need to synchronize
and upgrade black version any more for it.

Upgraded to latest black version for blacken-docs manually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants