changeset 2121:01ee3e155726

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.)
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 16 Mar 2017 21:16:57 -0400
parents e38156312410
children efc6633e78e1
files tests/test-check-flake8.t tests/test-check-pyflakes.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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