mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
use tox to run pylint
Also allow pylint to be run from a virtualenv
This commit is contained in:
parent
6166ff6b78
commit
44aaac1d33
5 changed files with 14 additions and 5 deletions
|
@ -10,3 +10,4 @@ git+https://github.com/saltstack/pytest-salt.git@master#egg=pytest-salt
|
|||
# satisfy other requirements, and httpretty 0.8.10 has bugs in setup.py that
|
||||
# prevent it from being successfully installed (at least on Python 3.4).
|
||||
httpretty; python_version >= '3.4'
|
||||
pylint==1.6.5
|
||||
|
|
|
@ -210,7 +210,7 @@ import tornado
|
|||
TORNADO_50 = tornado.version_info >= (5,)
|
||||
|
||||
if not TORNADO_50:
|
||||
import zmq.eventloop.ioloop
|
||||
import zmq.eventloop.ioloop # pylint: disable=import-error
|
||||
# instantiate the zmq IOLoop (specialized poller)
|
||||
zmq.eventloop.ioloop.install()
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
# pylint: disable=blacklisted-module
|
||||
from distutils.version import StrictVersion as _StrictVersion
|
||||
from distutils.version import LooseVersion as _LooseVersion
|
||||
from distutils.version import StrictVersion as _StrictVersion # pylint: disable=no-name-in-module
|
||||
from distutils.version import LooseVersion as _LooseVersion # pylint: disable=no-name-in-module
|
||||
# pylint: enable=blacklisted-module
|
||||
|
||||
# Import 3rd-party libs
|
||||
|
|
2
setup.py
2
setup.py
|
@ -366,7 +366,7 @@ class DownloadWindowsDlls(Command):
|
|||
import pip
|
||||
# pip has moved many things to `_internal` starting with pip 10
|
||||
if LooseVersion(pip.__version__) < LooseVersion('10.0'):
|
||||
from pip.utils.logging import indent_log
|
||||
from pip.utils.logging import indent_log # pylint: disable=no-name-in-module
|
||||
else:
|
||||
from pip._internal.utils.logging import indent_log # pylint: disable=no-name-in-module
|
||||
platform_bits, _ = platform.architecture()
|
||||
|
|
10
tox.ini
10
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py27,py34,py35,py36
|
||||
envlist = py27,py34,py35,py36,pylint
|
||||
skip_missing_interpreters = True
|
||||
skipsdist = True
|
||||
|
||||
|
@ -9,6 +9,14 @@ commands = pytest --rootdir {toxinidir} {posargs}
|
|||
passenv = LANG HOME
|
||||
sitepackages = True
|
||||
|
||||
[testenv:pylint]
|
||||
basepython = python2.7
|
||||
deps = -r{toxinidir}/requirements/dev.txt
|
||||
commands =
|
||||
pylint --rcfile=.testing.pylintrc --disable=W1307,str-format-in-logging setup.py salt/
|
||||
pylint --rcfile=.testing.pylintrc --disable=W0232,E1002,W1307,str-format-in-logging tests/
|
||||
sitepackages = False
|
||||
|
||||
[pytest]
|
||||
addopts = --log-file /tmp/salt-runtests.log --no-print-logs --ssh-tests -ra -sv
|
||||
testpaths = tests
|
||||
|
|
Loading…
Add table
Reference in a new issue