]> granicus.if.org Git - python/commitdiff
Closes #22663: patchcheck: only modify text files under Doc/
authorGeorg Brandl <georg@python.org>
Sun, 19 Oct 2014 09:54:08 +0000 (11:54 +0200)
committerGeorg Brandl <georg@python.org>
Sun, 19 Oct 2014 09:54:08 +0000 (11:54 +0200)
Tools/scripts/patchcheck.py

index 418dd269daf8f0b571e015fad170365349277b71..eda21b9018c0990b17586fa119aa3c96698f15e4 100755 (executable)
@@ -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.