checks: correct the shebang line filtering for python files
authorMatt Harbison <matt_harbison@yahoo.com>
Thu, 16 Mar 2017 21:16:57 -0400
changeset 2121 01ee3e155726
parent 2120 e38156312410
child 2122 efc6633e78e1
checks: correct the shebang line filtering for python files As it is, the only related file is docs/test2rst.py, which was covered by **.py. Not sure if it matters, but most patterns in core tests are for "#!.*?python". (Though there are a couple "#!.*python" tests.)
tests/test-check-flake8.t
tests/test-check-pyflakes.t
--- a/tests/test-check-flake8.t	Thu Mar 16 23:17:07 2017 -0400
+++ b/tests/test-check-flake8.t	Thu Mar 16 21:16:57 2017 -0400
@@ -14,5 +14,5 @@
 
 run flake8 if it exists; if it doesn't, then just skip
 
-  $ hg files -0 'set:(**.py or grep("^!#.*python")) - removed()' 2>/dev/null \
+  $ hg files -0 'set:(**.py or grep("^#!.*python")) - removed()' 2>/dev/null \
   > | xargs -0 flake8
--- a/tests/test-check-pyflakes.t	Thu Mar 16 23:17:07 2017 -0400
+++ b/tests/test-check-pyflakes.t	Thu Mar 16 21:16:57 2017 -0400
@@ -7,5 +7,5 @@
 run pyflakes on all tracked files ending in .py or without a file ending
 (skipping binary file random-seed)
 
-  $ hg locate 'set:(**.py or grep("^!#.*python")) - removed()' 2>/dev/null \
+  $ hg locate 'set:(**.py or grep("^#!.*python")) - removed()' 2>/dev/null \
   > | xargs pyflakes 2>/dev/null