[elbe-devel] [PATCH 5/9] pylint elbeproject: fix styleproblems
Torben Hohn
torben.hohn at linutronix.de
Wed Nov 28 17:29:00 CET 2018
pycodestyle complains:
elbepack/elbeproject.py|81 col 18| E201 whitespace after '{'
elbepack/elbeproject.py|90 col 17| E124 closing bracket does not match visual indentation
elbepack/elbeproject.py|239 col 5| E303 too many blank lines (2)
elbepack/elbeproject.py|268 col 80| E501 line too long (96 > 79 characters)
elbepack/elbeproject.py|269 col 21| E128 continuation line under-indented for visual indent
elbepack/elbeproject.py|300 col 5| E303 too many blank lines (2)
elbepack/elbeproject.py|313 col 59| E127 continuation line over-indented for visual indent
elbepack/elbeproject.py|338 col 5| E303 too many blank lines (2)
elbepack/elbeproject.py|343 col 24| E211 whitespace before '('
elbepack/elbeproject.py|361 col 5| E303 too many blank lines (2)
elbepack/elbeproject.py|361 col 80| E501 line too long (81 > 79 characters)
elbepack/elbeproject.py|371 col 21| E128 continuation line under-indented for visual indent
elbepack/elbeproject.py|374 col 21| E128 continuation line under-indented for visual indent
elbepack/elbeproject.py|376 col 80| E501 line too long (80 > 79 characters)
elbepack/elbeproject.py|387 col 13| E303 too many blank lines (2)
elbepack/elbeproject.py|639 col 18| E225 missing whitespace around operator
fix em.
---
elbepack/elbeproject.py | 48 +++++++++++++++++++++++-------------------------
1 file changed, 23 insertions(+), 25 deletions(-)
diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 1f004b77..709d9cb0 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -78,16 +78,16 @@ def gen_sdk_scripts(triplet, prj_name, prj_version, builddir, sdkpath):
prj_version = prj_version.replace(" ", "_")
# generate the setup script
- sdkvalues = { 'sdk_arch': 'x86_64',
- 'sdk_gcc_ver': '',
- 'sdk_path': '/opt/elbe-sdk-%s-%s-%s' % (triplet,
- prj_name,
- prj_version),
- 'sdk_ext_path': '~/elbe-sdk',
- 'real_multimach_target_sys': triplet,
- 'sdk_title': 'ELBE %s' % prj_name,
- 'sdk_version': prj_version,
- }
+ sdkvalues = {'sdk_arch': 'x86_64',
+ 'sdk_gcc_ver': '',
+ 'sdk_path': '/opt/elbe-sdk-%s-%s-%s' % (triplet,
+ prj_name,
+ prj_version),
+ 'sdk_ext_path': '~/elbe-sdk',
+ 'real_multimach_target_sys': triplet,
+ 'sdk_title': 'ELBE %s' % prj_name,
+ 'sdk_version': prj_version}
+
sdkname = 'setup-elbe-sdk-%s-%s-%s.sh' % (triplet, prj_name, prj_version)
write_pack_template(os.path.join(builddir, sdkname),
'toolchain-shar-extract.sh.mako',
@@ -235,7 +235,6 @@ class ElbeProject (object):
return paths
-
def build_sysroot(self):
self.log.do('rm -rf %s; mkdir "%s"' % (self.sysrootpath,
@@ -265,8 +264,9 @@ class ElbeProject (object):
raise AptCacheUpdateError(e)
try:
- self.get_rpcaptcache(env=self.sysrootenv).mark_install_devpkgs(set(ignore_pkgs),
- set(ignore_dev_pkgs))
+ self.get_rpcaptcache(
+ env=self.sysrootenv).mark_install_devpkgs(
+ set(ignore_pkgs), set(ignore_dev_pkgs))
except SystemError as e:
self.log.printo("mark install devpkgs failed: %s" % str(e))
try:
@@ -296,7 +296,6 @@ class ElbeProject (object):
self.log.do("tar cfJ %s/sysroot.tar.xz -C %s -T %s" %
(self.builddir, self.sysrootpath, sysrootfilelist))
-
def build_sdk(self):
triplet = self.xml.defs["triplet"]
@@ -310,7 +309,7 @@ class ElbeProject (object):
sdktargetpath = os.path.join(self.sdkpath, "sysroots", "target")
self.log.do("mkdir -p %s" % sdktargetpath)
self.log.do("tar xJf %s/sysroot.tar.xz -C %s" % (self.builddir,
- sdktargetpath))
+ sdktargetpath))
# build host sysroot including cross compiler
hostsysrootpath = os.path.join(self.sdkpath, 'sysroots', 'host')
self.log.do('mkdir -p "%s"' % hostsysrootpath)
@@ -334,13 +333,12 @@ class ElbeProject (object):
self.log.do("cd %s; chmod +x %s" % (self.builddir, n))
self.log.do("cd %s; rm sdk.txz" % self.builddir)
-
def pbuild(self, p):
self.pdebuild_init()
src_path = os.path.join(self.builddir, "pdebuilder", "current")
src_uri = p.text('.').replace("LOCALMACHINE", "10.0.2.2").strip()
- self.log.printo ("retrieve pbuild sources: %s" % src_uri)
+ self.log.printo("retrieve pbuild sources: %s" % src_uri)
if p.tag == 'git':
self.log.do("git clone %s %s" % (src_uri, src_path))
try:
@@ -357,8 +355,8 @@ class ElbeProject (object):
# pdebuild_build(-1) means use all cpus
self.pdebuild_build(cpuset=-1)
-
- def build_cdroms(self, build_bin=True, build_sources=False, cdrom_size=None):
+ def build_cdroms(self, build_bin=True,
+ build_sources=False, cdrom_size=None):
self.repo_images = []
elog = ASCIIDocLog(self.validationpath, True)
@@ -368,13 +366,14 @@ class ElbeProject (object):
if os.path.exists(self.sysrootpath):
sysrootstr = "(including sysroot packages)"
env = BuildEnv(self.xml, self.log, self.sysrootpath,
- build_sources=build_sources, clean=False)
+ build_sources=build_sources, clean=False)
else:
env = BuildEnv(self.xml, self.log, self.chrootpath,
- build_sources=build_sources, clean=False)
+ build_sources=build_sources, clean=False)
- # ensure the /etc/apt/sources.list is created according to buil_sources,
- # build_bin flag, ensure to reopen it with the new 'sources.list'
+ # ensure the /etc/apt/sources.list is created according to
+ # buil_sources, # build_bin flag, ensure to reopen it with
+ # the new 'sources.list'
with env:
env.seed_etc()
@@ -383,7 +382,6 @@ class ElbeProject (object):
with env:
init_codename = self.xml.get_initvm_codename()
-
if build_bin:
elog.h1("Binary CD %s" % sysrootstr)
@@ -636,7 +634,7 @@ class ElbeProject (object):
# this might be useful, when things like java dont
# work with multithreading
#
- if cpuset!=-1:
+ if cpuset != -1:
cpuset_cmd = 'taskset %d ' % cpuset
else:
# cpuset == -1 means empty cpuset_cmd
--
2.11.0
More information about the elbe-devel
mailing list