diff options
author | Shreenidhi Shedi <53473811+sshedi@users.noreply.github.com> | 2021-09-01 19:53:55 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 09:23:55 -0500 |
commit | 58c2de4c97de6cfa6edbf5319641f2ef71284895 (patch) | |
tree | 3f8806eeb1e61a408f85f48b9a07d85b981acf50 /setup.py | |
parent | 76cff793840be63a69a74293170122c189ebaead (diff) | |
download | vyos-cloud-init-58c2de4c97de6cfa6edbf5319641f2ef71284895.tar.gz vyos-cloud-init-58c2de4c97de6cfa6edbf5319641f2ef71284895.zip |
Fix `make style-check` errors (#1000)
Using flake8 inplace of pyflakes
Renamed run-pyflakes -> run-flake8
Changed target name to flake8 in Makefile
With pyflakes we can't suppress warnings/errors in few required places.
flake8 is flexible in that regard. Hence using flake8 seems to be a
better choice here.
flake8 does the job of pep8 anyway.
So, removed pep8 target from Makefile along with tools/run-pep8 script.
Included setup.py in flake8 checks
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -28,9 +28,11 @@ import subprocess RENDERED_TMPD_PREFIX = "RENDERED_TEMPD" VARIANT = None + def is_f(p): return os.path.isfile(p) + def is_generator(p): return '-generator' in p @@ -111,6 +113,7 @@ def render_tmpl(template, mode=None): # return path relative to setup.py return os.path.join(os.path.basename(tmpd), bname) + # User can set the variant for template rendering if '--distro' in sys.argv: idx = sys.argv.index('--distro') @@ -166,7 +169,7 @@ elif os.path.isfile('/etc/system-release-cpe'): with open('/etc/system-release-cpe') as f: cpe_data = f.read().rstrip().split(':') - if cpe_data[1] == "\o": + if cpe_data[1] == "\o": # noqa: W605 # URI formated CPE inc = 0 else: @@ -216,7 +219,8 @@ class InitsysInstallData(install): if self.init_system and isinstance(self.init_system, str): self.init_system = self.init_system.split(",") - if len(self.init_system) == 0 and not platform.system().endswith('BSD'): + if (len(self.init_system) == 0 and + not platform.system().endswith('BSD')): self.init_system = ['systemd'] bad = [f for f in self.init_system if f not in INITSYS_TYPES] |