Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
Add end-of-file-fixer to pre-commit#106065
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
…hitespace(python_files)
hugovk commented Jun 24, 2023
Temporary commit not needed, as there's a file that needs fixing: https://github.com/python/cpython/actions/runs/5366030779/jobs/9735224499?pr=106065 |
hugovk commented Jun 24, 2023
Like diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e21feee3ed..78627f9839 100644 --- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -4,7 +4,7 @@ repos: hooks: - id: check-yaml - id: end-of-file-fixer - types_or: [python]+ types_or: [c, python, rst] - id: trailing-whitespace types_or: [c, python, rst]If so, it would do an initial tidy-up of these files: FilesIf not, we could simplify a bit: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e21feee3ed..1197ef745e 100644 --- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -4,7 +4,7 @@ repos: hooks: - id: check-yaml - id: end-of-file-fixer - types_or: [python]+ types: [python] - id: trailing-whitespace types_or: [c, python, rst] |
Uh oh!
There was an error while loading. Please reload this page.
AlexWaygood commented Jun 25, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Let's do the hopefully-uncontroversial bit (adding it for |
AlexWaygood left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
miss-islington commented Jun 25, 2023
Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
bedevere-bot commented Jun 25, 2023
GH-106080 is a backport of this pull request to the 3.12 branch. |
(cherry picked from commit 8c24a83) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Follow on from #104275.
This adds a check that is part of
make patchcheck'snormalize_whitespace(python_files)to pre-commit, which showed up in PR #105984:https://dev.azure.com/Python/cpython/_build/results?buildId=130810&view=logs&j=256d7e09-002a-52d7-8661-29ee3960640e&t=3d7276d3-4e8d-5309-55ad-fb0b172d9925
Adding here will make the failure more visible, and show the actual change needed.
I'll push another temporary commit to demonstrate.