Uh oh!
There was an error while loading. Please reload this page.
Add end-of-file-fixer to pre-commit - #106065
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.
Let's do the hopefully-uncontroversial bit (adding it for |
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.