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

Remove language_version from .pre-commit-hooks.yaml #258

Merged
merged 1 commit into from Aug 16, 2023

Conversation

aneeshusa
Copy link
Contributor

This enables default_language_version stanzas
in consuming .pre-commit-config.yaml files to take precedence.

This change is the same as psf/black#2430,
see that PR for full context on why this is beneficial.

This was previously PR'ed to this project as #144.
It was closed at the time so my company has been keeping a fork of this project with the patch applied.
With the new maintainership, I wanted to ask whether this change would be accepted at this time.
Thanks in advance for taking a look, happy to answer any questions.

This enables `default_language_version` stanzas
in consuming `.pre-commit-config.yaml` files to take precedence.
@aneeshusa
Copy link
Contributor Author

@adamchainz appreciate your work maintaining this project. Wanted to tag you to ask if you had some time to consider this PR.

Copy link
Owner

@adamchainz adamchainz left a comment

Choose a reason for hiding this comment

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

Seems sensible. I’m not sure why Anthony disagreed.

@adamchainz adamchainz enabled auto-merge (squash) August 16, 2023 05:21
@adamchainz adamchainz merged commit fc2a13f into adamchainz:main Aug 16, 2023
1 check passed
adamchainz pushed a commit to maxb2/blacken-docs that referenced this pull request Aug 16, 2023
This enables `default_language_version` stanzas
in consuming `.pre-commit-config.yaml` files to take precedence.

This change is the same as psf/black#2430,
see that PR for full context on why this is beneficial.

This was previously PR'ed to this project as
adamchainz#144.
It was closed at the time so my company has been keeping a fork of this
project with the patch applied.
With the new maintainership, I wanted to ask whether this change would
be accepted at this time.
Thanks in advance for taking a look, happy to answer any questions.
paddyroddy pushed a commit to paddyroddy/python-template that referenced this pull request Aug 16, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[adamchainz/blacken-docs](https://togithub.com/adamchainz/blacken-docs)
| repository | minor | `1.15.0` -> `1.16.0` |

Note: The `pre-commit` manager in Renovate is not supported by the
`pre-commit` maintainers or community. Please do not report any problems
there, instead [create a Discussion in the Renovate
repository](https://togithub.com/renovatebot/renovate/discussions/new)
if you have any questions.

---

### Release Notes

<details>
<summary>adamchainz/blacken-docs (adamchainz/blacken-docs)</summary>

###
[`v1.16.0`](https://togithub.com/adamchainz/blacken-docs/blob/HEAD/CHANGELOG.rst#1160-2023-08-16)

[Compare
Source](https://togithub.com/adamchainz/blacken-docs/compare/1.15.0...1.16.0)

-   Allow Markdown fence options.

Thanks to initial work from Matthew Anderson in `PR #&#8203;246
<https://github.com/adamchainz/blacken-docs/pull/246>`\__.

- Expand Markdown detection to all Python language names from Pygments:
`py`, `sage`, `python3`, `py3`, and `numpy`.

-   Preserve leading whitespace lines in reStructuredText code blocks.

Thanks to Julianus Pfeuffer for the report in `Issue #&#8203;217
<https://github.com/adamchainz/blacken-docs/issues/217>`\__.

- Use exit code 2 to indicate errors from Black, whilst exit code 1
remains for “files have been formatted”.

Thanks to Julianus Pfeuffer for the report in `Issue #&#8203;218
<https://github.com/adamchainz/blacken-docs/issues/218>`\__.

- Support passing the `--preview` option through to Black, to select the
future style.

-   Remove `language_version` from `.pre-commit-hooks.yaml`.
This change allows `default_language_version` in
\`\`.pre-commit-config.yaml\` to take precedence.

Thanks to Aneesh Agrawal in `PR #&#8203;258
<https://github.com/adamchainz/blacken-docs/pull/258>`\__.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/paddyroddy/python-template).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40My4yIiwidXBkYXRlZEluVmVyIjoiMzYuNDMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@aneeshusa
Copy link
Contributor Author

Thanks for taking a look and cutting a release! Upgrading to the new version in all repos at my company :)

paddyroddy pushed a commit to astro-informatics/sleplet that referenced this pull request Aug 29, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[adamchainz/blacken-docs](https://togithub.com/adamchainz/blacken-docs)
| repository | minor | `1.15.0` -> `1.16.0` |

Note: The `pre-commit` manager in Renovate is not supported by the
`pre-commit` maintainers or community. Please do not report any problems
there, instead [create a Discussion in the Renovate
repository](https://togithub.com/renovatebot/renovate/discussions/new)
if you have any questions.

---

### Release Notes

<details>
<summary>adamchainz/blacken-docs (adamchainz/blacken-docs)</summary>

###
[`v1.16.0`](https://togithub.com/adamchainz/blacken-docs/blob/HEAD/CHANGELOG.rst#1160-2023-08-16)

[Compare
Source](https://togithub.com/adamchainz/blacken-docs/compare/1.15.0...1.16.0)

-   Allow Markdown fence options.

Thanks to initial work from Matthew Anderson in `PR #&#8203;246
<https://github.com/adamchainz/blacken-docs/pull/246>`\__.

- Expand Markdown detection to all Python language names from Pygments:
`py`, `sage`, `python3`, `py3`, and `numpy`.

-   Preserve leading whitespace lines in reStructuredText code blocks.

Thanks to Julianus Pfeuffer for the report in `Issue #&#8203;217
<https://github.com/adamchainz/blacken-docs/issues/217>`\__.

- Use exit code 2 to indicate errors from Black, whilst exit code 1
remains for “files have been formatted”.

Thanks to Julianus Pfeuffer for the report in `Issue #&#8203;218
<https://github.com/adamchainz/blacken-docs/issues/218>`\__.

- Support passing the `--preview` option through to Black, to select the
future style.

-   Remove `language_version` from `.pre-commit-hooks.yaml`.
This change allows `default_language_version` in
\`\`.pre-commit-config.yaml\` to take precedence.

Thanks to Aneesh Agrawal in `PR #&#8203;258
<https://github.com/adamchainz/blacken-docs/pull/258>`\__.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/astro-informatics/sleplet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40My4yIiwidXBkYXRlZEluVmVyIjoiMzYuNDMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

None yet

2 participants