aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-07-29 23:47:12 -0700
committerZac Medico <zmedico@gentoo.org>2020-08-03 20:36:51 -0700
commitb73bbf1be0c1ab600ffcbed704f0c331eb033dfe (patch)
treeffaa48cce812c7a770589643f0a3baf2b1b6e601
parentpylintrc: turn on checks for reimported modules (diff)
downloadportage-b73bbf1be0c1ab600ffcbed704f0c331eb033dfe.tar.gz
portage-b73bbf1be0c1ab600ffcbed704f0c331eb033dfe.tar.bz2
portage-b73bbf1be0c1ab600ffcbed704f0c331eb033dfe.zip
tox: add pylint
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rwxr-xr-xsetup.py16
-rw-r--r--tox.ini2
2 files changed, 18 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index bef5c31fa..1c25b9cd7 100755
--- a/setup.py
+++ b/setup.py
@@ -606,6 +606,21 @@ class test(Command):
])
+class lint(Command):
+ """ run lint """
+
+ user_options = []
+
+ def initialize_options(self):
+ pass
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ subprocess.check_call(['pylint', 'lib'])
+
+
def find_packages():
for dirpath, _dirnames, filenames in os.walk('lib'):
if '__init__.py' in filenames:
@@ -706,6 +721,7 @@ setup(
'install_scripts_sbin': x_install_scripts_sbin,
'sdist': x_sdist,
'test': test,
+ 'lint': lint,
},
classifiers = [
diff --git a/tox.ini b/tox.ini
index 050a2c455..7497f4660 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,11 +4,13 @@ skipsdist = True
[testenv]
deps =
+ pylint
pygost
pyyaml
py36,py37,py38,py39,pypy3: lxml!=4.2.0
setenv =
PYTHONPATH={toxinidir}/lib
commands =
+ python -b -Wd setup.py lint
python -b -Wd setup.py test
python -b -Wd repoman/setup.py test