Uh oh!
There was an error while loading. Please reload this page.
GH-109408: Move the Python file whitespace check from patchcheck to pre-commit - #109891
Conversation
hugovk
commented
Oct 10, 2023
Thanks! |
miss-islington
commented
Oct 10, 2023
Thanks @AA-Turner for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
miss-islington
commented
Oct 10, 2023
Thanks @AA-Turner for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
miss-islington
commented
Oct 10, 2023
Sorry, @AA-Turner and @hugovk, I could not cleanly backport this to |
…k to pre-commit (pythonGH-109891) (cherry picked from commit 08ec4a1) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
GH-110633 is a backport of this pull request to the 3.12 branch. |
…ck to pre-commit (GH-109891) (#110633) GH-109408: Move the Python file whitespace check from patchcheck to pre-commit (GH-109891) (cherry picked from commit 08ec4a1) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk
commented
Oct 10, 2023
@AA-Turner Please could you take care of the backports in #109890 and here? |
…tchcheck to pre-commit (pythonGH-109891) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>. (cherry picked from commit 08ec4a1) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-110641 is a backport of this pull request to the 3.11 branch. |
hugovk
commented
Oct 10, 2023
I've found a problem with this (and the C one) when running on macOS, pre-commit cannot find an executable called ❯ pre-commit run --all-filesRun Ruff on Lib/test/....................................................PassedRun Ruff on Argument Clinic..............................................Passedcheck toml...............................................................Passedcheck yaml...............................................................Passedfix end of files.........................................................Passedtrim trailing whitespace.................................................PassedCheck Python file whitespace.............................................Failed- hook id: python-file-whitespace- exit code: 1Executable `python` not foundCheck C file whitespace..................................................Failed- hook id: c-file-whitespace- exit code: 1Executable `python` not foundSphinx lint..............................................................PassedCheck hooks apply to the repository......................................PassedCheck for useless excludes...............................................PassedIt works with Is there a portable solution? One option could be like https://github.com/pre-commit/pre-commit-hooks/blob/main/.pre-commit-hooks.yaml which has entries such as: - id: check-added-large-filesname: check for added large filesdescription: prevents giant files from being committed.entry: check-added-large-fileslanguage: pythonstages: [commit, push, manual]Which uses a file like https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_added_large_files.py |
(So let's hold off on the remaining backports until this is fixed.) |
AA-Turner
commented
Oct 10, 2023
The The drawback with A |
…k to pre-commit (python#109891) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.