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)
commit24f0717b822b5fbf0460e0274bba3499570957d7 (patch)
tree55f7ad20d85b00ad5618cfcd6498e84390fca839
parent8e120ac05c2bec63c36addc554f9661da3b6ccf9 (diff)
downloadcpython-24f0717b822b5fbf0460e0274bba3499570957d7.zip
cpython-24f0717b822b5fbf0460e0274bba3499570957d7.tar.gz
cpython-24f0717b822b5fbf0460e0274bba3499570957d7.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 6f9821b..1b51520 100755
--- a/Tools/scripts/patchcheck.py
+++ b/Tools/scripts/patchcheck.py
@@ -152,7 +152,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.