public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Harald Seiler <hws@denx.de>
To: isar-users@googlegroups.com
Subject: [PATCH v2 5/5] Fix python style
Date: Tue, 12 Feb 2019 17:56:37 +0100	[thread overview]
Message-ID: <20190212165637.19970-6-hws@denx.de> (raw)
In-Reply-To: <20190212165637.19970-1-hws@denx.de>

Signed-off-by: Harald Seiler <hws@denx.de>
---
 meta-isar/recipes-kernel/example-module/example-module.bb | 8 +++++++-
 meta/classes/base.bbclass                                 | 2 +-
 meta/classes/isar-events.bbclass                          | 1 -
 meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb   | 9 ++++++---
 meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb | 5 +++--
 5 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/meta-isar/recipes-kernel/example-module/example-module.bb b/meta-isar/recipes-kernel/example-module/example-module.bb
index b725416..a08a6c5 100644
--- a/meta-isar/recipes-kernel/example-module/example-module.bb
+++ b/meta-isar/recipes-kernel/example-module/example-module.bb
@@ -11,7 +11,13 @@
 # has hard dependencies from linux-compiler-gcc-4.8-arm, what
 # conflicts with the host binaries.
 python() {
-    if d.getVar('KERNEL_NAME') in ['armmp', 'arm64', 'rpi-rpfv', 'amd64', '686-pae']:
+    if d.getVar('KERNEL_NAME') in [
+        'armmp',
+        'arm64',
+        'rpi-rpfv',
+        'amd64',
+        '686-pae',
+    ]:
         d.setVar('ISAR_CROSS_COMPILE', '0')
 }
 
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 4dea51b..eebcfe3 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -125,7 +125,7 @@ python() {
     src_apt = []
     for u in src_uri:
         if u.startswith(prefix):
-            src_apt.append(u[len(prefix):])
+            src_apt.append(u[len(prefix) :])
         else:
             new_src_uri.append(u)
 
diff --git a/meta/classes/isar-events.bbclass b/meta/classes/isar-events.bbclass
index a178d05..7dd1ed5 100644
--- a/meta/classes/isar-events.bbclass
+++ b/meta/classes/isar-events.bbclass
@@ -8,7 +8,6 @@ addhandler isar_handler
 
 python isar_handler() {
     import subprocess
-    import bb.runqueue
 
     tmpdir = d.getVar('TMPDIR', True)
     if not tmpdir:
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
index a793585..08b068f 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
@@ -29,13 +29,16 @@ do_apt_config_prepare[vardeps] += "\
 python do_apt_config_prepare() {
     if not os.path.islink(d.getVar("DEPLOY_ISAR_BOOTSTRAP", True)):
         apt_preferences_out = d.getVar("APTPREFS", True)
-        apt_preferences_list = (d.getVar("HOST_DISTRO_APT_PREFERENCES", True) or ""
-                             ).split()
+        apt_preferences_list = (
+            d.getVar("HOST_DISTRO_APT_PREFERENCES", True) or ""
+        ).split()
         aggregate_files(d, apt_preferences_list, apt_preferences_out)
 
         apt_sources_out = d.getVar("APTSRCS", True)
         apt_sources_init_out = d.getVar("APTSRCS_INIT", True)
-        apt_sources_list = (d.getVar("HOST_DISTRO_APT_SOURCES", True) or "").split()
+        apt_sources_list = (
+            d.getVar("HOST_DISTRO_APT_SOURCES", True) or ""
+        ).split()
 
         aggregate_files(d, apt_sources_list, apt_sources_init_out)
         aggregate_aptsources_list(d, apt_sources_list, apt_sources_out)
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb
index bec6fa8..79f3e34 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb
@@ -28,8 +28,9 @@ do_apt_config_prepare[vardeps] += "\
 python do_apt_config_prepare() {
     if not os.path.islink(d.getVar("DEPLOY_ISAR_BOOTSTRAP", True)):
         apt_preferences_out = d.getVar("APTPREFS", True)
-        apt_preferences_list = (d.getVar("DISTRO_APT_PREFERENCES", True) or ""
-                             ).split()
+        apt_preferences_list = (
+            d.getVar("DISTRO_APT_PREFERENCES", True) or ""
+        ).split()
         aggregate_files(d, apt_preferences_list, apt_preferences_out)
 
         apt_sources_out = d.getVar("APTSRCS", True)
-- 
2.14.1


  parent reply	other threads:[~2019-02-12 16:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 16:56 [PATCH v2 0/5] Python refactoring Harald Seiler
2019-02-12 16:56 ` [PATCH v2 1/5] Remove all uses of subprocess.call(shell=True) Harald Seiler
2019-02-12 16:56 ` [PATCH v2 2/5] Use modern python formatting Harald Seiler
2019-02-12 16:56 ` [PATCH v2 3/5] image: Remove recursion in get_image_name Harald Seiler
2019-02-12 16:56 ` [PATCH v2 4/5] wic: Refactor fakeroot script Harald Seiler
2019-02-12 16:56 ` Harald Seiler [this message]
2019-02-12 17:14 ` [PATCH v2 0/5] Python refactoring Henning Schild
2019-02-18 13:29 ` Maxim Yu. Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190212165637.19970-6-hws@denx.de \
    --to=hws@denx.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox