diff --git a/.pylintrc b/.pylintrc index d70a59273..4c64f485e 100644 --- a/.pylintrc +++ b/.pylintrc @@ -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 diff --git a/scripts/dev/pylint_checkers/__init__.py b/scripts/dev/pylint_checkers/qute_pylint/__init__.py similarity index 100% rename from scripts/dev/pylint_checkers/__init__.py rename to scripts/dev/pylint_checkers/qute_pylint/__init__.py diff --git a/scripts/dev/pylint_checkers/config.py b/scripts/dev/pylint_checkers/qute_pylint/config.py similarity index 100% rename from scripts/dev/pylint_checkers/config.py rename to scripts/dev/pylint_checkers/qute_pylint/config.py diff --git a/scripts/dev/pylint_checkers/modeline.py b/scripts/dev/pylint_checkers/qute_pylint/modeline.py similarity index 100% rename from scripts/dev/pylint_checkers/modeline.py rename to scripts/dev/pylint_checkers/qute_pylint/modeline.py diff --git a/scripts/dev/pylint_checkers/openencoding.py b/scripts/dev/pylint_checkers/qute_pylint/openencoding.py similarity index 100% rename from scripts/dev/pylint_checkers/openencoding.py rename to scripts/dev/pylint_checkers/qute_pylint/openencoding.py diff --git a/scripts/dev/pylint_checkers/settrace.py b/scripts/dev/pylint_checkers/qute_pylint/settrace.py similarity index 100% rename from scripts/dev/pylint_checkers/settrace.py rename to scripts/dev/pylint_checkers/qute_pylint/settrace.py diff --git a/scripts/dev/pylint_checkers/setup.py b/scripts/dev/pylint_checkers/setup.py new file mode 100644 index 000000000..b1a4ede88 --- /dev/null +++ b/scripts/dev/pylint_checkers/setup.py @@ -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']) diff --git a/scripts/dev/run_pylint_on_tests.py b/scripts/dev/run_pylint_on_tests.py index cb1e9e1db..01dd14ad7 100644 --- a/scripts/dev/run_pylint_on_tests.py +++ b/scripts/dev/run_pylint_on_tests.py @@ -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, ] diff --git a/tox.ini b/tox.ini index 166e877b1..40da3f154 100644 --- a/tox.ini +++ b/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