Kaynağa Gözat

Fix python style

Signed-off-by: Harald Seiler <hws@denx.de>
Harald Seiler 6 yıl önce
ebeveyn
işleme
978fbc0579

+ 7 - 1
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')
 }
 

+ 1 - 1
meta/classes/base.bbclass

@@ -126,7 +126,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)
 

+ 0 - 1
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:

+ 6 - 3
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)

+ 3 - 2
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)