msherry / flycheck-pycheckers

Multiple syntax checker for Python in Emacs, using Flycheck
GNU General Public License v3.0
63 stars 23 forks source link

Feature More support for Python 3 and mixed Python 2, 2+3 and 3 #25

Closed bennygomspace closed 10 months ago

bennygomspace commented 5 years ago

Stuff relevant primary during migration to Python 3 added

Autodection is only active if enabled via arg --py23-autodetect or PY23_AUTODETECT = 1 in config file

sorennohr commented 5 years ago

##################################### Subject: Review of flycheck-pycheckers pull #25 Hi Marc

https://github.com/msherry/flycheck-pycheckers/pull/25

Unfortunate Benny can't make the changes. If you can make the changes, it will be great!

It's fine with us to:

Auto-detection 1st line The auto detection if the first line is a simple matching for both

!/path/to/pythonX and #!/usr/bin/env pythonX - any other pythonX

where X can be empty, 2 or 3. The check is made simple, so bad #! formatted lines are recognized.

py:

The # py: was not found elsewhere, actually we have not found any checking-help for python2-> 2+3 or 3 migration. (2to3 and futurize can modify the code but not show mistakes (well)).

The background was: Space after # to let checkers be happy (some rules claims if space after # is missing) py: Just a short identifier

could be stricter checking, but a simple search for 2 and 3