summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-19 09:54:08 (GMT)
committerGeorg Brandl <georg@python.org>2014-10-19 09:54:08 (GMT)
commit6a1184c02462cf4be3371a37f9a9e7c29257bdeb (patch)
treea10c82bdde58b5aa3a0ff64267df178613d65b60
parent7ca2a9008d11e2ccc4158b48e0435066526f2e84 (diff)
downloadcpython-6a1184c02462cf4be3371a37f9a9e7c29257bdeb.zip
cpython-6a1184c02462cf4be3371a37f9a9e7c29257bdeb.tar.gz
cpython-6a1184c02462cf4be3371a37f9a9e7c29257bdeb.tar.bz2
Closes #22663: patchcheck: only modify text files under Doc/
-rwxr-xr-xTools/scripts/patchcheck.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/scripts/patchcheck.py b/Tools/scripts/patchcheck.py
index 418dd26..eda21b9 100755
--- a/Tools/scripts/patchcheck.py
+++ b/Tools/scripts/patchcheck.py
@@ -157,7 +157,8 @@ def main():
file_paths = changed_files()
python_files = [fn for fn in file_paths if fn.endswith('.py')]
c_files = [fn for fn in file_paths if fn.endswith(('.c', '.h'))]
- doc_files = [fn for fn in file_paths if fn.startswith('Doc')]
+ doc_files = [fn for fn in file_paths if fn.startswith('Doc') and
+ fn.endswith(('.rst', '.inc'))]
misc_files = {os.path.join('Misc', 'ACKS'), os.path.join('Misc', 'NEWS')}\
& set(file_paths)
# PEP 8 whitespace rules enforcement.