commit:     b73bbf1be0c1ab600ffcbed704f0c331eb033dfe
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 30 06:47:12 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Aug  4 03:36:51 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b73bbf1b

tox: add pylint

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 setup.py | 16 ++++++++++++++++
 tox.ini  |  2 ++
 2 files changed, 18 insertions(+)

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

Reply via email to