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.)
--- 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