Package: pyflakes Version: 0.8.1-1 Severity: normal Usertags: check-all-the-things
As you can see below, pyflakes and pyflakes3 don't pay attention to shebangs, leading to invalid syntax errors. This makes both of them harder to use since you have to check the current directory for what kind of Python scripts are present and only pass those ones to pyflakes. pabs@chianamo ~/tmp-test-pyflakes-pyflakes3 $ head *.py ==> bar2.py <== #!/usr/bin/env python2 print 'foo' ==> bar3.py <== #!/usr/bin/env python3 nonlocal foo ==> bar.py <== #!/usr/bin/env python print 'foo' ==> foo2.py <== #!/usr/bin/python2 print 'foo' ==> foo3.py <== #!/usr/bin/python3 nonlocal foo ==> foo.py <== #!/usr/bin/python print 'foo' pabs@chianamo ~/tmp-test-pyflakes-pyflakes3 $ pyflakes . ./foo3.py:2:12: invalid syntax nonlocal foo ^ ./bar3.py:2:12: invalid syntax nonlocal foo ^ pabs@chianamo ~/tmp-test-pyflakes-pyflakes3 $ pyflakes3 . ./bar2.py:2:11: invalid syntax print 'foo' ^ ./bar.py:2:11: invalid syntax print 'foo' ^ ./foo.py:2:11: invalid syntax print 'foo' ^ ./foo2.py:2:11: invalid syntax print 'foo' ^ -- System Information: Debian Release: 8.0 APT prefers testing APT policy: (900, 'testing'), (890, 'buildd-testing-proposed-updates'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental'), (690, 'buildd-experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages pyflakes depends on: ii python-pkg-resources 5.5.1-1 ii python2.7 2.7.9-2 ii python3 3.4.2-2 ii python3-pkg-resources 5.5.1-1 pn python3:any <none> pn python:any <none> pyflakes recommends no packages. pyflakes suggests no packages. -- no debconf information -- bye, pabs https://wiki.debian.org/PaulWise
signature.asc
Description: This is a digitally signed message part