Skip to content
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

.pre-commit-hooks.yaml: remove the language_version #839

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

Mikaela
Copy link
Contributor

@Mikaela Mikaela commented Oct 15, 2023

Reuse specifying language_version: python3 means that the hook is executed using the system python3 version and it takes priority over the top level language configuration of the project unlesss the project added explicit override for the reuse hook.

E.g. with:

default_language_version:
  python: pypy3

all other Python3 pre-commit hooks I have would be running with pypy3 with the exception of reuse enforcing python3.

Based on #132, reuse would support pypy outside of pre-commit.

Copy link
Member

@carmenbianca carmenbianca left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@carmenbianca carmenbianca merged commit 5c430ef into fsfe:main Oct 16, 2023
20 checks passed
@Mikaela Mikaela deleted the pre-commit-language branch October 17, 2023 04:09
@carmenbianca
Copy link
Member

@Mikaela I think we need to make a new release of reuse before this is of any use to you.

@Mikaela
Copy link
Contributor Author

Mikaela commented Oct 19, 2023

Yes, unless I use the commit hash instead of a tag (and lose the ability to pre-commit autoupdate), but I don't think it's so urgent as it will happen eventually with the next release and meanwhile Python 3.12 will work

@Mikaela
Copy link
Contributor Author

Mikaela commented Oct 20, 2023

I ended up trying this and it works. Pre-commit.ci now reports using pypy3 while with previous commits it reported using python3 in the build section.

I also didn't lose pre-commit autoupdate, it just wants to downgrade to the latest tag, so it will be fine at the time of the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants