summaryrefslogtreecommitdiffstats
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2023-10-10 09:17:53 (GMT)
committerGitHub <noreply@github.com>2023-10-10 09:17:53 (GMT)
commit08ec4a1dbf66383303de9ce5cb55b2b437ef92c0 (patch)
tree229d6f6fd4018a2b6ae04c64841b932978a0d9c1 /.pre-commit-config.yaml
parent982f1b7d6dc2f13b9607ce092e36e32972e3702c (diff)
downloadcpython-08ec4a1dbf66383303de9ce5cb55b2b437ef92c0.zip
cpython-08ec4a1dbf66383303de9ce5cb55b2b437ef92c0.tar.gz
cpython-08ec4a1dbf66383303de9ce5cb55b2b437ef92c0.tar.bz2
GH-109408: Move the Python file whitespace check from patchcheck to pre-commit (#109891)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml9
1 files changed, 9 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index ffca103..59fe1c3 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -23,6 +23,15 @@ repos:
- id: trailing-whitespace
types_or: [c, inc, python, rst]
+ - repo: local
+ hooks:
+ - id: python-file-whitespace
+ name: "Check Python file whitespace"
+ entry: 'python Tools/patchcheck/reindent.py --nobackup --newline LF'
+ language: 'system'
+ types: [python]
+ exclude: '^(Lib/test/tokenizedata/|Tools/c-analyzer/cpython/_parser).*$'
+
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.6.8
hooks: