gecko-dev/tools/lint/python
Andrew Halberstadt eced3471fc Bug 1436639 - [lint] Make sure flake8 is run with same python as |mach lint| was, r=jmaher
This fixes a bug which can happen when the default version of python differs from
the version of python used with mach.

For example, mach explicitly looks for python2.7. This means running |mach lint -l flake8|
should also run flake8 with version 2.7. But if the default is python3, and flake8 is also
installed there, the subprocess call that invokes flake8 will run under python3. This can
lead to errors like "undefined name 'basestring'" and other 2to3 gotchas.

This patch ensures that we run:
python2.7 -m flake8

which explicitly runs flake8 against the same interpreter as mach, no matter the default.

MozReview-Commit-ID: HSuMzDsAvsW

--HG--
extra : rebase_source : d39f97ed0f82f4d2c81f044ef1f7dad0953a3d8d
2018-02-07 23:28:33 -05:00
..
__init__.py
check_compat.py
compat.py Bug 1398765 - Fix directory exclusion bug in py-compat linters, r=gps 2017-09-11 09:03:53 -04:00
flake8.py Bug 1436639 - [lint] Make sure flake8 is run with same python as |mach lint| was, r=jmaher 2018-02-07 23:28:33 -05:00
flake8_requirements.txt Bug 1434430 - [flake8] Upgrade version of flake8 used by |mach lint| to 3.5.0 r=rwood 2018-01-30 16:43:10 -05:00