diff options
author | Radostin Stoyanov <rstoyanov1@gmail.com> | 2017-08-03 14:13:02 +0100 |
---|---|---|
committer | Radostin Stoyanov <rstoyanov1@gmail.com> | 2017-08-03 14:27:40 +0100 |
commit | 3ec0454995dec97fb5fa1eceda93c59d33df3d0e (patch) | |
tree | ad8630d27ed09bd6e987df2418baccf404169dc3 /setup.py | |
parent | 6f5d1932c610f1bde6514ce2227dad5c1014ff42 (diff) | |
download | virt-bootstrap.git-3ec0454995dec97fb5fa1eceda93c59d33df3d0e.tar.gz virt-bootstrap.git-3ec0454995dec97fb5fa1eceda93c59d33df3d0e.tar.xz virt-bootstrap.git-3ec0454995dec97fb5fa1eceda93c59d33df3d0e.zip |
Use explicit import
Reduce the number of import statements and improve readability.
Update the unit tests to match these changes.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -9,9 +9,8 @@ based on setuptools. import codecs import os import sys -from subprocess import call -from setuptools import Command -from setuptools import setup +import subprocess +import setuptools def read(fname): @@ -23,7 +22,7 @@ def read(fname): return fobj.read() -class CheckPylint(Command): +class CheckPylint(setuptools.Command): """ Check python source files with pylint and pycodestyle. """ @@ -55,7 +54,7 @@ class CheckPylint(Command): print(">>> Running pycodestyle ...") cmd = "pycodestyle " - if (call(cmd + files, shell=True) != 0): + if (subprocess.call(cmd + files, shell=True) != 0): res = 1 print(">>> Running pylint ...") @@ -63,13 +62,13 @@ class CheckPylint(Command): if self.errors_only: args = "-E" cmd = "pylint %s --output-format=%s " % (args, format(output_format)) - if (call(cmd + files, shell=True) != 0): + if (subprocess.call(cmd + files, shell=True) != 0): res = 1 sys.exit(res) -setup( +setuptools.setup( name='virt-bootstrap', version='0.1.0', author='Cedric Bosdonnat', |