Move pylint plugins to an installed package.
This means we can now run things like running pylint --version without having to set PYTHONPATH correctly now. When using skip_install=true, the plugins wouldn't work as they need to import qutebrowser. We have to keep setting PYTHONPATH in run_pylint_on_tests.py, otherwise we get this error I don't quite understand: F: 1, 0: error while code parsing: Unable to load file '/home/florian/proj/qutebrowser/git/__init__.py' ([Errno 2] No such file or directory: '...') (parse-error)
This commit is contained in:
parent
67b9904772
commit
0b362e76ea
@ -3,10 +3,10 @@
|
||||
[MASTER]
|
||||
ignore=resources.py
|
||||
extension-pkg-whitelist=PyQt5,sip
|
||||
load-plugins=pylint_checkers.config,
|
||||
pylint_checkers.modeline,
|
||||
pylint_checkers.openencoding,
|
||||
pylint_checkers.settrace
|
||||
load-plugins=qute_pylint.config,
|
||||
qute_pylint.modeline,
|
||||
qute_pylint.openencoding,
|
||||
qute_pylint.settrace
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
enable=all
|
||||
|
4
scripts/dev/pylint_checkers/setup.py
Normal file
4
scripts/dev/pylint_checkers/setup.py
Normal file
@ -0,0 +1,4 @@
|
||||
# This is only here so we can install those plugins in tox.ini easily.
|
||||
|
||||
from setuptools import setup
|
||||
setup(name='qute_pylint', packages=['qute_pylint'])
|
@ -60,7 +60,7 @@ def main():
|
||||
]
|
||||
|
||||
toxinidir = sys.argv[1]
|
||||
pythonpath = os.environ['PYTHONPATH'].split(os.pathsep) + [
|
||||
pythonpath = os.environ.get('PYTHONPATH', '').split(os.pathsep) + [
|
||||
toxinidir,
|
||||
]
|
||||
|
||||
|
6
tox.ini
6
tox.ini
@ -122,8 +122,6 @@ commands =
|
||||
[testenv:pylint]
|
||||
basepython = python3
|
||||
ignore_errors = true
|
||||
skip_install = true
|
||||
setenv = PYTHONPATH={toxinidir}/scripts/dev
|
||||
passenv =
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
@ -131,6 +129,7 @@ deps =
|
||||
astroid==1.4.4
|
||||
pylint==1.5.4
|
||||
requests==2.9.1
|
||||
./scripts/dev/pylint_checkers
|
||||
commands =
|
||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||
{envpython} -m pylint scripts qutebrowser --output-format=colorized --reports=no
|
||||
@ -138,14 +137,13 @@ commands =
|
||||
|
||||
[testenv:pylint-tip]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
setenv = {[testenv:pylint]setenv}
|
||||
passenv = {[testenv:pylint]passenv}
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
{[testenv:misc]deps}
|
||||
hg+https://bitbucket.org/logilab/astroid
|
||||
hg+https://bitbucket.org/logilab/pylint
|
||||
./scripts/dev/pylint_checkers
|
||||
commands =
|
||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||
{envpython} -m pylint scripts qutebrowser --output-format=colorized --reports=no
|
||||
|
Loading…
Reference in New Issue
Block a user