All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] PEP8 double aggressive E401
@ 2021-06-28  5:59 Khem Raj
  2021-06-28  5:59 ` [PATCH 2/8] PEP8 double aggressive E701, E70 and E502 Khem Raj
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Khem Raj @ 2021-06-28  5:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: persianpros, Khem Raj

From: persianpros <persianpros@yahoo.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/lib/oe/package.py                                |  9 +++++++--
 meta/lib/oe/qa.py                                     |  4 +++-
 meta/lib/oe/utils.py                                  |  6 ++++--
 meta/lib/oeqa/oetest.py                               |  4 +++-
 meta/lib/oeqa/sdk/case.py                             |  3 ++-
 meta/lib/oeqa/sdk/cases/buildlzip.py                  |  5 ++++-
 meta/lib/oeqa/sdk/cases/python.py                     |  3 ++-
 meta/lib/oeqa/sdk/testsdk.py                          |  3 ++-
 meta/lib/oeqa/selftest/cases/oelib/path.py            |  3 ++-
 meta/lib/oeqa/selftest/cases/package.py               |  7 +++++--
 meta/lib/oeqa/selftest/cases/runtime_test.py          |  3 ++-
 meta/lib/oeqa/utils/testexport.py                     |  6 +++++-
 .../texinfo-dummy-native/texinfo-dummy/template.py    |  4 +++-
 scripts/combo-layer                                   |  3 ++-
 scripts/contrib/patchreview.py                        | 11 ++++++++---
 scripts/lnr                                           |  3 ++-
 scripts/oe-pkgdata-browser                            |  5 ++++-
 .../pybootchartgui/tests/parser_test.py               |  7 ++++++-
 scripts/send-error-report                             |  3 ++-
 scripts/verify-bashisms                               |  9 +++++++--
 20 files changed, 75 insertions(+), 26 deletions(-)

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index dd700cbb0c..fc5408d5f8 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -107,7 +107,10 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d, qa_already_stripp
     :param qa_already_stripped: Set to True if already-stripped' in ${INSANE_SKIP}
     This is for proper logging and messages only.
     """
-    import stat, errno, oe.path, oe.utils
+    import stat
+    import errno
+    import oe.path
+    import oe.utils
 
     elffiles = {}
     inodes = {}
@@ -187,7 +190,9 @@ def file_translate(file):
     return ft
 
 def filedeprunner(arg):
-    import re, subprocess, shlex
+    import re
+    import subprocess
+    import shlex
 
     (pkg, pkgfiles, rpmdeps, pkgdest) = arg
     provides = {}
diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index e8a854a302..38c2e0cc1c 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -2,7 +2,9 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
-import os, struct, mmap
+import os
+import struct
+import mmap
 
 class NotELFFileError(Exception):
     pass
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index a84039f585..789bad33f6 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -376,7 +376,8 @@ def format_pkg_list(pkg_dict, ret_format=None):
 # Helper function to get the host compiler version
 # Do not assume the compiler is gcc
 def get_host_compiler_version(d, taskcontextonly=False):
-    import re, subprocess
+    import re
+    import subprocess
 
     if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
         return
@@ -404,7 +405,8 @@ def get_host_compiler_version(d, taskcontextonly=False):
 
 
 def host_gcc_version(d, taskcontextonly=False):
-    import re, subprocess
+    import re
+    import subprocess
 
     if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
         return
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 9c84466dd0..3136ac2ce5 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -9,7 +9,9 @@
 
 # It also has some helper functions and it's responsible for actually starting the tests
 
-import os, re, sys
+import os
+import re
+import sys
 import unittest
 import inspect
 import subprocess
diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
index c45882689c..86ac199197 100644
--- a/meta/lib/oeqa/sdk/case.py
+++ b/meta/lib/oeqa/sdk/case.py
@@ -35,7 +35,8 @@ class OESDKTestCase(OETestCase):
         OS/architecture, or if not specified the currently configured MACHINE's
         OS/architecture.
         """
-        import oe.qa, oe.elf
+        import oe.qa
+        import oe.elf
 
         if not target_os or not target_arch:
             output = self._run("echo $OECORE_TARGET_OS:$OECORE_TARGET_ARCH")
diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py b/meta/lib/oeqa/sdk/cases/buildlzip.py
index 49ae756bf3..04c4a0ec16 100644
--- a/meta/lib/oeqa/sdk/cases/buildlzip.py
+++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
@@ -2,7 +2,10 @@
 # SPDX-License-Identifier: MIT
 #
 
-import os, tempfile, subprocess, unittest
+import os
+import tempfile
+import subprocess
+import unittest
 from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
diff --git a/meta/lib/oeqa/sdk/cases/python.py b/meta/lib/oeqa/sdk/cases/python.py
index a334abce5f..2848481f33 100644
--- a/meta/lib/oeqa/sdk/cases/python.py
+++ b/meta/lib/oeqa/sdk/cases/python.py
@@ -2,7 +2,8 @@
 # SPDX-License-Identifier: MIT
 #
 
-import subprocess, unittest
+import subprocess
+import unittest
 from oeqa.sdk.case import OESDKTestCase
 
 from oeqa.utils.subprocesstweak import errors_have_output
diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
index 35e40187bc..18e03cb8ef 100644
--- a/meta/lib/oeqa/sdk/testsdk.py
+++ b/meta/lib/oeqa/sdk/testsdk.py
@@ -95,7 +95,8 @@ class TestSDK(TestSDKBase):
         processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or d.getVar("BB_NUMBER_THREADS")
         if processes:
             try:
-                import testtools, subunit
+                import testtools
+                import subunit
             except ImportError:
                 bb.warn("Failed to import testtools or subunit, the testcases will run serially")
                 processes = None
diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py b/meta/lib/oeqa/selftest/cases/oelib/path.py
index a1cfa08c09..098734fa5d 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/path.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
@@ -3,7 +3,8 @@
 #
 
 from unittest.case import TestCase
-import oe, oe.path
+import oe
+import oe.path
 import tempfile
 import os
 import errno
diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py
index 7166c3991f..82aa1bde1c 100644
--- a/meta/lib/oeqa/selftest/cases/package.py
+++ b/meta/lib/oeqa/selftest/cases/package.py
@@ -5,7 +5,8 @@
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake, get_bb_vars, get_bb_var, runqemu
 import stat
-import subprocess, os
+import subprocess
+import os
 import oe.path
 import re
 
@@ -150,7 +151,9 @@ class PackageTests(OESelftestTestCase):
                     self.fail('GDB %s failed' % binary)
 
     def test_preserve_ownership(self):
-        import os, stat, oe.cachedpath
+        import os
+        import stat
+        import oe.cachedpath
         features = 'IMAGE_INSTALL_append = " selftest-chown"\n'
         self.write_config(features)
         bitbake("core-image-minimal")
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index d0c2440722..54a80dfdc0 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -211,7 +211,8 @@ class TestImage(OESelftestTestCase):
         Product: oe-core
         Author: Alexander Kanavin <alex.kanavin@gmail.com>
         """
-        import subprocess, os
+        import subprocess
+        import os
         try:
             content = os.listdir("/dev/dri")
             if len([i for i in content if i.startswith('render')]) == 0:
diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py
index e89d130a9c..383e57a6b2 100644
--- a/meta/lib/oeqa/utils/testexport.py
+++ b/meta/lib/oeqa/utils/testexport.py
@@ -6,7 +6,11 @@
 
 # Provides functions to help with exporting binaries obtained from built targets
 
-import os, re, glob as g, shutil as sh,sys
+import os
+import re
+import glob as g
+import shutil as sh
+import sys
 from time import sleep
 from .commands import runCmd
 from difflib import SequenceMatcher as SM
diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
index 86c7c1811a..75c01b83bf 100644
--- a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
+++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
@@ -28,7 +28,9 @@
 # of the executable from argv[0] and emulate the corresponding program, so
 # multiple copies of this script will exist under different names.
 
-import sys, os, argparse
+import sys
+import os
+import argparse
 
 
 this_binary = sys.argv[0].split("/")[-1]
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 045de65642..835a6bcd09 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -11,7 +11,8 @@
 #
 
 import fnmatch
-import os, sys
+import os
+import sys
 import optparse
 import logging
 import subprocess
diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
index 62c509f51c..744dcfb49e 100755
--- a/scripts/contrib/patchreview.py
+++ b/scripts/contrib/patchreview.py
@@ -40,7 +40,8 @@ def blame_patch(patch):
                                     "--", patch)).decode("utf-8").splitlines()
 
 def patchreview(path, patches):
-    import re, os.path
+    import re
+    import os.path
 
     # General pattern: start of line, optional whitespace, tag with optional
     # hyphen or spaces, maybe a colon, some whitespace, then the value, all case
@@ -198,7 +199,9 @@ def histogram(results):
 
 
 if __name__ == "__main__":
-    import argparse, subprocess, os
+    import argparse
+    import subprocess
+    import os
 
     args = argparse.ArgumentParser(description="Patch Review Tool")
     args.add_argument("-b", "--blame", action="store_true", help="show blame for malformed patches")
@@ -213,7 +216,9 @@ if __name__ == "__main__":
     analyse(results, want_blame=args.blame, verbose=args.verbose)
 
     if args.json:
-        import json, os.path, collections
+        import json
+        import os.path
+        import collections
         if os.path.isfile(args.json):
             data = json.load(open(args.json))
         else:
diff --git a/scripts/lnr b/scripts/lnr
index a2ac4fec0f..e223b1e0e6 100755
--- a/scripts/lnr
+++ b/scripts/lnr
@@ -6,7 +6,8 @@
 # Create a *relative* symlink, just like ln --relative does but without needing
 # coreutils 8.16.
 
-import sys, os
+import sys
+import os
 
 if len(sys.argv) != 3:
    print("$ lnr TARGET LINK_NAME")
diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
index 8d223185a4..5834f59845 100755
--- a/scripts/oe-pkgdata-browser
+++ b/scripts/oe-pkgdata-browser
@@ -1,6 +1,9 @@
 #! /usr/bin/env python3
 
-import os, sys, enum, ast
+import os
+import sys
+import enum
+import ast
 
 scripts_path = os.path.dirname(os.path.realpath(__file__))
 lib_path = scripts_path + '/lib'
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
index 00fb3bf797..c005cf341f 100644
--- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
+++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
@@ -1,4 +1,9 @@
-import sys, os, re, struct, operator, math
+import sys
+import os
+import re
+import struct
+import operator
+import math
 from collections import defaultdict
 import unittest
 
diff --git a/scripts/send-error-report b/scripts/send-error-report
index cfbcaa52cb..ffa0a199b1 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -10,7 +10,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
-import urllib.request, urllib.error
+import urllib.request
+import urllib.error
 import sys
 import json
 import os
diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
index 14d8c298e9..a63f6c8115 100755
--- a/scripts/verify-bashisms
+++ b/scripts/verify-bashisms
@@ -3,7 +3,11 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
-import sys, os, subprocess, re, shutil
+import sys
+import os
+import subprocess
+import re
+import shutil
 
 whitelist = (
     # type is supported by dash
@@ -92,7 +96,8 @@ def get_tinfoil():
     return tinfoil
 
 if __name__=='__main__':
-    import argparse, shutil
+    import argparse
+    import shutil
 
     parser = argparse.ArgumentParser(description='Bashim detector for shell fragments in recipes.')
     parser.add_argument("recipes", metavar="RECIPE", nargs="*", help="recipes to check (if not specified, all will be checked)")
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/8] PEP8 double aggressive E701, E70 and E502
  2021-06-28  5:59 [PATCH 1/8] PEP8 double aggressive E401 Khem Raj
@ 2021-06-28  5:59 ` Khem Raj
  2021-06-28  5:59 ` [PATCH 3/8] PEP8 double aggressive E251 and E252 Khem Raj
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Khem Raj @ 2021-06-28  5:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: persianpros, Khem Raj

From: persianpros <persianpros@yahoo.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/lib/oe/buildhistory_analysis.py          |  4 +-
 meta/lib/oe/distro_check.py                   |  3 +-
 meta/lib/oe/gpg_sign.py                       |  2 +-
 meta/lib/oe/package_manager/__init__.py       | 11 +--
 meta/lib/oe/package_manager/deb/__init__.py   |  4 +-
 meta/lib/oe/package_manager/deb/rootfs.py     |  4 +-
 meta/lib/oe/package_manager/ipk/rootfs.py     |  4 +-
 meta/lib/oe/prservice.py                      |  2 +-
 meta/lib/oe/sdk.py                            |  2 +-
 meta/lib/oe/terminal.py                       |  3 +-
 meta/lib/oe/utils.py                          |  4 +-
 meta/lib/oeqa/core/case.py                    |  2 +-
 meta/lib/oeqa/core/context.py                 |  4 +-
 meta/lib/oeqa/core/decorator/data.py          |  2 +-
 meta/lib/oeqa/core/decorator/depends.py       |  6 +-
 meta/lib/oeqa/core/loader.py                  | 18 ++---
 meta/lib/oeqa/oetest.py                       |  4 +-
 meta/lib/oeqa/runtime/context.py              | 10 +--
 meta/lib/oeqa/sdk/case.py                     |  2 +-
 meta/lib/oeqa/sdk/cases/buildgalculator.py    |  2 +-
 meta/lib/oeqa/sdk/cases/gcc.py                |  2 +-
 meta/lib/oeqa/sdk/context.py                  |  8 +--
 meta/lib/oeqa/sdkext/case.py                  |  2 +-
 meta/lib/oeqa/sdkext/cases/devtool.py         |  2 +-
 meta/lib/oeqa/sdkext/testsdk.py               |  4 +-
 meta/lib/oeqa/selftest/case.py                |  8 +--
 meta/lib/oeqa/selftest/cases/manifest.py      | 38 ++++++-----
 meta/lib/oeqa/selftest/cases/wic.py           | 68 +++++++++----------
 meta/lib/oeqa/selftest/context.py             |  4 +-
 meta/lib/oeqa/utils/__init__.py               |  8 +--
 meta/lib/oeqa/utils/testexport.py             |  6 +-
 meta/recipes-rt/rt-tests/files/rt_bmark.py    |  2 +-
 scripts/bitbake-whatchanged                   |  4 +-
 scripts/combo-layer                           | 12 ++--
 scripts/lib/checklayer/__init__.py            |  4 +-
 scripts/lib/checklayer/cases/bsp.py           |  4 +-
 scripts/lib/checklayer/cases/common.py        |  4 +-
 scripts/lib/checklayer/cases/distro.py        |  4 +-
 scripts/lib/devtool/sdk.py                    |  4 +-
 scripts/lib/wic/engine.py                     |  6 +-
 scripts/lib/wic/filemap.py                    |  2 +-
 scripts/lib/wic/ksparser.py                   |  4 +-
 scripts/lib/wic/misc.py                       |  2 +-
 scripts/lib/wic/plugins/imager/direct.py      | 18 ++---
 scripts/lib/wic/plugins/source/bootimg-efi.py |  2 +-
 .../wic/plugins/source/bootimg-partition.py   |  2 +-
 .../wic/plugins/source/isoimage-isohybrid.py  | 10 +--
 scripts/oe-pkgdata-browser                    |  2 +-
 .../pybootchartgui/pybootchartgui/batch.py    |  2 +-
 scripts/pybootchartgui/pybootchartgui/draw.py | 62 ++++++++---------
 .../pybootchartgui/pybootchartgui/parsing.py  |  8 ++-
 .../pybootchartgui/pybootchartgui/samples.py  |  2 +-
 .../pybootchartgui/tests/parser_test.py       |  2 +-
 .../pybootchartgui/tests/process_tree_test.py |  2 +-
 scripts/relocate_sdk.py                       | 10 +--
 scripts/runqemu                               |  4 +-
 scripts/tiny/dirsize.py                       |  2 +-
 scripts/tiny/ksize.py                         |  8 +--
 scripts/tiny/ksum.py                          | 12 ++--
 scripts/yocto-check-layer                     |  6 +-
 60 files changed, 230 insertions(+), 219 deletions(-)

diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index b1856846b6..9869564e7f 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -89,9 +89,9 @@ class ChangeRecord:
         def detect_renamed_dirs(aitems, bitems):
             adirs = set(map(os.path.dirname, aitems))
             bdirs = set(map(os.path.dirname, bitems))
-            files_ab = [(name, sorted(os.path.basename(item) for item in aitems if os.path.dirname(item) == name)) \
+            files_ab = [(name, sorted(os.path.basename(item) for item in aitems if os.path.dirname(item) == name))
                                 for name in adirs - bdirs]
-            files_ba = [(name, sorted(os.path.basename(item) for item in bitems if os.path.dirname(item) == name)) \
+            files_ba = [(name, sorted(os.path.basename(item) for item in bitems if os.path.dirname(item) == name))
                                 for name in bdirs - adirs]
             renamed_dirs = []
             for dir1, files1 in files_ab:
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 88e46c354d..3daff5f547 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -69,7 +69,8 @@ def get_source_package_list_from_url_by_letter(url, section, d):
         try:
             packages |= get_source_package_list_from_url(url + "/" + letter, section, d)
         except HTTPError as e:
-            if e.code != 404: raise
+            if e.code != 404:
+                raise
     return packages
 
 def get_latest_released_fedora_source_package_list(d):
diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index 492f096eaa..d9045ecd94 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -82,7 +82,7 @@ class LocalSigner(object):
         try:
             if passphrase_file:
                 with open(passphrase_file) as fobj:
-                    passphrase = fobj.readline();
+                    passphrase = fobj.readline()
 
             job = subprocess.Popen(cmd, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
             (_, stderr) = job.communicate(passphrase.encode("utf-8"))
diff --git a/meta/lib/oe/package_manager/__init__.py b/meta/lib/oe/package_manager/__init__.py
index 4d22bc0296..1a039edda4 100644
--- a/meta/lib/oe/package_manager/__init__.py
+++ b/meta/lib/oe/package_manager/__init__.py
@@ -97,7 +97,7 @@ Details of the failure are in %s.""" %(pkgs, log_path))
 def generate_locale_archive(d, rootfs, target_arch, localedir):
     # Pretty sure we don't need this for locale archive generation but
     # keeping it to be safe...
-    locale_arch_options = { \
+    locale_arch_options = {
         "arc": ["--uint32-align=4", "--little-endian"],
         "arceb": ["--uint32-align=4", "--big-endian"],
         "arm": ["--uint32-align=4", "--little-endian"],
@@ -239,7 +239,8 @@ class PackageManager(object, metaclass=ABCMeta):
 
             try:
                 output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
-                if output: bb.note(output.decode("utf-8"))
+                if output:
+                    bb.note(output.decode("utf-8"))
             except subprocess.CalledProcessError as e:
                 bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
                 if populate_sdk == 'host':
@@ -331,7 +332,8 @@ class PackageManager(object, metaclass=ABCMeta):
             bb.note('Running %s' % cmd)
             proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
             stdout, stderr = proc.communicate()
-            if stderr: bb.note(stderr.decode("utf-8"))
+            if stderr:
+                bb.note(stderr.decode("utf-8"))
             pkgs = stdout.decode("utf-8")
             self.install(pkgs.split(), attempt_only=True)
         except subprocess.CalledProcessError as e:
@@ -390,7 +392,8 @@ class PackageManager(object, metaclass=ABCMeta):
                 bb.note('Running %s' % cmd)
                 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                 stdout, stderr = proc.communicate()
-                if stderr: bb.note(stderr.decode("utf-8"))
+                if stderr:
+                    bb.note(stderr.decode("utf-8"))
                 complementary_pkgs = stdout.decode("utf-8")
                 complementary_pkgs = set(complementary_pkgs.split())
                 skip_pkgs = sorted(complementary_pkgs & provided_pkgs)
diff --git a/meta/lib/oe/package_manager/deb/__init__.py b/meta/lib/oe/package_manager/deb/__init__.py
index a4b6b6f647..f877e6ea9a 100644
--- a/meta/lib/oe/package_manager/deb/__init__.py
+++ b/meta/lib/oe/package_manager/deb/__init__.py
@@ -419,7 +419,7 @@ class DpkgPM(OpkgDpkgPM):
                                    os.path.join(self.deploy_dir, arch))
 
         base_arch_list = base_archs.split()
-        multilib_variants = self.d.getVar("MULTILIB_VARIANTS");
+        multilib_variants = self.d.getVar("MULTILIB_VARIANTS")
         for variant in multilib_variants.split():
             localdata = bb.data.createCopy(self.d)
             variant_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + variant, False)
@@ -437,7 +437,7 @@ class DpkgPM(OpkgDpkgPM):
                     if match_arch:
                         for base_arch in base_arch_list:
                             architectures += "\"%s\";" % base_arch
-                        apt_conf.write("  Architectures {%s};\n" % architectures);
+                        apt_conf.write("  Architectures {%s};\n" % architectures)
                         apt_conf.write("  Architecture \"%s\";\n" % base_archs)
                     else:
                         line = re.sub(r"#ROOTFS#", self.target_rootfs, line)
diff --git a/meta/lib/oe/package_manager/deb/rootfs.py b/meta/lib/oe/package_manager/deb/rootfs.py
index 8fbaca11d6..56ed7e2359 100644
--- a/meta/lib/oe/package_manager/deb/rootfs.py
+++ b/meta/lib/oe/package_manager/deb/rootfs.py
@@ -81,8 +81,8 @@ class DpkgOpkgRootfs(Rootfs):
             for edge in graph[node]:
                 if edge not in resolved:
                     if edge in seen:
-                        raise RuntimeError("Packages %s and %s have " \
-                                "a circular dependency in postinsts scripts." \
+                        raise RuntimeError("Packages %s and %s have "
+                                "a circular dependency in postinsts scripts."
                                 % (node, edge))
                     _dep_resolve(graph, edge, resolved, seen)
 
diff --git a/meta/lib/oe/package_manager/ipk/rootfs.py b/meta/lib/oe/package_manager/ipk/rootfs.py
index 26dbee6f6a..077c061c91 100644
--- a/meta/lib/oe/package_manager/ipk/rootfs.py
+++ b/meta/lib/oe/package_manager/ipk/rootfs.py
@@ -82,8 +82,8 @@ class DpkgOpkgRootfs(Rootfs):
             for edge in graph[node]:
                 if edge not in resolved:
                     if edge in seen:
-                        raise RuntimeError("Packages %s and %s have " \
-                                "a circular dependency in postinsts scripts." \
+                        raise RuntimeError("Packages %s and %s have "
+                                "a circular dependency in postinsts scripts."
                                 % (node, edge))
                     _dep_resolve(graph, edge, resolved, seen)
 
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
index 15ce060ff6..a8d82783c4 100644
--- a/meta/lib/oe/prservice.py
+++ b/meta/lib/oe/prservice.py
@@ -82,7 +82,7 @@ def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
     with open(df, "a") as f:
         if metainfo:
             #dump column info
-            f.write("#PR_core_ver = \"%s\"\n\n" % metainfo['core_ver']);
+            f.write("#PR_core_ver = \"%s\"\n\n" % metainfo['core_ver'])
             f.write("#Table: %s\n" % metainfo['tbl_name'])
             f.write("#Columns:\n")
             f.write("#name      \t type    \t notn    \t dflt    \t pk\n")
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index 37b59afd1a..5e854b7c62 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -93,7 +93,7 @@ class Sdk(object, metaclass=ABCMeta):
             if linguas == "all":
                 pm.install_glob("nativesdk-glibc-binary-localedata-*.utf-8", sdk=True)
             else:
-                pm.install(["nativesdk-glibc-binary-localedata-%s.utf-8" % \
+                pm.install(["nativesdk-glibc-binary-localedata-%s.utf-8" %
                            lang for lang in linguas.split()])
             # Generate a locale archive of them
             target_arch = self.d.getVar('SDK_ARCH')
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 59aa80de66..80e76adc21 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -63,7 +63,8 @@ class Gnome(XTerminal):
         # https://bugzilla.gnome.org/show_bug.cgi?id=732127; as a workaround,
         # clearing the LC_ALL environment variable so it uses the locale.
         # Once fixed on the gnome-terminal project, this should be removed.
-        if os.getenv('LC_ALL'): os.putenv('LC_ALL','')
+        if os.getenv('LC_ALL'):
+            os.putenv('LC_ALL','')
 
         XTerminal.__init__(self, sh_cmd, title, env, d)
 
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 789bad33f6..c9b2be9dc3 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -391,7 +391,7 @@ def get_host_compiler_version(d, taskcontextonly=False):
         # datastore PATH does not contain session PATH as set by environment-setup-...
         # this breaks the install-buildtools use-case
         # env["PATH"] = d.getVar("PATH")
-        output = subprocess.check_output("%s --version" % compiler, \
+        output = subprocess.check_output("%s --version" % compiler,
                     shell=True, env=env, stderr=subprocess.STDOUT).decode("utf-8")
     except subprocess.CalledProcessError as e:
         bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))
@@ -418,7 +418,7 @@ def host_gcc_version(d, taskcontextonly=False):
     try:
         env = os.environ.copy()
         env["PATH"] = d.getVar("PATH")
-        output = subprocess.check_output("%s --version" % compiler, \
+        output = subprocess.check_output("%s --version" % compiler,
                     shell=True, env=env, stderr=subprocess.STDOUT).decode("utf-8")
     except subprocess.CalledProcessError as e:
         bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))
diff --git a/meta/lib/oeqa/core/case.py b/meta/lib/oeqa/core/case.py
index bc4446a938..0a8aff182e 100644
--- a/meta/lib/oeqa/core/case.py
+++ b/meta/lib/oeqa/core/case.py
@@ -14,7 +14,7 @@ def _validate_td_vars(td, td_vars, type_msg):
     if td_vars:
         for v in td_vars:
             if not v in td:
-                raise OEQAMissingVariable("Test %s need %s variable but"\
+                raise OEQAMissingVariable("Test %s need %s variable but"
                         " isn't into td" % (type_msg, v))
 
 class OETestCase(unittest.TestCase):
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index 2abe353d27..cb460f7496 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -144,7 +144,7 @@ class OETestContextExecutor(object):
         if self.default_cases:
             self.parser.add_argument('CASES_PATHS', action='store',
                     default=self.default_cases, nargs='*',
-                    help="paths to directories with test cases, default: %s"\
+                    help="paths to directories with test cases, default: %s"
                             % self.default_cases)
         else:
             self.parser.add_argument('CASES_PATHS', action='store',
@@ -153,7 +153,7 @@ class OETestContextExecutor(object):
         self.parser.set_defaults(func=self.run)
 
     def _setup_logger(self, logger, args):
-        formatter = logging.Formatter('%(asctime)s - ' + self.name + \
+        formatter = logging.Formatter('%(asctime)s - ' + self.name +
                 ' - %(levelname)s - %(message)s')
         sh = logger.handlers[0]
         sh.setFormatter(formatter)
diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py
index bc4939e87c..23555bc8d3 100644
--- a/meta/lib/oeqa/core/decorator/data.py
+++ b/meta/lib/oeqa/core/decorator/data.py
@@ -113,7 +113,7 @@ class OETestDataDepends(OETestDecorator):
             try:
                 value = self.case.td[v]
             except KeyError:
-                raise OEQAMissingVariable("Test case need %s variable but"\
+                raise OEQAMissingVariable("Test case need %s variable but"
                         " isn't into td" % v)
 
 @registerDecorator
diff --git a/meta/lib/oeqa/core/decorator/depends.py b/meta/lib/oeqa/core/decorator/depends.py
index 33f0841cab..eef5c8f7ab 100644
--- a/meta/lib/oeqa/core/decorator/depends.py
+++ b/meta/lib/oeqa/core/decorator/depends.py
@@ -37,7 +37,7 @@ def _validate_test_case_depends(cases, depends):
             continue
         for dep in depends[case]:
             if not dep in cases:
-                raise OEQADependency("TestCase %s depends on %s and isn't available"\
+                raise OEQADependency("TestCase %s depends on %s and isn't available"
                        ", cases available %s." % (case, dep, str(cases.keys())))
 
 def _order_test_case_by_depends(cases, depends):
@@ -46,7 +46,7 @@ def _order_test_case_by_depends(cases, depends):
         for edge in graph[node]:
             if edge not in resolved:
                 if edge in seen:
-                    raise OEQADependency("Test cases %s and %s have a circular" \
+                    raise OEQADependency("Test cases %s and %s have a circular"
                                        " dependency." % (node, edge))
                 _dep_resolve(graph, edge, resolved, seen)
         resolved.append(node)
@@ -73,7 +73,7 @@ def _skipTestDependency(case, depends):
                 found = True
                 break
         if not found:
-            raise SkipTest("Test case %s depends on %s but it didn't pass/run." \
+            raise SkipTest("Test case %s depends on %s but it didn't pass/run."
                         % (case.id(), dep))
 
 @registerDecorator
diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
index 11978213b8..df7cd5ecc2 100644
--- a/meta/lib/oeqa/core/loader.py
+++ b/meta/lib/oeqa/core/loader.py
@@ -106,7 +106,7 @@ class OETestLoader(unittest.TestLoader):
         def _handle(obj):
             if isinstance(obj, OETestDecorator):
                 if not obj.__class__ in decoratorClasses:
-                    raise Exception("Decorator %s isn't registered" \
+                    raise Exception("Decorator %s isn't registered"
                             " in decoratorClasses." % obj.__name__)
                 obj.bind(self.tc._registry, case)
 
@@ -217,11 +217,11 @@ class OETestLoader(unittest.TestLoader):
             Returns a suite of all tests cases contained in testCaseClass.
         """
         if issubclass(testCaseClass, unittest.suite.TestSuite):
-            raise TypeError("Test cases should not be derived from TestSuite." \
-                                " Maybe you meant to derive %s from TestCase?" \
+            raise TypeError("Test cases should not be derived from TestSuite."
+                                " Maybe you meant to derive %s from TestCase?"
                                 % testCaseClass.__name__)
         if not issubclass(testCaseClass, unittest.case.TestCase):
-            raise TypeError("Test %s is not derived from %s" % \
+            raise TypeError("Test %s is not derived from %s" %
                     (testCaseClass.__name__, unittest.case.TestCase.__name__))
 
         testCaseNames = self.getTestCaseNames(testCaseClass)
@@ -262,7 +262,7 @@ class OETestLoader(unittest.TestLoader):
                     break
 
             if not found:
-                raise OEQATestNotFound("Not found %s in loaded test cases" % \
+                raise OEQATestNotFound("Not found %s in loaded test cases" %
                         module)
 
     def discover(self):
@@ -300,14 +300,14 @@ class OETestLoader(unittest.TestLoader):
         # module list.
         # Underscore modules are loaded only if specified in module list.
         load_module = True if not module_name.startswith('_') \
-                              and (not self.modules \
-                                   or module_name in self.modules \
-                                   or module_name_small in self.modules \
+                              and (not self.modules
+                                   or module_name in self.modules
+                                   or module_name_small in self.modules
                                    or 'auto' in self.modules) \
                            else False
 
         load_underscore = True if module_name.startswith('_') \
-                                  and (module_name in self.modules or \
+                                  and (module_name in self.modules or
                                   module_name_small in self.modules) \
                                else False
 
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 3136ac2ce5..1f4993c9d5 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -145,8 +145,8 @@ def skipModule(reason, pos=2):
     if modname not in oeTest.tc.testsrequired:
         raise unittest.SkipTest("%s: %s" % (modname, reason))
     else:
-        raise Exception("\nTest %s wants to be skipped.\nReason is: %s" \
-                "\nTest was required in TEST_SUITES, so either the condition for skipping is wrong" \
+        raise Exception("\nTest %s wants to be skipped.\nReason is: %s"
+                "\nTest was required in TEST_SUITES, so either the condition for skipping is wrong"
                 "\nor the image really doesn't have the required feature/package when it should." % (modname, reason))
 
 def skipModuleIf(cond, reason):
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index 3826f27642..0ea67bee2f 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -62,15 +62,15 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 
         runtime_group.add_argument('--target-type', action='store',
                 default=self.default_target_type, choices=['simpleremote', 'qemu'],
-                help="Target type of device under test, default: %s" \
+                help="Target type of device under test, default: %s"
                 % self.default_target_type)
         runtime_group.add_argument('--target-ip', action='store',
                 default=self.default_target_ip,
-                help="IP address of device under test, default: %s" \
+                help="IP address of device under test, default: %s"
                 % self.default_target_ip)
         runtime_group.add_argument('--server-ip', action='store',
                 default=self.default_target_ip,
-                help="IP address of device under test, default: %s" \
+                help="IP address of device under test, default: %s"
                 % self.default_server_ip)
 
         runtime_group.add_argument('--host-dumper-dir', action='store',
@@ -78,12 +78,12 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 
         runtime_group.add_argument('--packages-manifest', action='store',
                 default=self.default_manifest,
-                help="Package manifest of the image under test, default: %s" \
+                help="Package manifest of the image under test, default: %s"
                 % self.default_manifest)
 
         runtime_group.add_argument('--extract-dir', action='store',
                 default=self.default_extract_dir,
-                help='Directory where extracted packages reside, default: %s' \
+                help='Directory where extracted packages reside, default: %s'
                 % self.default_extract_dir)
 
         runtime_group.add_argument('--qemu-boot', action='store',
diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
index 86ac199197..6b8eab3258 100644
--- a/meta/lib/oeqa/sdk/case.py
+++ b/meta/lib/oeqa/sdk/case.py
@@ -11,7 +11,7 @@ from oeqa.core.case import OETestCase
 
 class OESDKTestCase(OETestCase):
     def _run(self, cmd):
-        return subprocess.check_output(". %s > /dev/null; %s;" % \
+        return subprocess.check_output(". %s > /dev/null; %s;" %
                 (self.tc.sdk_env, cmd), shell=True, executable="/bin/bash",
                 stderr=subprocess.STDOUT, universal_newlines=True)
 
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/buildgalculator.py
index eb3c8ddf39..c6de032b29 100644
--- a/meta/lib/oeqa/sdk/cases/buildgalculator.py
+++ b/meta/lib/oeqa/sdk/cases/buildgalculator.py
@@ -16,7 +16,7 @@ class GalculatorTest(OESDKTestCase):
     Test that autotools and GTK+ 3 compiles correctly.
     """
     def setUp(self):
-        if not (self.tc.hasTargetPackage("gtk+3", multilib=True) or \
+        if not (self.tc.hasTargetPackage("gtk+3", multilib=True) or
                 self.tc.hasTargetPackage("libgtk-3.0", multilib=True)):
             raise unittest.SkipTest("GalculatorTest class: SDK don't support gtk+3")
         if not (self.tc.hasHostPackage("nativesdk-gettext-dev")):
diff --git a/meta/lib/oeqa/sdk/cases/gcc.py b/meta/lib/oeqa/sdk/cases/gcc.py
index eb08eadd28..71e71dee0a 100644
--- a/meta/lib/oeqa/sdk/cases/gcc.py
+++ b/meta/lib/oeqa/sdk/cases/gcc.py
@@ -43,7 +43,7 @@ class GccCompileTest(OESDKTestCase):
 
     @classmethod
     def tearDownClass(self):
-        files = [os.path.join(self.tc.sdk_dir, f) \
+        files = [os.path.join(self.tc.sdk_dir, f)
                 for f in ['test.c', 'test.cpp', 'test.o', 'test',
                     'testsdkmakefile']]
         for f in files:
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py
index 01c38c24e6..b1a705c776 100644
--- a/meta/lib/oeqa/sdk/context.py
+++ b/meta/lib/oeqa/sdk/context.py
@@ -120,7 +120,7 @@ class OESDKTestContextExecutor(OETestContextExecutor):
         return sdk_env
 
     def _display_sdk_envs(self, log, args, sdk_envs):
-        log("Available SDK environments at directory %s:" \
+        log("Available SDK environments at directory %s:"
                 % args.sdk_dir)
         log("")
         for env in sdk_envs:
@@ -130,12 +130,12 @@ class OESDKTestContextExecutor(OETestContextExecutor):
         import argparse_oe
 
         if not args.sdk_dir:
-            raise argparse_oe.ArgumentUsageError("No SDK directory "\
+            raise argparse_oe.ArgumentUsageError("No SDK directory "
                    "specified please do, --sdk-dir SDK_DIR", self.name)
 
         sdk_envs = OESDKTestContextExecutor._get_sdk_environs(args.sdk_dir)
         if not sdk_envs:
-            raise argparse_oe.ArgumentUsageError("No available SDK "\
+            raise argparse_oe.ArgumentUsageError("No available SDK "
                    "environments found at %s" % args.sdk_dir, self.name)
 
         if args.list_sdk_env:
@@ -144,7 +144,7 @@ class OESDKTestContextExecutor(OETestContextExecutor):
 
         if not args.sdk_env in sdk_envs:
             self._display_sdk_envs(logger.error, args, sdk_envs)
-            raise argparse_oe.ArgumentUsageError("No valid SDK "\
+            raise argparse_oe.ArgumentUsageError("No valid SDK "
                    "environment (%s) specified" % args.sdk_env, self.name)
 
         self.sdk_env = sdk_envs[args.sdk_env]
diff --git a/meta/lib/oeqa/sdkext/case.py b/meta/lib/oeqa/sdkext/case.py
index 668faec9b9..8a36c1f8ce 100644
--- a/meta/lib/oeqa/sdkext/case.py
+++ b/meta/lib/oeqa/sdkext/case.py
@@ -19,6 +19,6 @@ class OESDKExtTestCase(OESDKTestCase):
         paths_to_avoid = ['bitbake/bin', 'poky/scripts']
         env['PATH'] = avoid_paths_in_environ(paths_to_avoid)
 
-        return subprocess.check_output(". %s > /dev/null;"\
+        return subprocess.check_output(". %s > /dev/null;"
             " %s;" % (self.tc.sdk_env, cmd), stderr=subprocess.STDOUT,
             shell=True, env=env, universal_newlines=True)
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py
index a5c6a76e02..ef5dea1f47 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -52,7 +52,7 @@ class DevtoolTest(OESDKExtTestCase):
 
     def test_devtool_location(self):
         output = self._run('which devtool')
-        self.assertEqual(output.startswith(self.tc.sdk_dir), True, \
+        self.assertEqual(output.startswith(self.tc.sdk_dir), True,
             msg="Seems that devtool isn't the eSDK one: %s" % output)
 
     def test_devtool_add_reset(self):
diff --git a/meta/lib/oeqa/sdkext/testsdk.py b/meta/lib/oeqa/sdkext/testsdk.py
index ffd185ec55..ae4f55970c 100644
--- a/meta/lib/oeqa/sdkext/testsdk.py
+++ b/meta/lib/oeqa/sdkext/testsdk.py
@@ -30,7 +30,7 @@ class TestSDKExt(TestSDKBase):
 
         tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh")
         if not os.path.exists(tcname):
-            bb.fatal("The toolchain ext %s is not built. Build it before running the" \
+            bb.fatal("The toolchain ext %s is not built. Build it before running the"
                     " tests: 'bitbake <image> -c populate_sdk_ext' ." % tcname)
 
         tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.testdata.json")
@@ -73,7 +73,7 @@ class TestSDKExt(TestSDKBase):
                 f.write('PREMIRRORS_prepend = " git://git.yoctoproject.org/.* git://%s/git2/git.yoctoproject.org.BASENAME \\n "\n' % test_data.get('DL_DIR'))
 
             # We need to do this in case we have a minimal SDK
-            subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \
+            subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" %
                     sdk_env, cwd=sdk_dir, shell=True, stderr=subprocess.STDOUT)
 
             tc = OESDKExtTestContext(td=test_data, logger=logger, sdk_dir=sdk_dir,
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index dcad4f76ec..4ff187ff8c 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -55,13 +55,13 @@ class OESelftestTestCase(OETestCase):
         if "#include added by oe-selftest" \
             not in ftools.read_file(os.path.join(cls.builddir, "conf/local.conf")):
                 cls.logger.info("Adding: \"include selftest.inc\" in %s" % os.path.join(cls.builddir, "conf/local.conf"))
-                ftools.append_file(os.path.join(cls.builddir, "conf/local.conf"), \
+                ftools.append_file(os.path.join(cls.builddir, "conf/local.conf"),
                         "\n#include added by oe-selftest\ninclude machine.inc\ninclude selftest.inc")
 
         if "#include added by oe-selftest" \
             not in ftools.read_file(os.path.join(cls.builddir, "conf/bblayers.conf")):
                 cls.logger.info("Adding: \"include bblayers.inc\" in bblayers.conf")
-                ftools.append_file(os.path.join(cls.builddir, "conf/bblayers.conf"), \
+                ftools.append_file(os.path.join(cls.builddir, "conf/bblayers.conf"),
                         "\n#include added by oe-selftest\ninclude bblayers.inc")
 
     @classmethod
@@ -69,13 +69,13 @@ class OESelftestTestCase(OETestCase):
         if "#include added by oe-selftest.py" \
             in ftools.read_file(os.path.join(cls.builddir, "conf/local.conf")):
                 cls.logger.info("Removing the include from local.conf")
-                ftools.remove_from_file(os.path.join(cls.builddir, "conf/local.conf"), \
+                ftools.remove_from_file(os.path.join(cls.builddir, "conf/local.conf"),
                         "\n#include added by oe-selftest.py\ninclude machine.inc\ninclude selftest.inc")
 
         if "#include added by oe-selftest.py" \
             in ftools.read_file(os.path.join(cls.builddir, "conf/bblayers.conf")):
                 cls.logger.info("Removing the include from bblayers.conf")
-                ftools.remove_from_file(os.path.join(cls.builddir, "conf/bblayers.conf"), \
+                ftools.remove_from_file(os.path.join(cls.builddir, "conf/bblayers.conf"),
                         "\n#include added by oe-selftest.py\ninclude bblayers.inc")
 
     @classmethod
diff --git a/meta/lib/oeqa/selftest/cases/manifest.py b/meta/lib/oeqa/selftest/cases/manifest.py
index 5d13f35468..e4755c595b 100644
--- a/meta/lib/oeqa/selftest/cases/manifest.py
+++ b/meta/lib/oeqa/selftest/cases/manifest.py
@@ -23,14 +23,14 @@ class VerifyManifest(OESelftestTestCase):
             with open(manifest, "r") as mfile:
                 for line in mfile:
                     manifest_entry = os.path.join(path, line.split()[0])
-                    self.logger.debug("{}: looking for {}"\
+                    self.logger.debug("{}: looking for {}"
                                     .format(self.classname, manifest_entry))
                     if not os.path.isfile(manifest_entry):
                         manifest_errors.append(manifest_entry)
-                        self.logger.debug("{}: {} not found"\
+                        self.logger.debug("{}: {} not found"
                                     .format(self.classname, manifest_entry))
         except OSError as e:
-            self.logger.debug("{}: checking of {} failed"\
+            self.logger.debug("{}: checking of {} failed"
                     .format(self.classname, manifest))
             raise e
 
@@ -40,9 +40,9 @@ class VerifyManifest(OESelftestTestCase):
     @classmethod
     def get_dir_from_bb_var(self, bb_var, target = None):
         target == self.buildtarget if target == None else target
-        directory = get_bb_var(bb_var, target);
+        directory = get_bb_var(bb_var, target)
         if not directory or not os.path.isdir(directory):
-            self.logger.debug("{}: {} points to {} when target = {}"\
+            self.logger.debug("{}: {} points to {} when target = {}"
                     .format(self.classname, bb_var, directory, target))
             raise OSError
         return directory
@@ -54,12 +54,12 @@ class VerifyManifest(OESelftestTestCase):
         self.buildtarget = 'core-image-minimal'
         self.classname = 'VerifyManifest'
 
-        self.logger.info("{}: doing bitbake {} as a prerequisite of the test"\
+        self.logger.info("{}: doing bitbake {} as a prerequisite of the test"
                 .format(self.classname, self.buildtarget))
         if bitbake(self.buildtarget).status:
-            self.logger.debug("{} Failed to setup {}"\
+            self.logger.debug("{} Failed to setup {}"
                     .format(self.classname, self.buildtarget))
-            self.skipTest("{}: Cannot setup testing scenario"\
+            self.skipTest("{}: Cannot setup testing scenario"
                     .format(self.classname))
 
     def test_SDK_manifest_entries(self):
@@ -69,12 +69,12 @@ class VerifyManifest(OESelftestTestCase):
         # to do an additional setup for the sdk
         sdktask = '-c populate_sdk'
         bbargs = sdktask + ' ' + self.buildtarget
-        self.logger.debug("{}: doing bitbake {} as a prerequisite of the test"\
+        self.logger.debug("{}: doing bitbake {} as a prerequisite of the test"
                 .format(self.classname, bbargs))
         if bitbake(bbargs).status:
-            self.logger.debug("{} Failed to bitbake {}"\
+            self.logger.debug("{} Failed to bitbake {}"
                     .format(self.classname, bbargs))
-            self.skipTest("{}: Cannot setup testing scenario"\
+            self.skipTest("{}: Cannot setup testing scenario"
                     .format(self.classname))
 
 
@@ -104,7 +104,7 @@ class VerifyManifest(OESelftestTestCase):
                         self.classname, reverse_dir[k]))
                     raise IOError
         except OSError:
-            raise self.skipTest("{}: Error in obtaining manifest dirs"\
+            raise self.skipTest("{}: Error in obtaining manifest dirs"
                 .format(self.classname))
         except IOError:
             msg = "{}: Error cannot find manifests in the specified dir:\n{}"\
@@ -115,7 +115,7 @@ class VerifyManifest(OESelftestTestCase):
             self.logger.debug("{}: Check manifest {}".format(
                 self.classname, m_entry[k].file))
 
-            m_entry[k].missing = self.check_manifest_entries(\
+            m_entry[k].missing = self.check_manifest_entries(
                                                m_entry[k].file,reverse_dir[k])
             if m_entry[k].missing:
                 msg = '{}: {} Error has the following missing entries'\
@@ -135,25 +135,27 @@ class VerifyManifest(OESelftestTestCase):
             mfilename = get_bb_var("IMAGE_LINK_NAME", self.buildtarget)\
                     + ".manifest"
             mpath = os.path.join(mdir, mfilename)
-            if not os.path.isfile(mpath): raise IOError
+            if not os.path.isfile(mpath):
+                raise IOError
             m_entry = ManifestEntry(mpath)
 
             pkgdata_dir = {}
             pkgdata_dir = self.get_dir_from_bb_var('PKGDATA_DIR',
                                                 self.buildtarget)
             revdir = os.path.join(pkgdata_dir, 'runtime-reverse')
-            if not os.path.exists(revdir): raise IOError
+            if not os.path.exists(revdir):
+                raise IOError
         except OSError:
-            raise self.skipTest("{}: Error in obtaining manifest dirs"\
+            raise self.skipTest("{}: Error in obtaining manifest dirs"
                 .format(self.classname))
         except IOError:
             msg = "{}: Error cannot find manifests in dir:\n{}"\
                     .format(self.classname, mdir)
             self.fail(msg)
 
-        self.logger.debug("{}: Check manifest {}"\
+        self.logger.debug("{}: Check manifest {}"
                             .format(self.classname, m_entry.file))
-        m_entry.missing = self.check_manifest_entries(\
+        m_entry.missing = self.check_manifest_entries(
                                                     m_entry.file, revdir)
         if m_entry.missing:
             msg = '{}: {} Error has the following missing entries'\
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index a11e2d0781..ad1c1fbe67 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -59,7 +59,7 @@ def extract_files(debugfs_output):
      /92/040755/1002/1002/tmp//\n
     """
     # NOTE the occasional ^M in file names
-    return [line.split('/')[5].strip() for line in \
+    return [line.split('/')[5].strip() for line in
             debugfs_output.strip().split('/\n')]
 
 def files_own_by_root(debugfs_output):
@@ -402,7 +402,7 @@ part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path usr
 part /usr --source rootfs --ondisk mmcblk0 --fstype=ext4 --rootfs-dir %s/usr
 part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --rootfs-dir %s/usr"""
                           % (rootfs_dir, rootfs_dir))
-            runCmd("wic create %s -e core-image-minimal -o %s" \
+            runCmd("wic create %s -e core-image-minimal -o %s"
                                        % (wks_file, self.resultdir))
 
             os.remove(wks_file)
@@ -433,7 +433,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
 
             # Test partition 1, should contain the normal root directories, except
             # /usr.
-            res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % \
+            res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" %
                              os.path.join(self.resultdir, "selftest_img.part1"))
             files = extract_files(res.output)
             self.assertIn("etc", files)
@@ -441,7 +441,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
 
             # Partition 2, should contain common directories for /usr, not root
             # directories.
-            res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % \
+            res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" %
                              os.path.join(self.resultdir, "selftest_img.part2"))
             files = extract_files(res.output)
             self.assertNotIn("etc", files)
@@ -450,14 +450,14 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
 
             # Partition 3, should contain the same as partition 2, including the bin
             # directory, but not the files inside it.
-            res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % \
+            res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" %
                              os.path.join(self.resultdir, "selftest_img.part3"))
             files = extract_files(res.output)
             self.assertNotIn("etc", files)
             self.assertNotIn("usr", files)
             self.assertIn("share", files)
             self.assertIn("bin", files)
-            res = runCmd("debugfs -R 'ls -p bin' %s 2>/dev/null" % \
+            res = runCmd("debugfs -R 'ls -p bin' %s 2>/dev/null" %
                              os.path.join(self.resultdir, "selftest_img.part3"))
             files = extract_files(res.output)
             self.assertIn(".", files)
@@ -489,7 +489,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
 part /part1 --source rootfs --ondisk mmcblk0 --fstype=ext4
 part /part2 --source rootfs --ondisk mmcblk0 --fstype=ext4 --include-path %s"""
                           % (include_path))
-            runCmd("wic create %s -e core-image-minimal -o %s" \
+            runCmd("wic create %s -e core-image-minimal -o %s"
                                        % (wks_file, self.resultdir))
 
             part1 = glob(os.path.join(self.resultdir, 'temp-*.direct.p1'))[0]
@@ -526,7 +526,7 @@ part /part2 --source rootfs --ondisk mmcblk0 --fstype=ext4 --include-path %s"""
                 wks.write("""
 part / --source rootfs  --fstype=ext4 --include-path %s --include-path core-image-minimal-mtdutils export/"""
                           % (include_path))
-            runCmd("wic create %s -e core-image-minimal -o %s" \
+            runCmd("wic create %s -e core-image-minimal -o %s"
                                        % (wks_file, self.resultdir))
 
             part1 = glob(os.path.join(self.resultdir, 'temp-*.direct.p1'))[0]
@@ -551,21 +551,21 @@ part / --source rootfs  --fstype=ext4 --include-path %s --include-path core-imag
         # Absolute argument.
         with open(wks_file, 'w') as wks:
             wks.write("part / --source rootfs --fstype=ext4 --include-path core-image-minimal-mtdutils /export")
-        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \
+        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s"
                                       % (wks_file, self.resultdir), ignore_status=True).status)
         os.remove(wks_file)
 
         # Argument pointing to parent directory.
         with open(wks_file, 'w') as wks:
             wks.write("part / --source rootfs --fstype=ext4 --include-path core-image-minimal-mtdutils ././..")
-        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \
+        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s"
                                       % (wks_file, self.resultdir), ignore_status=True).status)
         os.remove(wks_file)
 
         # 3 Argument pointing to parent directory.
         with open(wks_file, 'w') as wks:
             wks.write("part / --source rootfs --fstype=ext4 --include-path core-image-minimal-mtdutils export/ dummy")
-        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \
+        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s"
                                       % (wks_file, self.resultdir), ignore_status=True).status)
         os.remove(wks_file)
 
@@ -576,14 +576,14 @@ part / --source rootfs  --fstype=ext4 --include-path %s --include-path core-imag
         # Absolute argument.
         with open(wks_file, 'w') as wks:
             wks.write("part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path /usr")
-        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \
+        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s"
                                       % (wks_file, self.resultdir), ignore_status=True).status)
         os.remove(wks_file)
 
         # Argument pointing to parent directory.
         with open(wks_file, 'w') as wks:
             wks.write("part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path ././..")
-        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \
+        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s"
                                       % (wks_file, self.resultdir), ignore_status=True).status)
         os.remove(wks_file)
 
@@ -619,7 +619,7 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc
                 wks_file = os.path.join(include_path, 'temp.wks')
                 with open(wks_file, 'w') as wks:
                     wks.write(test)
-                runCmd("wic create %s -e core-image-minimal -o %s" \
+                runCmd("wic create %s -e core-image-minimal -o %s"
                                        % (wks_file, self.resultdir))
 
                 for part in glob(os.path.join(self.resultdir, 'temp-*.direct.p*')):
@@ -656,7 +656,7 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc
             wks_file = os.path.join(include_path, 'temp.wks')
             with open(wks_file, 'w') as wks:
                 wks.write("part /etc --source rootfs --fstype=ext4 --change-directory=etc")
-            runCmd("wic create %s -e core-image-minimal -o %s" \
+            runCmd("wic create %s -e core-image-minimal -o %s"
                                        % (wks_file, self.resultdir))
 
             part1 = glob(os.path.join(self.resultdir, 'temp-*.direct.p1'))[0]
@@ -675,14 +675,14 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc
         # Absolute argument.
         with open(wks_file, 'w') as wks:
             wks.write("part / --source rootfs --fstype=ext4 --change-directory /usr")
-        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \
+        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s"
                                       % (wks_file, self.resultdir), ignore_status=True).status)
         os.remove(wks_file)
 
         # Argument pointing to parent directory.
         with open(wks_file, 'w') as wks:
             wks.write("part / --source rootfs --fstype=ext4 --change-directory ././..")
-        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \
+        self.assertNotEqual(0, runCmd("wic create %s -e core-image-minimal -o %s"
                                       % (wks_file, self.resultdir), ignore_status=True).status)
         os.remove(wks_file)
 
@@ -816,7 +816,7 @@ class Wic2(WicTestCase):
         """
         with NamedTemporaryFile("w", suffix=".wks", delete=False) as tempf:
             wkspath = tempf.name
-            tempf.write("part " \
+            tempf.write("part "
                      "--source rootfs --ondisk hda --align 4 --fixed-size %d "
                      "--fstype=ext4\n" % size)
 
@@ -881,8 +881,8 @@ class Wic2(WicTestCase):
 
         with NamedTemporaryFile("w", suffix=".wks") as tempf:
             # Test that partitions are placed at the correct offsets, default KB
-            tempf.write("bootloader --ptable gpt\n" \
-                        "part /    --source rootfs --ondisk hda --offset 32     --fixed-size 100M --fstype=ext4\n" \
+            tempf.write("bootloader --ptable gpt\n"
+                        "part /    --source rootfs --ondisk hda --offset 32     --fixed-size 100M --fstype=ext4\n"
                         "part /bar                 --ondisk hda --offset 102432 --fixed-size 100M --fstype=ext4\n")
             tempf.flush()
 
@@ -894,8 +894,8 @@ class Wic2(WicTestCase):
 
         with NamedTemporaryFile("w", suffix=".wks") as tempf:
             # Test that partitions are placed at the correct offsets, same with explicit KB
-            tempf.write("bootloader --ptable gpt\n" \
-                        "part /    --source rootfs --ondisk hda --offset 32K     --fixed-size 100M --fstype=ext4\n" \
+            tempf.write("bootloader --ptable gpt\n"
+                        "part /    --source rootfs --ondisk hda --offset 32K     --fixed-size 100M --fstype=ext4\n"
                         "part /bar                 --ondisk hda --offset 102432K --fixed-size 100M --fstype=ext4\n")
             tempf.flush()
 
@@ -907,8 +907,8 @@ class Wic2(WicTestCase):
 
         with NamedTemporaryFile("w", suffix=".wks") as tempf:
             # Test that partitions are placed at the correct offsets using MB
-            tempf.write("bootloader --ptable gpt\n" \
-                        "part /    --source rootfs --ondisk hda --offset 32K  --fixed-size 100M --fstype=ext4\n" \
+            tempf.write("bootloader --ptable gpt\n"
+                        "part /    --source rootfs --ondisk hda --offset 32K  --fixed-size 100M --fstype=ext4\n"
                         "part /bar                 --ondisk hda --offset 101M --fixed-size 100M --fstype=ext4\n")
             tempf.flush()
 
@@ -920,8 +920,8 @@ class Wic2(WicTestCase):
 
         with NamedTemporaryFile("w", suffix=".wks") as tempf:
             # Test that partitions can be placed on a 512 byte sector boundary
-            tempf.write("bootloader --ptable gpt\n" \
-                        "part /    --source rootfs --ondisk hda --offset 65s --fixed-size 99M --fstype=ext4\n" \
+            tempf.write("bootloader --ptable gpt\n"
+                        "part /    --source rootfs --ondisk hda --offset 65s --fixed-size 99M --fstype=ext4\n"
                         "part /bar                 --ondisk hda --offset 102432 --fixed-size 100M --fstype=ext4\n")
             tempf.flush()
 
@@ -933,7 +933,7 @@ class Wic2(WicTestCase):
 
         with NamedTemporaryFile("w", suffix=".wks") as tempf:
             # Test that a partition can be placed immediately after a MSDOS partition table
-            tempf.write("bootloader --ptable msdos\n" \
+            tempf.write("bootloader --ptable msdos\n"
                         "part /    --source rootfs --ondisk hda --offset 1s --fixed-size 100M --fstype=ext4\n")
             tempf.flush()
 
@@ -944,8 +944,8 @@ class Wic2(WicTestCase):
 
         with NamedTemporaryFile("w", suffix=".wks") as tempf:
             # Test that image creation fails if the partitions would overlap
-            tempf.write("bootloader --ptable gpt\n" \
-                        "part /    --source rootfs --ondisk hda --offset 32     --fixed-size 100M --fstype=ext4\n" \
+            tempf.write("bootloader --ptable gpt\n"
+                        "part /    --source rootfs --ondisk hda --offset 32     --fixed-size 100M --fstype=ext4\n"
                         "part /bar                 --ondisk hda --offset 102431 --fixed-size 100M --fstype=ext4\n")
             tempf.flush()
 
@@ -954,7 +954,7 @@ class Wic2(WicTestCase):
 
         with NamedTemporaryFile("w", suffix=".wks") as tempf:
             # Test that partitions are not allowed to overlap with the booloader
-            tempf.write("bootloader --ptable gpt\n" \
+            tempf.write("bootloader --ptable gpt\n"
                         "part /    --source rootfs --ondisk hda --offset 8 --fixed-size 100M --fstype=ext4\n")
             tempf.flush()
 
@@ -965,7 +965,7 @@ class Wic2(WicTestCase):
         native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools")
 
         with NamedTemporaryFile("w", suffix=".wks") as tempf:
-            tempf.write("bootloader --ptable gpt\n" \
+            tempf.write("bootloader --ptable gpt\n"
                         "part /     --source rootfs --ondisk hda --extra-space 200M --fstype=ext4\n")
             tempf.flush()
 
@@ -1002,7 +1002,7 @@ class Wic2(WicTestCase):
         machine = get_bb_var('MACHINE', img)
         with NamedTemporaryFile("w", suffix=".wks") as wks:
             wks.writelines(['part /boot --active --source bootimg-pcbios\n',
-                            'part / --source rawcopy --sourceparams="file=%s-%s.ext4" --use-uuid\n'\
+                            'part / --source rawcopy --sourceparams="file=%s-%s.ext4" --use-uuid\n'
                              % (img, machine),
                             'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n'])
             wks.flush()
@@ -1080,7 +1080,7 @@ class Wic2(WicTestCase):
         img = 'core-image-minimal'
         with NamedTemporaryFile("w", suffix=".wks") as wks:
             wks.writelines(['part /boot --active --source bootimg-biosplusefi --sourceparams="loader=grub-efi"\n',
-                            'part / --source rootfs --fstype=ext4 --align 1024 --use-uuid\n'\
+                            'part / --source rootfs --fstype=ext4 --align 1024 --use-uuid\n'
                             'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n'])
             wks.flush()
             cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
@@ -1111,7 +1111,7 @@ class Wic2(WicTestCase):
     def test_kickstart_parser(self):
         """Test wks parser options"""
         with NamedTemporaryFile("w", suffix=".wks") as wks:
-            wks.writelines(['part / --fstype ext3 --source rootfs --system-id 0xFF '\
+            wks.writelines(['part / --fstype ext3 --source rootfs --system-id 0xFF '
                             '--overhead-factor 1.2 --size 100k\n'])
             wks.flush()
             cmd = "wic create %s -e core-image-minimal -o %s" % (wks.name, self.resultdir)
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index 1659926975..1b5546d273 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -133,7 +133,7 @@ class OESelftestTestContext(OETestContext):
             self.custommachine = machine
             if machine == 'random':
                 self.custommachine = choice(self.machines)
-            self.logger.info('Run tests with custom MACHINE set to: %s' % \
+            self.logger.info('Run tests with custom MACHINE set to: %s' %
                     self.custommachine)
         return super(OESelftestTestContext, self).runTests(processes, skips)
 
@@ -289,7 +289,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
 
         def _add_layer_libs():
             bbpath = self.tc.td['BBPATH'].split(':')
-            layer_libdirs = [p for p in (os.path.join(l, 'lib') \
+            layer_libdirs = [p for p in (os.path.join(l, 'lib')
                     for l in bbpath) if os.path.exists(p)]
             if layer_libdirs:
                 self.tc.logger.info("Adding layer libraries:")
diff --git a/meta/lib/oeqa/utils/__init__.py b/meta/lib/oeqa/utils/__init__.py
index 6d1ec4cb99..96926746cc 100644
--- a/meta/lib/oeqa/utils/__init__.py
+++ b/meta/lib/oeqa/utils/__init__.py
@@ -69,13 +69,13 @@ def load_test_components(logger, executor):
                 comp_name = file
                 comp_context = os.path.join(base_dir, file, 'context.py')
                 if os.path.exists(comp_context):
-                    comp_plugin = importlib.import_module('oeqa.%s.%s' % \
+                    comp_plugin = importlib.import_module('oeqa.%s.%s' %
                             (comp_name, 'context'))
                     try:
                         if not issubclass(comp_plugin._executor_class,
                                 OETestContextExecutor):
-                            raise TypeError("Component %s in %s, _executor_class "\
-                                "isn't derived from OETestContextExecutor."\
+                            raise TypeError("Component %s in %s, _executor_class "
+                                "isn't derived from OETestContextExecutor."
                                 % (comp_name, comp_context))
 
                         if comp_plugin._executor_class._script_executor \
@@ -84,7 +84,7 @@ def load_test_components(logger, executor):
 
                         components[comp_name] = comp_plugin._executor_class()
                     except AttributeError:
-                        raise AttributeError("Component %s in %s don't have "\
+                        raise AttributeError("Component %s in %s don't have "
                                 "_executor_class defined." % (comp_name, comp_context))
 
     return components
diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py
index 383e57a6b2..e90462d127 100644
--- a/meta/lib/oeqa/utils/testexport.py
+++ b/meta/lib/oeqa/utils/testexport.py
@@ -86,8 +86,10 @@ def process_binaries(d, params):
         packaged_bin_dir = os.path.join(exportpath,"binaries", arch, "packaged_binaries")
         # creating necessary directory structure in case testing is done in poky env.
         if export_env == "0":
-            if not os.path.exists(extracted_bin_dir): bb.utils.mkdirhier(extracted_bin_dir)
-            if not os.path.exists(packaged_bin_dir): bb.utils.mkdirhier(packaged_bin_dir)
+            if not os.path.exists(extracted_bin_dir):
+                bb.utils.mkdirhier(extracted_bin_dir)
+            if not os.path.exists(packaged_bin_dir):
+                bb.utils.mkdirhier(packaged_bin_dir)
 
         if param_list[3] == "native":
             if export_env == "1": #this is a native package and we only need to copy it. no need for extraction
diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py
index 3b84447a0f..7c87a14758 100755
--- a/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -193,7 +193,7 @@ def end_stress(p):
 def us2hms_str(us):
         s = (us+500000) // 1000000 # Round microseconds to s
         m = s//60
-        s -= 60*m;
+        s -= 60*m
         h = m//60
         m -= 60*h
 
diff --git a/scripts/bitbake-whatchanged b/scripts/bitbake-whatchanged
index 6f4b268119..674d690450 100755
--- a/scripts/bitbake-whatchanged
+++ b/scripts/bitbake-whatchanged
@@ -302,10 +302,10 @@ Note:
 
         print("\n=== Summary: (%s changed, %s unchanged)" % (total_changed, cnt_unchanged))
         if args.verbose:
-            print("Newly added: %s\nDependencies changed: %s\n" % \
+            print("Newly added: %s\nDependencies changed: %s\n" %
                 (cnt_added, cnt_dep))
         else:
-            print("Newly added: %s\nPV changed: %s\nPR changed: %s\nDependencies changed: %s\n" % \
+            print("Newly added: %s\nPV changed: %s\nPR changed: %s\nDependencies changed: %s\n" %
                 (cnt_added, cnt_rv.get('pv') or 0, cnt_rv.get('pr') or 0, cnt_dep))
     except:
         print("ERROR occurred!")
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 835a6bcd09..d0ed701e91 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -517,10 +517,10 @@ def drop_to_shell(workdir=None):
         return False
 
     shell = os.environ.get('SHELL', 'bash')
-    print('Dropping to shell "%s"\n' \
-          'When you are finished, run the following to continue:\n' \
-          '       exit    -- continue to apply the patches\n' \
-          '       exit 1  -- abort\n' % shell);
+    print('Dropping to shell "%s"\n'
+          'When you are finished, run the following to continue:\n'
+          '       exit    -- continue to apply the patches\n'
+          '       exit 1  -- abort\n' % shell)
     ret = subprocess.call([shell], cwd=workdir)
     if ret != 0:
         print("Aborting")
@@ -725,8 +725,8 @@ def update_with_patches(conf, components, revisions, repos):
 
     # Step 5: invoke bash for user to edit patch and patch list
     if conf.interactive:
-        print('You may now edit the patch and patch list in %s\n' \
-              'For example, you can remove unwanted patch entries from patchlist-*, so that they will be not applied later' % patch_dir);
+        print('You may now edit the patch and patch list in %s\n'
+              'For example, you can remove unwanted patch entries from patchlist-*, so that they will be not applied later' % patch_dir)
         if not drop_to_shell(patch_dir):
             sys.exit(1)
 
diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py
index fe545607bb..f526111be5 100644
--- a/scripts/lib/checklayer/__init__.py
+++ b/scripts/lib/checklayer/__init__.py
@@ -158,7 +158,7 @@ def _find_layer_depends(depend, layers):
 
 def add_layer_dependencies(bblayersconf, layer, layers, logger):
     def recurse_dependencies(depends, layer, layers, logger, ret = []):
-        logger.debug('Processing dependencies %s for layer %s.' % \
+        logger.debug('Processing dependencies %s for layer %s.' %
                     (depends, layer['name']))
 
         for depend in depends.split():
@@ -168,7 +168,7 @@ def add_layer_dependencies(bblayersconf, layer, layers, logger):
 
             layer_depend = _find_layer_depends(depend, layers)
             if not layer_depend:
-                logger.error('Layer %s depends on %s and isn\'t found.' % \
+                logger.error('Layer %s depends on %s and isn\'t found.' %
                         (layer['name'], depend))
                 ret = None
                 continue
diff --git a/scripts/lib/checklayer/cases/bsp.py b/scripts/lib/checklayer/cases/bsp.py
index 7fd56f5d36..f019d88f17 100644
--- a/scripts/lib/checklayer/cases/bsp.py
+++ b/scripts/lib/checklayer/cases/bsp.py
@@ -12,7 +12,7 @@ class BSPCheckLayer(OECheckLayerTestCase):
     @classmethod
     def setUpClass(self):
         if self.tc.layer['type'] != LayerType.BSP:
-            raise unittest.SkipTest("BSPCheckLayer: Layer %s isn't BSP one." %\
+            raise unittest.SkipTest("BSPCheckLayer: Layer %s isn't BSP one." %
                 self.tc.layer['name'])
 
     def test_bsp_defines_machines(self):
@@ -24,7 +24,7 @@ class BSPCheckLayer(OECheckLayerTestCase):
 
         machine = get_bb_var('MACHINE')
         self.assertEqual(self.td['bbvars']['MACHINE'], machine,
-                msg="Layer %s modified machine %s -> %s" % \
+                msg="Layer %s modified machine %s -> %s" %
                     (self.tc.layer['name'], self.td['bbvars']['MACHINE'], machine))
 
 
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
index b82304e361..3c3562c931 100644
--- a/scripts/lib/checklayer/cases/common.py
+++ b/scripts/lib/checklayer/cases/common.py
@@ -46,7 +46,7 @@ class CommonCheckLayer(OECheckLayerTestCase):
     def test_signatures(self):
         if self.tc.layer['type'] == LayerType.SOFTWARE and \
            not self.tc.test_software_layer_signatures:
-            raise unittest.SkipTest("Not testing for signature changes in a software layer %s." \
+            raise unittest.SkipTest("Not testing for signature changes in a software layer %s."
                      % self.tc.layer['name'])
 
         curr_sigs, _ = get_signatures(self.td['builddir'], failsafe=True)
@@ -56,5 +56,5 @@ class CommonCheckLayer(OECheckLayerTestCase):
 
     def test_layerseries_compat(self):
         for collection_name, collection_data in self.tc.layer['collections'].items():
-            self.assertTrue(collection_data['compat'], "Collection %s from layer %s does not set compatible oe-core versions via LAYERSERIES_COMPAT_collection." \
+            self.assertTrue(collection_data['compat'], "Collection %s from layer %s does not set compatible oe-core versions via LAYERSERIES_COMPAT_collection."
                  % (collection_name, self.tc.layer['name']))
diff --git a/scripts/lib/checklayer/cases/distro.py b/scripts/lib/checklayer/cases/distro.py
index f0bee5493c..4efde4b44a 100644
--- a/scripts/lib/checklayer/cases/distro.py
+++ b/scripts/lib/checklayer/cases/distro.py
@@ -12,7 +12,7 @@ class DistroCheckLayer(OECheckLayerTestCase):
     @classmethod
     def setUpClass(self):
         if self.tc.layer['type'] != LayerType.DISTRO:
-            raise unittest.SkipTest("DistroCheckLayer: Layer %s isn't Distro one." %\
+            raise unittest.SkipTest("DistroCheckLayer: Layer %s isn't Distro one." %
                 self.tc.layer['name'])
 
     def test_distro_defines_distros(self):
@@ -24,5 +24,5 @@ class DistroCheckLayer(OECheckLayerTestCase):
 
         distro = get_bb_var('DISTRO')
         self.assertEqual(self.td['bbvars']['DISTRO'], distro,
-                msg="Layer %s modified distro %s -> %s" % \
+                msg="Layer %s modified distro %s -> %s" %
                     (self.tc.layer['name'], self.td['bbvars']['DISTRO'], distro))
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index 3aa42a1466..5e22f91507 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -150,8 +150,8 @@ def sdk_update(args, config, basepath, workspace):
             if not out:
                 ret = subprocess.call("git fetch --all; git reset --hard @{u}", shell=True, cwd=layers_dir)
             else:
-                logger.error("Failed to update metadata as there have been changes made to it. Aborting.");
-                logger.error("Changed files:\n%s" % out);
+                logger.error("Failed to update metadata as there have been changes made to it. Aborting.")
+                logger.error("Changed files:\n%s" % out)
                 return -1
         else:
             ret = -1
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 018815b966..bee6b391e7 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -76,7 +76,7 @@ def find_canned_image(scripts_path, wks_file):
             for fname in files:
                 if fname.endswith("~") or fname.endswith("#"):
                     continue
-                if ((fname.endswith(".wks") and wks_file + ".wks" == fname) or \
+                if ((fname.endswith(".wks") and wks_file + ".wks" == fname) or
                    (fname.endswith(".wks.in") and wks_file + ".wks.in" == fname)):
                     fullpath = os.path.join(canned_wks_dir, fname)
                     return fullpath
@@ -519,7 +519,7 @@ class Disk:
                         partimg = self._get_part_image(pnum)
                         sparse_copy(partimg, partfname)
                         exec_cmd("{} -pf {}".format(self.e2fsck, partfname))
-                        exec_cmd("{} {} {}s".format(\
+                        exec_cmd("{} {} {}s".format(
                                  self.resize2fs, partfname, part['size']))
                     elif fstype.startswith('fat'):
                         logger.info("copying content of the fat partition {}".format(pnum))
@@ -561,7 +561,7 @@ def wic_ls(args, native_sysroot):
         if disk.partitions:
             print('Num     Start        End          Size      Fstype')
             for part in disk.partitions.values():
-                print("{:2d}  {:12d} {:12d} {:12d}  {}".format(\
+                print("{:2d}  {:12d} {:12d} {:12d}  {}".format(
                           part.pnum, part.start, part.end,
                           part.size, part.fstype))
     else:
diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index 4d9da28172..65987d4c94 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -215,7 +215,7 @@ class FilemapSeek(_FilemapBase):
         try:
             tmp_obj = tempfile.TemporaryFile("w+", dir=directory)
         except IOError as err:
-            raise ErrorNotSupp("cannot create a temporary in \"%s\": %s" \
+            raise ErrorNotSupp("cannot create a temporary in \"%s\": %s"
                               % (directory, err))
 
         try:
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 7a4cc83af5..8968b2f651 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -217,7 +217,7 @@ class KickStart():
                         line_args = shlex.split(line)
                         parsed = parser.parse_args(line_args)
                     except ArgumentError as err:
-                        raise KickStartError('%s:%d: %s' % \
+                        raise KickStartError('%s:%d: %s' %
                                              (confpath, lineno, err))
                     if line.startswith('part'):
                         # SquashFS does not support filesystem UUID
@@ -286,7 +286,7 @@ class KickStart():
                             # Concatenate the strings set in APPEND
                             append_var = get_bitbake_var("APPEND")
                             if append_var:
-                                self.bootloader.append = ' '.join(filter(None, \
+                                self.bootloader.append = ' '.join(filter(None,
                                                          (self.bootloader.append, append_var)))
                         else:
                             err = "%s:%d: more than one bootloader specified" \
diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py
index 57c042c503..767b34dd24 100644
--- a/scripts/lib/wic/misc.py
+++ b/scripts/lib/wic/misc.py
@@ -99,7 +99,7 @@ def _exec_cmd(cmd_and_args, as_shell=False):
         ret, out = runtool(args)
     out = out.strip()
     if ret != 0:
-        raise WicError("_exec_cmd: %s returned '%s' instead of 0\noutput: %s" % \
+        raise WicError("_exec_cmd: %s returned '%s' instead of 0\noutput: %s" %
                        (cmd_and_args, ret, out))
 
     logger.debug("_exec_cmd: output for %s (rc = %d): %s",
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 96168aadb4..54ca5f87b3 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -209,7 +209,7 @@ class DirectPlugin(ImagerPlugin):
             logger.debug("Generating bmap file for %s", disk_name)
             python = os.path.join(self.native_sysroot, 'usr/bin/python3-native/python3')
             bmaptool = os.path.join(self.native_sysroot, 'usr/bin/bmaptool')
-            exec_native_cmd("%s %s create %s -o %s.bmap" % \
+            exec_native_cmd("%s %s create %s -o %s.bmap" %
                             (python, bmaptool, full_path, full_path), self.native_sysroot)
         # Compress the image
         if self.compressor:
@@ -377,14 +377,14 @@ class PartitionedImage():
             part = self.partitions[num]
 
             if self.ptable_format == 'msdos' and part.part_name:
-                raise WicError("setting custom partition name is not " \
+                raise WicError("setting custom partition name is not "
                                "implemented for msdos partitions")
 
             if self.ptable_format == 'msdos' and part.part_type:
                 # The --part-type can also be implemented for MBR partitions,
                 # in which case it would map to the 1-byte "partition type"
                 # filed at offset 3 of the partition entry.
-                raise WicError("setting custom partition type is not " \
+                raise WicError("setting custom partition type is not "
                                "implemented for msdos partitions")
 
             # Get the disk where the partition is located
@@ -562,28 +562,28 @@ class PartitionedImage():
             if part.part_name:
                 logger.debug("partition %d: set name to %s",
                              part.num, part.part_name)
-                exec_native_cmd("sgdisk --change-name=%d:%s %s" % \
+                exec_native_cmd("sgdisk --change-name=%d:%s %s" %
                                          (part.num, part.part_name,
                                           self.path), self.native_sysroot)
 
             if part.part_type:
                 logger.debug("partition %d: set type UID to %s",
                              part.num, part.part_type)
-                exec_native_cmd("sgdisk --typecode=%d:%s %s" % \
+                exec_native_cmd("sgdisk --typecode=%d:%s %s" %
                                          (part.num, part.part_type,
                                           self.path), self.native_sysroot)
 
             if part.uuid and self.ptable_format == "gpt":
                 logger.debug("partition %d: set UUID to %s",
                              part.num, part.uuid)
-                exec_native_cmd("sgdisk --partition-guid=%d:%s %s" % \
+                exec_native_cmd("sgdisk --partition-guid=%d:%s %s" %
                                 (part.num, part.uuid, self.path),
                                 self.native_sysroot)
 
             if part.label and self.ptable_format == "gpt":
                 logger.debug("partition %d: set name to %s",
                              part.num, part.label)
-                exec_native_cmd("parted -s %s name %d %s" % \
+                exec_native_cmd("parted -s %s name %d %s" %
                                 (self.path, part.num, part.label),
                                 self.native_sysroot)
 
@@ -591,11 +591,11 @@ class PartitionedImage():
                 flag_name = "legacy_boot" if self.ptable_format == 'gpt' else "boot"
                 logger.debug("Set '%s' flag for partition '%s' on disk '%s'",
                              flag_name, part.num, self.path)
-                exec_native_cmd("parted -s %s set %d %s on" % \
+                exec_native_cmd("parted -s %s set %d %s on" %
                                 (self.path, part.num, flag_name),
                                 self.native_sysroot)
             if part.system_id:
-                exec_native_cmd("sfdisk --part-type %s %s %s" % \
+                exec_native_cmd("sfdisk --part-type %s %s %s" %
                                 (self.path, part.num, part.system_id),
                                 self.native_sysroot)
 
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index cdc72543c2..d4f2f928d9 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -241,7 +241,7 @@ class BootimgEFIPlugin(SourcePlugin):
                 logger.debug('Destination entry: %r', dst_entry)
                 deploy_files.append(dst_entry)
 
-            cls.install_task = [];
+            cls.install_task = []
             for deploy_entry in deploy_files:
                 src, dst = deploy_entry
                 if '*' in src:
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
index 5dbe2558d2..c59b476661 100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -76,7 +76,7 @@ class BootimgPartitionPlugin(SourcePlugin):
             logger.debug('Destination entry: %r', dst_entry)
             deploy_files.append(dst_entry)
 
-        cls.install_task = [];
+        cls.install_task = []
         for deploy_entry in deploy_files:
             src, dst = deploy_entry
             if '*' in src:
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index afc9ea0f8f..3645d07990 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -170,24 +170,24 @@ class IsoImagePlugin(SourcePlugin):
             # Create initrd from rootfs directory
             initrd = "%s/initrd.cpio.gz" % cr_workdir
             initrd_dir = "%s/INITRD" % cr_workdir
-            shutil.copytree("%s" % rootfs_dir, \
+            shutil.copytree("%s" % rootfs_dir,
                             "%s" % initrd_dir, symlinks=True)
 
             if os.path.isfile("%s/init" % rootfs_dir):
                 shutil.copy2("%s/init" % rootfs_dir, "%s/init" % initrd_dir)
             elif os.path.lexists("%s/init" % rootfs_dir):
-                os.symlink(os.readlink("%s/init" % rootfs_dir), \
+                os.symlink(os.readlink("%s/init" % rootfs_dir),
                             "%s/init" % initrd_dir)
             elif os.path.isfile("%s/sbin/init" % rootfs_dir):
-                shutil.copy2("%s/sbin/init" % rootfs_dir, \
+                shutil.copy2("%s/sbin/init" % rootfs_dir,
                             "%s" % initrd_dir)
             elif os.path.lexists("%s/sbin/init" % rootfs_dir):
-                os.symlink(os.readlink("%s/sbin/init" % rootfs_dir), \
+                os.symlink(os.readlink("%s/sbin/init" % rootfs_dir),
                             "%s/init" % initrd_dir)
             else:
                 raise WicError("Couldn't find or build initrd, exiting.")
 
-            exec_cmd("cd %s && find . | cpio -o -H newc -R root:root >%s/initrd.cpio " \
+            exec_cmd("cd %s && find . | cpio -o -H newc -R root:root >%s/initrd.cpio "
                      % (initrd_dir, cr_workdir), as_shell=True)
             exec_cmd("gzip -f -9 %s/initrd.cpio" % cr_workdir, as_shell=True)
             shutil.rmtree(initrd_dir)
diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
index 5834f59845..ade13e244b 100755
--- a/scripts/oe-pkgdata-browser
+++ b/scripts/oe-pkgdata-browser
@@ -31,7 +31,7 @@ def timeit(f):
         print ("func:%r calling" % f.__name__)
         result = f(*args, **kw)
         te = time.time()
-        print ('func:%r args:[%r, %r] took: %2.4f sec' % \
+        print ('func:%r args:[%r, %r] took: %2.4f sec' %
           (f.__name__, args, kw, te-ts))
         return result
     return timed
diff --git a/scripts/pybootchartgui/pybootchartgui/batch.py b/scripts/pybootchartgui/pybootchartgui/batch.py
index 05c714e95e..1fc2b9b882 100644
--- a/scripts/pybootchartgui/pybootchartgui/batch.py
+++ b/scripts/pybootchartgui/pybootchartgui/batch.py
@@ -19,7 +19,7 @@ from .draw import RenderOptions
 
 def render(writer, trace, app_options, filename):
     handlers = {
-        "png": (lambda w, h: cairo.ImageSurface(cairo.FORMAT_ARGB32, w, h), \
+        "png": (lambda w, h: cairo.ImageSurface(cairo.FORMAT_ARGB32, w, h),
                 lambda sfc: sfc.write_to_png(filename)),
         "pdf": (lambda w, h: cairo.PDFSurface(filename, w, h), lambda sfc: 0),
         "svg": (lambda w, h: cairo.SVGSurface(filename, w, h), lambda sfc: 0)
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 29eb7505bc..1dc9bd02a6 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -152,7 +152,7 @@ STATE_WAITING   = 3
 STATE_STOPPED   = 4
 STATE_ZOMBIE    = 5
 
-STATE_COLORS = [(0, 0, 0, 0), PROC_COLOR_R, PROC_COLOR_S, PROC_COLOR_D, \
+STATE_COLORS = [(0, 0, 0, 0), PROC_COLOR_R, PROC_COLOR_S, PROC_COLOR_D,
         PROC_COLOR_T, PROC_COLOR_Z, PROC_COLOR_X, PROC_COLOR_W]
 
 # CumulativeStats Types
@@ -256,7 +256,7 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
     ctx.set_line_width(0.5)
     x_shift = proc_tree.start_time
 
-    def transform_point_coords(point, x_base, y_base, \
+    def transform_point_coords(point, x_base, y_base,
                    xscale, yscale, x_trans, y_trans):
         x = (point[0] - x_base) * xscale + x_trans
         y = (point[1] - y_base) * -yscale + y_trans + chart_bounds[3]
@@ -278,15 +278,15 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
         yscale = float(chart_bounds[3]) / max_y
         ybase = 0
 
-    first = transform_point_coords (data[0], x_shift, ybase, xscale, yscale, \
+    first = transform_point_coords (data[0], x_shift, ybase, xscale, yscale,
                         chart_bounds[0], chart_bounds[1])
-    last =  transform_point_coords (data[-1], x_shift, ybase, xscale, yscale, \
+    last =  transform_point_coords (data[-1], x_shift, ybase, xscale, yscale,
                         chart_bounds[0], chart_bounds[1])
 
     ctx.set_source_rgba(*color)
     ctx.move_to(*first)
     for point in data:
-        x, y = transform_point_coords (point, x_shift, ybase, xscale, yscale, \
+        x, y = transform_point_coords (point, x_shift, ybase, xscale, yscale,
                            chart_bounds[0], chart_bounds[1])
         ctx.line_to(x, y)
     if fill:
@@ -370,12 +370,12 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
         if clip_visible (clip, chart_rect):
             draw_box_ticks (ctx, chart_rect, sec_w)
             draw_annotations (ctx, proc_tree, trace.times, chart_rect)
-            draw_chart (ctx, IO_COLOR, True, chart_rect, \
-                    [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], \
+            draw_chart (ctx, IO_COLOR, True, chart_rect,
+                    [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats],
                     proc_tree, None)
             # render CPU load
-            draw_chart (ctx, CPU_COLOR, True, chart_rect, \
-                    [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], \
+            draw_chart (ctx, CPU_COLOR, True, chart_rect,
+                    [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats],
                     proc_tree, None)
 
         curr_y = curr_y + 30 + bar_h
@@ -390,15 +390,15 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
         if clip_visible (clip, chart_rect):
             draw_box_ticks (ctx, chart_rect, sec_w)
             draw_annotations (ctx, proc_tree, trace.times, chart_rect)
-            draw_chart (ctx, IO_COLOR, True, chart_rect, \
-                    [(sample.time, sample.util) for sample in trace.disk_stats], \
+            draw_chart (ctx, IO_COLOR, True, chart_rect,
+                    [(sample.time, sample.util) for sample in trace.disk_stats],
                     proc_tree, None)
 
         # render disk throughput
         max_sample = max (trace.disk_stats, key = lambda s: s.tput)
         if clip_visible (clip, chart_rect):
-            draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect, \
-                    [(sample.time, sample.tput) for sample in trace.disk_stats], \
+            draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect,
+                    [(sample.time, sample.tput) for sample in trace.disk_stats],
                     proc_tree, None)
 
         pos_x = off_x + ((max_sample.time - proc_tree.start_time) * w / proc_tree.duration)
@@ -450,7 +450,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
             draw_box_ticks (ctx, chart_rect, sec_w)
             draw_annotations (ctx, proc_tree, trace.times, chart_rect)
             for i in range(len(volumes), 0, -1):
-                draw_chart (ctx, VOLUME_COLORS[(i - 1) % len(VOLUME_COLORS)], True, chart_rect, \
+                draw_chart (ctx, VOLUME_COLORS[(i - 1) % len(VOLUME_COLORS)], True, chart_rect,
                             [(sample.time,
                               # Sum up used space of all volumes including the current one
                               # so that the graphs appear as stacked on top of each other.
@@ -472,21 +472,21 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
         draw_legend_box(ctx, "Mem cached (scale: %u MiB)" % (float(mem_scale) / 1024), MEM_CACHED_COLOR, off_x, curr_y+20, leg_s)
         draw_legend_box(ctx, "Used", MEM_USED_COLOR, off_x + 240, curr_y+20, leg_s)
         draw_legend_box(ctx, "Buffers", MEM_BUFFERS_COLOR, off_x + 360, curr_y+20, leg_s)
-        draw_legend_line(ctx, "Swap (scale: %u MiB)" % max([(sample.swap)/1024 for sample in mem_stats]), \
+        draw_legend_line(ctx, "Swap (scale: %u MiB)" % max([(sample.swap)/1024 for sample in mem_stats]),
                  MEM_SWAP_COLOR, off_x + 480, curr_y+20, leg_s)
         draw_box_ticks(ctx, chart_rect, sec_w)
         draw_annotations(ctx, proc_tree, trace.times, chart_rect)
-        draw_chart(ctx, MEM_BUFFERS_COLOR, True, chart_rect, \
-               [(sample.time, sample.buffers) for sample in trace.mem_stats], \
+        draw_chart(ctx, MEM_BUFFERS_COLOR, True, chart_rect,
+               [(sample.time, sample.buffers) for sample in trace.mem_stats],
                proc_tree, [0, mem_scale])
-        draw_chart(ctx, MEM_USED_COLOR, True, chart_rect, \
-               [(sample.time, sample.used) for sample in mem_stats], \
+        draw_chart(ctx, MEM_USED_COLOR, True, chart_rect,
+               [(sample.time, sample.used) for sample in mem_stats],
                proc_tree, [0, mem_scale])
-        draw_chart(ctx, MEM_CACHED_COLOR, True, chart_rect, \
-               [(sample.time, sample.cached) for sample in mem_stats], \
+        draw_chart(ctx, MEM_CACHED_COLOR, True, chart_rect,
+               [(sample.time, sample.cached) for sample in mem_stats],
                proc_tree, [0, mem_scale])
-        draw_chart(ctx, MEM_SWAP_COLOR, False, chart_rect, \
-               [(sample.time, float(sample.swap)) for sample in mem_stats], \
+        draw_chart(ctx, MEM_SWAP_COLOR, False, chart_rect,
+               [(sample.time, float(sample.swap)) for sample in mem_stats],
                proc_tree, None)
 
         curr_y = curr_y + meminfo_bar_h
@@ -496,17 +496,17 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
 def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
     chart_rect = [off_x, curr_y+header_h, w, h - curr_y - 1 * off_y - header_h  ]
 
-    draw_legend_box (ctx, "Configure", \
+    draw_legend_box (ctx, "Configure",
              TASK_COLOR_CONFIGURE, off_x  , curr_y + 45, leg_s)
-    draw_legend_box (ctx, "Compile", \
+    draw_legend_box (ctx, "Compile",
              TASK_COLOR_COMPILE, off_x+120, curr_y + 45, leg_s)
-    draw_legend_box (ctx, "Install", \
+    draw_legend_box (ctx, "Install",
              TASK_COLOR_INSTALL, off_x+240, curr_y + 45, leg_s)
-    draw_legend_box (ctx, "Populate Sysroot", \
+    draw_legend_box (ctx, "Populate Sysroot",
              TASK_COLOR_SYSROOT, off_x+360, curr_y + 45, leg_s)
-    draw_legend_box (ctx, "Package", \
+    draw_legend_box (ctx, "Package",
              TASK_COLOR_PACKAGE, off_x+480, curr_y + 45, leg_s)
-    draw_legend_box (ctx, "Package Write", \
+    draw_legend_box (ctx, "Package Write",
              TASK_COLOR_PACKAGE_WRITE, off_x+600, curr_y + 45, leg_s)
 
     ctx.set_font_size(PROC_TEXT_FONT_SIZE)
@@ -575,7 +575,7 @@ def render(ctx, options, xscale, trace):
     ctx.select_font_face(FONT_NAME)
     draw_fill_rect(ctx, WHITE, (0, 0, max(w, MIN_IMG_W), h))
     w -= 2*off_x
-    curr_y = off_y;
+    curr_y = off_y
 
     if options.charts:
         curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
@@ -595,7 +595,7 @@ def render(ctx, options, xscale, trace):
     if not options.kernel_only:
         curr_y = draw_header (ctx, trace.headers, duration)
     else:
-        curr_y = off_y;
+        curr_y = off_y
 
     # draw process boxes
     proc_height = h
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index b42dac6b88..d527bce2fc 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -297,7 +297,8 @@ def _parse_proc_ps_log(writer, file):
     timed_blocks = _parse_timed_blocks(file)
     for time, lines in timed_blocks:
         for line in lines:
-            if not line: continue
+            if not line:
+                continue
             tokens = line.split(' ')
             if len(tokens) < 21:
                 continue
@@ -352,7 +353,8 @@ def _parse_taskstats_log(writer, file):
             ltime = time
 #                       continue
         for line in lines:
-            if not line: continue
+            if not line:
+                continue
             tokens = line.split(' ')
             if len(tokens) != 6:
                 continue
@@ -380,7 +382,7 @@ def _parse_taskstats_log(writer, file):
                     process = process.split (writer, pid, cmd, ppid, time)
                     processMap[pid] = process
                 else:
-                    process.cmd = cmd;
+                    process.cmd = cmd
             else:
                 process = Process(writer, pid, cmd, ppid, time)
                 processMap[pid] = process
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py
index 9fc309b3ab..ab573329f2 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -160,7 +160,7 @@ class Process:
             self.parent = processMap.get (self.ppid)
             if self.parent == None and self.pid // 1000 > 1 and \
                 not (self.ppid == 2000 or self.pid == 2000): # kernel threads: ppid=2
-                self.writer.warn("Missing CONFIG_PROC_EVENTS: no parent for pid '%i' ('%s') with ppid '%i'" \
+                self.writer.warn("Missing CONFIG_PROC_EVENTS: no parent for pid '%i' ('%s') with ppid '%i'"
                                  % (self.pid,self.cmd,self.ppid))
 
     def get_end_time(self):
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
index c005cf341f..18943f3037 100644
--- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
+++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
@@ -51,7 +51,7 @@ class TestBCParser(unittest.TestCase):
 
 		ps_data = open(self.mk_fname('extract2.proc_ps.log'))
 		for index, line in enumerate(ps_data):
-			tokens = line.split();
+			tokens = line.split()
 			process = sorted_processes[index]
 			if debug:
 				print(tokens[0:4])
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py b/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
index 6f46a1c03d..47249056fd 100644
--- a/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
+++ b/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
@@ -24,7 +24,7 @@ class TestProcessTree(unittest.TestCase):
 
         parsing.parse_file(writer, trace, self.mk_fname('proc_ps.log'))
         trace.compile(writer)
-        self.processtree = process_tree.ProcessTree(writer, None, trace.ps_stats, \
+        self.processtree = process_tree.ProcessTree(writer, None, trace.ps_stats,
             trace.ps_stats.sample_period, None, options.prune, None, None, False, for_testing = True)
 
     def mk_fname(self,f):
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index 8c0fdb986a..692a9d5ed6 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -95,7 +95,7 @@ def change_interpreter(elf_file_name):
             if p_filesz == 0:
                 break
             if (len(new_dl_path) >= p_filesz):
-                print("ERROR: could not relocate %s, interp size = %i and %i is needed." \
+                print("ERROR: could not relocate %s, interp size = %i and %i is needed."
                     % (elf_file_name, p_memsz, len(new_dl_path) + 1))
                 break
             dl_path = new_dl_path + b("\0") * (p_filesz - len(new_dl_path))
@@ -149,7 +149,7 @@ def change_dl_sysdirs(elf_file_name):
                 new_ldsocache_path = old_prefix.sub(new_prefix, ldsocache_path)
                 new_ldsocache_path = new_ldsocache_path.rstrip(b("\0"))
                 if (len(new_ldsocache_path) >= sh_size):
-                    print("ERROR: could not relocate %s, .ldsocache section size = %i and %i is needed." \
+                    print("ERROR: could not relocate %s, .ldsocache section size = %i and %i is needed."
                     % (elf_file_name, sh_size, len(new_ldsocache_path)))
                     sys.exit(-1)
                 # pad with zeros
@@ -164,7 +164,7 @@ def change_dl_sysdirs(elf_file_name):
                     new_path = old_prefix.sub(new_prefix, path)
                     new_path = new_path.rstrip(b("\0"))
                     if (len(new_path) >= 4096):
-                        print("ERROR: could not relocate %s, max path size = 4096 and %i is needed." \
+                        print("ERROR: could not relocate %s, max path size = 4096 and %i is needed."
                         % (elf_file_name, len(new_path)))
                         sys.exit(-1)
                     # pad with zeros
@@ -227,8 +227,8 @@ for e in executables_list:
     except IOError:
         exctype, ioex = sys.exc_info()[:2]
         if ioex.errno == errno.ETXTBSY:
-            print("Could not open %s. File used by another process.\nPlease "\
-                  "make sure you exit all processes that might use any SDK "\
+            print("Could not open %s. File used by another process.\nPlease "
+                  "make sure you exit all processes that might use any SDK "
                   "binaries." % e)
         else:
             print("Could not open %s: %s(%d)" % (e, ioex.strerror, ioex.errno))
diff --git a/scripts/runqemu b/scripts/runqemu
index 1f332ef525..2f2ef17fa1 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -521,7 +521,7 @@ class BaseConfig(object):
                     unknown_arg = arg
                 else:
                     raise RunQemuError("Can't handle two unknown args: %s %s\n"
-                                       "Try 'runqemu help' on how to use it" % \
+                                       "Try 'runqemu help' on how to use it" %
                                         (unknown_arg, arg))
         # Check to make sure it is a valid machine
         if unknown_arg and self.get('MACHINE') != unknown_arg:
@@ -1239,7 +1239,7 @@ class BaseConfig(object):
                         logger.info('Using ide drive')
                         vm_drive = "-drive file=%s,format=%s" % (self.rootfs, rootfs_format)
                     elif drive_type.startswith("/dev/vdb"):
-                        logger.info('Using block virtio drive');
+                        logger.info('Using block virtio drive')
                         vm_drive = '-drive id=disk0,file=%s,if=none,format=%s -device virtio-blk-device,drive=disk0%s' \
                                     % (self.rootfs, rootfs_format,qb_rootfs_extra_opt)
                     else:
diff --git a/scripts/tiny/dirsize.py b/scripts/tiny/dirsize.py
index 501516b0d4..8e41126183 100755
--- a/scripts/tiny/dirsize.py
+++ b/scripts/tiny/dirsize.py
@@ -67,7 +67,7 @@ def main():
         minsize = int(sys.argv[1])
     rootfs = Record.create(".")
     total = rootfs.show(minsize)
-    print("Displayed %d/%d bytes (%.2f%%)" % \
+    print("Displayed %d/%d bytes (%.2f%%)" %
           (total, rootfs.size, 100 * float(total) / rootfs.size))
 
 
diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
index db2b9ec39f..01c561b9a9 100755
--- a/scripts/tiny/ksize.py
+++ b/scripts/tiny/ksize.py
@@ -39,7 +39,7 @@ class Sizes:
             self.text = self.data = self.bss = self.total = 0
 
     def show(self, indent=""):
-        print("%-32s %10d | %10d %10d %10d" % \
+        print("%-32s %10d | %10d %10d %10d" %
               (indent+self.title, self.total, self.text, self.data, self.bss))
 
 
@@ -85,7 +85,7 @@ class Report:
 
     def show(self, indent=""):
         rule = str.ljust(indent, 80, '-')
-        print("%-32s %10s | %10s %10s %10s" % \
+        print("%-32s %10s | %10s %10s %10s" %
               (indent+self.title, "total", "text", "data", "bss"))
         print(rule)
         self.sizes.show(indent)
@@ -94,10 +94,10 @@ class Report:
             if p.sizes.total > 0:
                 p.sizes.show(indent)
         print(rule)
-        print("%-32s %10d | %10d %10d %10d" % \
+        print("%-32s %10d | %10d %10d %10d" %
               (indent+"sum", self.totals["total"], self.totals["text"],
                self.totals["data"], self.totals["bss"]))
-        print("%-32s %10d | %10d %10d %10d" % \
+        print("%-32s %10d | %10d %10d %10d" %
               (indent+"delta", self.deltas["total"], self.deltas["text"],
                self.deltas["data"], self.deltas["bss"]))
         print("\n")
diff --git a/scripts/tiny/ksum.py b/scripts/tiny/ksum.py
index 8f0e4c0517..e1ca4033f5 100755
--- a/scripts/tiny/ksum.py
+++ b/scripts/tiny/ksum.py
@@ -78,7 +78,7 @@ def add_ko_file(filename):
         if len(output) > 2:
             sizes = output[-1].split()[0:4]
             if verbose:
-                print("     %10d %10d %10d %10d\t" % \
+                print("     %10d %10d %10d %10d\t" %
                     (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])), end=' ')
                 print("%s" % filename[len(os.getcwd()) + 1:])
             global n_ko_files, ko_text, ko_data, ko_bss, ko_total
@@ -94,7 +94,7 @@ def get_vmlinux_totals():
         if len(output) > 2:
             sizes = output[-1].split()[0:4]
             if verbose:
-                print("     %10d %10d %10d %10d\t" % \
+                print("     %10d %10d %10d %10d\t" %
                     (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])), end=' ')
                 print("%s" % vmlinux_file[len(os.getcwd()) + 1:])
             global vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total
@@ -132,16 +132,16 @@ def main():
     print("\nTotals:")
     print("\nvmlinux:")
     print("    text\tdata\t\tbss\t\ttotal")
-    print("    %-10d\t%-10d\t%-10d\t%-10d" % \
+    print("    %-10d\t%-10d\t%-10d\t%-10d" %
         (vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total))
     print("\nmodules (%d):" % n_ko_files)
     print("    text\tdata\t\tbss\t\ttotal")
-    print("    %-10d\t%-10d\t%-10d\t%-10d" % \
+    print("    %-10d\t%-10d\t%-10d\t%-10d" %
         (ko_text, ko_data, ko_bss, ko_total))
     print("\nvmlinux + modules:")
     print("    text\tdata\t\tbss\t\ttotal")
-    print("    %-10d\t%-10d\t%-10d\t%-10d" % \
-        (vmlinux_text + ko_text, vmlinux_data + ko_data, \
+    print("    %-10d\t%-10d\t%-10d\t%-10d" %
+        (vmlinux_text + ko_text, vmlinux_data + ko_data,
          vmlinux_bss + ko_bss, vmlinux_total + ko_total))
 
 if __name__ == "__main__":
diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer
index 44e77b73d0..c345ca5674 100755
--- a/scripts/yocto-check-layer
+++ b/scripts/yocto-check-layer
@@ -107,12 +107,12 @@ def main():
     logger.info("Detected layers:")
     for layer in layers:
         if layer['type'] == LayerType.ERROR_BSP_DISTRO:
-            logger.error("%s: Can't be DISTRO and BSP type at the same time."\
-                     " Both conf/distro and conf/machine folders were found."\
+            logger.error("%s: Can't be DISTRO and BSP type at the same time."
+                     " Both conf/distro and conf/machine folders were found."
                      % layer['name'])
             layers.remove(layer)
         elif layer['type'] == LayerType.ERROR_NO_LAYER_CONF:
-            logger.info("%s: Doesn't have conf/layer.conf file, so ignoring"\
+            logger.info("%s: Doesn't have conf/layer.conf file, so ignoring"
                      % layer['name'])
             layers.remove(layer)
         else:
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/8] PEP8 double aggressive E251 and E252
  2021-06-28  5:59 [PATCH 1/8] PEP8 double aggressive E401 Khem Raj
  2021-06-28  5:59 ` [PATCH 2/8] PEP8 double aggressive E701, E70 and E502 Khem Raj
@ 2021-06-28  5:59 ` Khem Raj
  2021-06-28  5:59 ` [PATCH 4/8] PEP8 double aggressive E20 and E211 Khem Raj
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Khem Raj @ 2021-06-28  5:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: persianpros, Khem Raj

From: persianpros <persianpros@yahoo.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../lib/oeqa/runtime/cases/dnf_runtime.py     |  8 ++--
 .../lib/oeqa/selftest/cases/external-layer.py |  2 +-
 meta/lib/oe/buildhistory_analysis.py          |  2 +-
 meta/lib/oe/cachedpath.py                     |  2 +-
 meta/lib/oe/classextend.py                    |  6 +--
 meta/lib/oe/package_manager/rpm/__init__.py   |  8 ++--
 meta/lib/oe/patch.py                          | 26 ++++++-------
 meta/lib/oe/path.py                           |  2 +-
 meta/lib/oe/prservice.py                      |  2 +-
 meta/lib/oe/sstatesig.py                      |  4 +-
 meta/lib/oe/terminal.py                       |  2 +-
 meta/lib/oe/types.py                          |  2 +-
 meta/lib/oe/utils.py                          |  2 +-
 meta/lib/oeqa/core/case.py                    |  2 +-
 meta/lib/oeqa/core/runner.py                  | 22 +++++------
 meta/lib/oeqa/core/target/qemu.py             |  4 +-
 meta/lib/oeqa/core/tests/test_decorators.py   |  2 +-
 meta/lib/oeqa/core/utils/concurrencytest.py   | 18 ++++-----
 meta/lib/oeqa/oetest.py                       |  2 +-
 meta/lib/oeqa/runexported.py                  |  2 +-
 meta/lib/oeqa/runtime/cases/apt.py            |  2 +-
 meta/lib/oeqa/runtime/cases/boot.py           |  2 +-
 meta/lib/oeqa/runtime/cases/buildcpio.py      |  2 +-
 .../lib/oeqa/runtime/cases/buildgalculator.py |  2 +-
 meta/lib/oeqa/runtime/cases/buildlzip.py      |  2 +-
 meta/lib/oeqa/runtime/cases/dnf.py            |  2 +-
 meta/lib/oeqa/runtime/cases/logrotate.py      | 18 ++++-----
 meta/lib/oeqa/runtime/cases/opkg.py           |  2 +-
 meta/lib/oeqa/runtime/cases/pam.py            |  8 ++--
 meta/lib/oeqa/runtime/cases/parselogs.py      |  2 +-
 meta/lib/oeqa/runtime/cases/ping.py           |  2 +-
 meta/lib/oeqa/runtime/cases/scp.py            |  2 +-
 meta/lib/oeqa/runtime/cases/storage.py        | 20 +++++-----
 meta/lib/oeqa/runtime/cases/suspend.py        |  6 +--
 meta/lib/oeqa/runtime/cases/usb_hid.py        |  4 +-
 meta/lib/oeqa/selftest/cases/bblayers.py      | 18 ++++-----
 meta/lib/oeqa/selftest/cases/bbtests.py       | 28 +++++++-------
 meta/lib/oeqa/selftest/cases/binutils.py      |  2 +-
 meta/lib/oeqa/selftest/cases/buildoptions.py  | 20 +++++-----
 meta/lib/oeqa/selftest/cases/devtool.py       |  4 +-
 meta/lib/oeqa/selftest/cases/gcc.py           |  6 +--
 meta/lib/oeqa/selftest/cases/glibc.py         |  6 +--
 meta/lib/oeqa/selftest/cases/manifest.py      |  6 +--
 .../oeqa/selftest/cases/oelib/buildhistory.py | 12 +++---
 meta/lib/oeqa/selftest/cases/oelib/path.py    |  6 +--
 meta/lib/oeqa/selftest/cases/pkgdata.py       |  2 +-
 meta/lib/oeqa/selftest/cases/sstatetests.py   |  6 +--
 meta/lib/oeqa/targetcontrol.py                | 38 +++++++++----------
 meta/lib/oeqa/utils/__init__.py               |  2 +-
 meta/lib/oeqa/utils/network.py                |  2 +-
 meta/lib/oeqa/utils/nfs.py                    |  8 ++--
 meta/lib/oeqa/utils/qemurunner.py             |  8 ++--
 meta/lib/oeqa/utils/qemutinyrunner.py         |  2 +-
 meta/lib/oeqa/utils/sshcontrol.py             |  2 +-
 .../glibc/glibc/check-test-wrapper            |  2 +-
 scripts/bitbake-whatchanged                   | 10 ++---
 scripts/buildhistory-collect-srcrevs          | 10 ++---
 scripts/buildhistory-diff                     |  2 +-
 scripts/combo-layer                           | 30 +++++++--------
 scripts/contrib/list-packageconfig-flags.py   | 10 ++---
 scripts/contrib/verify-homepage.py            |  2 +-
 scripts/lib/checklayer/__init__.py            |  2 +-
 scripts/lib/scriptutils.py                    |  2 +-
 scripts/lib/wic/ksparser.py                   |  2 +-
 scripts/lib/wic/partition.py                  |  2 +-
 scripts/lib/wic/plugins/source/rootfs.py      |  2 +-
 scripts/oe-depends-dot                        | 10 ++---
 scripts/pybootchartgui/pybootchartgui/draw.py |  4 +-
 .../pybootchartgui/process_tree.py            |  8 ++--
 .../pybootchartgui/pybootchartgui/samples.py  |  2 +-
 .../pybootchartgui/tests/process_tree_test.py |  2 +-
 71 files changed, 238 insertions(+), 238 deletions(-)

diff --git a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
index 64a3502370..837a15730a 100644
--- a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
+++ b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
@@ -41,10 +41,10 @@ class DnfSelftest(DnfTest):
         import re
         # Use '-y' for non-interactive mode: automatically import the feed signing key
         output_makecache = self.dnf('-vy makecache')
-        self.assertTrue(re.match(r".*Failed to synchronize cache", output_makecache, re.DOTALL) is None, msg = "dnf makecache failed to synchronize repo: %s" %(output_makecache))
-        self.assertTrue(re.match(r".*Metadata cache created", output_makecache, re.DOTALL) is not None, msg = "dnf makecache failed: %s" %(output_makecache))
+        self.assertTrue(re.match(r".*Failed to synchronize cache", output_makecache, re.DOTALL) is None, msg="dnf makecache failed to synchronize repo: %s" %(output_makecache))
+        self.assertTrue(re.match(r".*Metadata cache created", output_makecache, re.DOTALL) is not None, msg="dnf makecache failed: %s" %(output_makecache))
 
         output_repoinfo = self.dnf('-v repoinfo')
         matchobj = re.match(r".*Repo-pkgs\s*:\s*(?P<n_pkgs>[0-9]+)", output_repoinfo, re.DOTALL)
-        self.assertTrue(matchobj is not None, msg = "Could not find the amount of packages in dnf repoinfo output: %s" %(output_repoinfo))
-        self.assertTrue(int(matchobj.group('n_pkgs')) > 0, msg = "Amount of remote packages is not more than zero: %s\n" %(output_repoinfo))
+        self.assertTrue(matchobj is not None, msg="Could not find the amount of packages in dnf repoinfo output: %s" %(output_repoinfo))
+        self.assertTrue(int(matchobj.group('n_pkgs')) > 0, msg="Amount of remote packages is not more than zero: %s\n" %(output_repoinfo))
diff --git a/meta-selftest/lib/oeqa/selftest/cases/external-layer.py b/meta-selftest/lib/oeqa/selftest/cases/external-layer.py
index 59b1afab7d..351332bf2c 100644
--- a/meta-selftest/lib/oeqa/selftest/cases/external-layer.py
+++ b/meta-selftest/lib/oeqa/selftest/cases/external-layer.py
@@ -13,4 +13,4 @@ class ImportedTests(OESelftestTestCase):
         Author: Mariano Lopez <mariano.lopez@intel.com
         """
 
-        self.assertEqual(True, True, msg = "Impossible to fail this test")
+        self.assertEqual(True, True, msg="Impossible to fail this test")
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 9869564e7f..5a50eef711 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -215,7 +215,7 @@ class FileChange:
     changetype_link = 'L'
     changetype_move = 'M'
 
-    def __init__(self, path, changetype, oldvalue = None, newvalue = None):
+    def __init__(self, path, changetype, oldvalue=None, newvalue=None):
         self.path = path
         self.changetype = changetype
         self.oldvalue = oldvalue
diff --git a/meta/lib/oe/cachedpath.py b/meta/lib/oe/cachedpath.py
index 254257a83f..607421e29d 100644
--- a/meta/lib/oe/cachedpath.py
+++ b/meta/lib/oe/cachedpath.py
@@ -198,7 +198,7 @@ class CachedPath(object):
 
         return (file, is_dir)
 
-    def realpath(self, file, root, use_physdir = True, loop_cnt = 100, assume_dir = False):
+    def realpath(self, file, root, use_physdir=True, loop_cnt=100, assume_dir=False):
         """ Returns the canonical path of 'file' with assuming a
         toplevel 'root' directory. When 'use_physdir' is set, all
         preceding path components of 'file' will be resolved first;
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py
index d3d8fbe724..20366f78be 100644
--- a/meta/lib/oe/classextend.py
+++ b/meta/lib/oe/classextend.py
@@ -40,7 +40,7 @@ class ClassExtender(object):
             return self.extname + "-" + name
         return name
 
-    def map_variable(self, varname, setvar = True):
+    def map_variable(self, varname, setvar=True):
         var = self.d.getVar(varname)
         if not var:
             return ""
@@ -53,7 +53,7 @@ class ClassExtender(object):
             self.d.setVar(varname, newdata)
         return newdata
 
-    def map_regexp_variable(self, varname, setvar = True):
+    def map_regexp_variable(self, varname, setvar=True):
         var = self.d.getVar(varname)
         if not var:
             return ""
@@ -84,7 +84,7 @@ class ClassExtender(object):
                         return dep
             return self.extend_name(dep)
 
-    def map_depends_variable(self, varname, suffix = ""):
+    def map_depends_variable(self, varname, suffix=""):
         # We need to preserve EXTENDPKGV so it can be expanded correctly later
         if suffix:
             varname = varname + "_" + suffix
diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py
index b392581069..c5419a3bc7 100644
--- a/meta/lib/oe/package_manager/rpm/__init__.py
+++ b/meta/lib/oe/package_manager/rpm/__init__.py
@@ -181,7 +181,7 @@ class RpmPM(PackageManager):
         os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
 
 
-    def install(self, pkgs, attempt_only = False):
+    def install(self, pkgs, attempt_only=False):
         if len(pkgs) == 0:
             return
         self._prepare_pkg_transaction()
@@ -208,7 +208,7 @@ class RpmPM(PackageManager):
         if len(failed_scriptlets_pkgnames) > 0:
             failed_postinsts_abort(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
 
-    def remove(self, pkgs, with_dependencies = True):
+    def remove(self, pkgs, with_dependencies=True):
         if not pkgs:
             return
 
@@ -268,7 +268,7 @@ class RpmPM(PackageManager):
 
     def list_installed(self):
         output = self._invoke_dnf(["repoquery", "--installed", "--queryformat", "Package: %{name} %{arch} %{version} %{name}-%{version}-%{release}.%{arch}.rpm\nDependencies:\n%{requires}\nRecommendations:\n%{recommends}\nDependenciesEndHere:\n"],
-                                  print_output = False)
+                                  print_output=False)
         packages = {}
         current_package = None
         current_deps = None
@@ -300,7 +300,7 @@ class RpmPM(PackageManager):
     def update(self):
         self._invoke_dnf(["makecache", "--refresh"])
 
-    def _invoke_dnf(self, dnf_args, fatal = True, print_output = True ):
+    def _invoke_dnf(self, dnf_args, fatal=True, print_output=True ):
         os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs
 
         dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf")
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index fccbedb519..eeea18ef04 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -23,7 +23,7 @@ class CmdError(bb.BBHandledException):
                 (self.command, self.status, self.output)
 
 
-def runcmd(args, dir = None):
+def runcmd(args, dir=None):
     import pipes
     import subprocess
 
@@ -106,7 +106,7 @@ class PatchSet(object):
     def Pop(self, force):
         raise NotImplementedError()
 
-    def Refresh(self, remote = None, all = None):
+    def Refresh(self, remote=None, all=None):
         raise NotImplementedError()
 
     @staticmethod
@@ -199,7 +199,7 @@ class PatchTree(PatchSet):
         patch['strippath'] = p.split(",")[1]
         self._applypatch(patch, False, True)
 
-    def _removePatchFile(self, all = False):
+    def _removePatchFile(self, all=False):
         if not os.path.exists(self.seriespath):
             return
         with open(self.seriespath, 'r+') as f:
@@ -215,7 +215,7 @@ class PatchTree(PatchSet):
             for p in patches:
                 f.write(p)
          
-    def Import(self, patch, force = None):
+    def Import(self, patch, force=None):
         """"""
         PatchSet.Import(self, patch, force)
 
@@ -225,7 +225,7 @@ class PatchTree(PatchSet):
             i = 0
         self.patches.insert(i, patch)
 
-    def _applypatch(self, patch, force = False, reverse = False, run = True):
+    def _applypatch(self, patch, force=False, reverse=False, run=True):
         shellcmd = ["cat", patch['file'], "|", "patch", "--no-backup-if-mismatch", "-p", patch['strippath']]
         if reverse:
             shellcmd.append('-R')
@@ -253,7 +253,7 @@ class PatchTree(PatchSet):
 
         return output
 
-    def Push(self, force = False, all = False, run = True):
+    def Push(self, force=False, all=False, run=True):
         bb.note("self._current is %s" % self._current)
         bb.note("patches is %s" % self.patches)
         if all:
@@ -273,7 +273,7 @@ class PatchTree(PatchSet):
             self._current = next
             return ret
 
-    def Pop(self, force = None, all = None):
+    def Pop(self, force=None, all=None):
         if all:
             self._removePatchFile(True)
             self._current = None
@@ -478,10 +478,10 @@ class GitApplyTree(PatchTree):
         finally:
             shutil.rmtree(tempdir)
 
-    def _applypatch(self, patch, force = False, reverse = False, run = True):
+    def _applypatch(self, patch, force=False, reverse=False, run=True):
         import shutil
 
-        def _applypatchhelper(shellcmd, patch, force = False, reverse = False, run = True):
+        def _applypatchhelper(shellcmd, patch, force=False, reverse=False, run=True):
             if reverse:
                 shellcmd.append('-R')
 
@@ -560,7 +560,7 @@ class GitApplyTree(PatchTree):
 
 
 class QuiltTree(PatchSet):
-    def _runcmd(self, args, run = True):
+    def _runcmd(self, args, run=True):
         quiltrc = self.d.getVar('QUILTRCFILE')
         if not run:
             return ["quilt"] + ["--quiltrc"] + [quiltrc] + args
@@ -616,7 +616,7 @@ class QuiltTree(PatchSet):
                     self._current = self.patches.index(patch)
         self.initialized = True
 
-    def Import(self, patch, force = None):
+    def Import(self, patch, force=None):
         if not self.initialized:
             self.InitFromDir()
         PatchSet.Import(self, patch, force)
@@ -633,7 +633,7 @@ class QuiltTree(PatchSet):
         self.patches.insert(self._current or 0, patch)
 
 
-    def Push(self, force = False, all = False, run = True):
+    def Push(self, force=False, all=False, run=True):
         # quilt push [-f]
 
         args = ["push"]
@@ -651,7 +651,7 @@ class QuiltTree(PatchSet):
         else:
             self._current = 0
 
-    def Pop(self, force = None, all = None):
+    def Pop(self, force=None, all=None):
         # quilt pop [-f]
         args = ["pop"]
         if force:
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index c8d8ad05b9..c92a4f98cd 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -229,7 +229,7 @@ def __realpath(file, root, loop_cnt, assume_dir):
 
     return (file, is_dir)
 
-def realpath(file, root, use_physdir = True, loop_cnt = 100, assume_dir = False):
+def realpath(file, root, use_physdir=True, loop_cnt=100, assume_dir=False):
     """ Returns the canonical path of 'file' with assuming a
     toplevel 'root' directory. When 'use_physdir' is set, all
     preceding path components of 'file' will be resolved first;
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
index a8d82783c4..afc8ea23bc 100644
--- a/meta/lib/oe/prservice.py
+++ b/meta/lib/oe/prservice.py
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
-def prserv_make_conn(d, check = False):
+def prserv_make_conn(d, check=False):
     import prserv.serv
     host_params = list([_f for _f in (d.getVar("PRSERV_HOST") or '').split(':') if _f])
     try:
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 47f3ca4efb..5198203367 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -90,7 +90,7 @@ class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
         self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split()
         self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split()
         pass
-    def rundep_check(self, fn, recipename, task, dep, depname, dataCaches = None):
+    def rundep_check(self, fn, recipename, task, dep, depname, dataCaches=None):
         return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCaches)
 
 class SignatureGeneratorOEBasicHashMixIn(object):
@@ -131,7 +131,7 @@ class SignatureGeneratorOEBasicHashMixIn(object):
             newsafedeps.append(a1 + "->" + a2)
         self.saferecipedeps = newsafedeps
 
-    def rundep_check(self, fn, recipename, task, dep, depname, dataCaches = None):
+    def rundep_check(self, fn, recipename, task, dep, depname, dataCaches=None):
         return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCaches)
 
     def get_taskdata(self):
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 80e76adc21..116c104536 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -234,7 +234,7 @@ def spawn(name, sh_cmd, title=None, env=None, d=None):
     # until it exits.
     import tempfile
     import time
-    pidfile = tempfile.NamedTemporaryFile(delete = False).name
+    pidfile = tempfile.NamedTemporaryFile(delete=False).name
     try:
         sh_cmd = bb.utils.which(os.getenv('PATH'), "oe-gnome-terminal-phonehome") + " " + pidfile + " " + sh_cmd
         pipe = terminal(sh_cmd, title, env, d)
diff --git a/meta/lib/oe/types.py b/meta/lib/oe/types.py
index bbbabafbf6..ee7cc0e659 100644
--- a/meta/lib/oe/types.py
+++ b/meta/lib/oe/types.py
@@ -17,7 +17,7 @@ class OEList(list):
 
     name = "list"
 
-    def __init__(self, value, separator = None):
+    def __init__(self, value, separator=None):
         if value is not None:
             list.__init__(self, value.split(separator))
         else:
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index c9b2be9dc3..b33d049722 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -17,7 +17,7 @@ def read_file(filename):
         return data
     return None
 
-def ifelse(condition, iftrue = True, iffalse = False):
+def ifelse(condition, iftrue=True, iffalse=False):
     if condition:
         return iftrue
     else:
diff --git a/meta/lib/oeqa/core/case.py b/meta/lib/oeqa/core/case.py
index 0a8aff182e..84daa343d8 100644
--- a/meta/lib/oeqa/core/case.py
+++ b/meta/lib/oeqa/core/case.py
@@ -74,7 +74,7 @@ class OEPTestResultTestCase:
             self.extraresults = {"ptestresult.sections" : {}}
         self.extraresults["ptestresult.rawlogs"] = {"log" : self._compress_log(log)}
 
-    def ptest_section(self, section, duration = None, log = None, logfile = None, exitcode = None):
+    def ptest_section(self, section, duration=None, log=None, logfile=None, exitcode=None):
         if not hasattr(self, "extraresults"):
             self.extraresults = {"ptestresult.sections" : {}}
 
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index d50690ab37..1d325e188d 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -130,7 +130,7 @@ class OETestResult(_TestResult):
 
         return 'UNKNOWN', None
 
-    def extractExtraResults(self, test, details = None):
+    def extractExtraResults(self, test, details=None):
         extraresults = None
         if details is not None and "extraresults" in details:
             extraresults = details.get("extraresults", {})
@@ -145,26 +145,26 @@ class OETestResult(_TestResult):
                 else:
                     self.extraresults[k] = v
 
-    def addError(self, test, *args, details = None):
-        self.extractExtraResults(test, details = details)
+    def addError(self, test, *args, details=None):
+        self.extractExtraResults(test, details=details)
         return super(OETestResult, self).addError(test, *args)
 
-    def addFailure(self, test, *args, details = None):
-        self.extractExtraResults(test, details = details)
+    def addFailure(self, test, *args, details=None):
+        self.extractExtraResults(test, details=details)
         return super(OETestResult, self).addFailure(test, *args)
 
-    def addSuccess(self, test, details = None):
+    def addSuccess(self, test, details=None):
         #Added so we can keep track of successes too
         self.successes.append((test, None))
-        self.extractExtraResults(test, details = details)
+        self.extractExtraResults(test, details=details)
         return super(OETestResult, self).addSuccess(test)
 
-    def addExpectedFailure(self, test, *args, details = None):
-        self.extractExtraResults(test, details = details)
+    def addExpectedFailure(self, test, *args, details=None):
+        self.extractExtraResults(test, details=details)
         return super(OETestResult, self).addExpectedFailure(test, *args)
 
-    def addUnexpectedSuccess(self, test, details = None):
-        self.extractExtraResults(test, details = details)
+    def addUnexpectedSuccess(self, test, details=None):
+        self.extractExtraResults(test, details=details)
         return super(OETestResult, self).addUnexpectedSuccess(test)
 
     def logDetails(self, json_file_dir=None, configuration=None, result_id=None,
diff --git a/meta/lib/oeqa/core/target/qemu.py b/meta/lib/oeqa/core/target/qemu.py
index 79fd724f7d..bb93b4ee99 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -24,7 +24,7 @@ class OEQemuTarget(OESSHTarget):
             port=None, machine='', rootfs='', kernel='', kvm=False, slirp=False,
             dump_dir='', dump_host_cmds='', display='', bootlog='',
             tmpdir='', dir_image='', boottime=60, serial_ports=2,
-            boot_patterns = defaultdict(str), ovmf=False, tmpfsdir=None, **kwargs):
+            boot_patterns=defaultdict(str), ovmf=False, tmpfsdir=None, **kwargs):
 
         super(OEQemuTarget, self).__init__(logger, None, server_ip, timeout,
                 user, port)
@@ -46,7 +46,7 @@ class OEQemuTarget(OESSHTarget):
                                  logfile=bootlog, boottime=boottime,
                                  use_kvm=kvm, use_slirp=slirp, dump_dir=dump_dir,
                                  dump_host_cmds=dump_host_cmds, logger=logger,
-                                 serial_ports=serial_ports, boot_patterns = boot_patterns, 
+                                 serial_ports=serial_ports, boot_patterns=boot_patterns, 
                                  use_ovmf=ovmf, tmpfsdir=tmpfsdir)
         dump_monitor_cmds = kwargs.get("testimage_dump_monitor")
         self.monitor_dumper = MonitorDumper(dump_monitor_cmds, dump_dir, self.runner)
diff --git a/meta/lib/oeqa/core/tests/test_decorators.py b/meta/lib/oeqa/core/tests/test_decorators.py
index 5095f39948..39e5e2164f 100755
--- a/meta/lib/oeqa/core/tests/test_decorators.py
+++ b/meta/lib/oeqa/core/tests/test_decorators.py
@@ -16,7 +16,7 @@ from oeqa.core.utils.test import getCaseMethod, getSuiteCasesNames, getSuiteCase
 
 class TestTagDecorator(TestBase):
     def _runTest(self, modules, filterfn, expect):
-        tc = self._testLoader(modules = modules, tags_filter = filterfn)
+        tc = self._testLoader(modules=modules, tags_filter=filterfn)
         test_loaded = set(getSuiteCasesIDs(tc.suites))
         self.assertEqual(expect, test_loaded)
 
diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py b/meta/lib/oeqa/core/utils/concurrencytest.py
index 161a2f6e90..678484243b 100644
--- a/meta/lib/oeqa/core/utils/concurrencytest.py
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -85,22 +85,22 @@ class ProxyTestResult:
         self.result = target
         self.failed_tests = 0
 
-    def _addResult(self, method, test, *args, exception = False, **kwargs):
+    def _addResult(self, method, test, *args, exception=False, **kwargs):
         return method(test, *args, **kwargs)
 
-    def addError(self, test, err = None, **kwargs):
+    def addError(self, test, err=None, **kwargs):
         self.failed_tests += 1
-        self._addResult(self.result.addError, test, err, exception = True, **kwargs)
+        self._addResult(self.result.addError, test, err, exception=True, **kwargs)
 
-    def addFailure(self, test, err = None, **kwargs):
+    def addFailure(self, test, err=None, **kwargs):
         self.failed_tests += 1
-        self._addResult(self.result.addFailure, test, err, exception = True, **kwargs)
+        self._addResult(self.result.addFailure, test, err, exception=True, **kwargs)
 
     def addSuccess(self, test, **kwargs):
         self._addResult(self.result.addSuccess, test, **kwargs)
 
-    def addExpectedFailure(self, test, err = None, **kwargs):
-        self._addResult(self.result.addExpectedFailure, test, err, exception = True, **kwargs)
+    def addExpectedFailure(self, test, err=None, **kwargs):
+        self._addResult(self.result.addExpectedFailure, test, err, exception=True, **kwargs)
 
     def addUnexpectedSuccess(self, test, **kwargs):
         self._addResult(self.result.addUnexpectedSuccess, test, **kwargs)
@@ -112,7 +112,7 @@ class ProxyTestResult:
         return getattr(self.result, attr)
 
 class ExtraResultsDecoderTestResult(ProxyTestResult):
-    def _addResult(self, method, test, *args, exception = False, **kwargs):
+    def _addResult(self, method, test, *args, exception=False, **kwargs):
         if "details" in kwargs and "extraresults" in kwargs["details"]:
             if isinstance(kwargs["details"]["extraresults"], Content):
                 kwargs = kwargs.copy()
@@ -126,7 +126,7 @@ class ExtraResultsDecoderTestResult(ProxyTestResult):
         return method(test, *args, **kwargs)
 
 class ExtraResultsEncoderTestResult(ProxyTestResult):
-    def _addResult(self, method, test, *args, exception = False, **kwargs):
+    def _addResult(self, method, test, *args, exception=False, **kwargs):
         if hasattr(test, "extraresults"):
             extras = lambda : [json.dumps(test.extraresults).encode()]
             kwargs = kwargs.copy()
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 1f4993c9d5..2ee67586f6 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -101,7 +101,7 @@ class oeRuntimeTest(oeTest):
         if self.tc.sigterm:
             self.fail("Got SIGTERM")
         elif (type(self.target).__name__ == "QemuTarget"):
-            self.assertTrue(self.target.check(), msg = "Qemu not running?")
+            self.assertTrue(self.target.check(), msg="Qemu not running?")
 
         self.setUpLocal()
 
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index 7e37213df6..5f087bc950 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -66,7 +66,7 @@ class FakeTarget(object):
 
 
 class MyDataDict(dict):
-    def getVar(self, key, unused = None):
+    def getVar(self, key, unused=None):
         return self.get(key, "")
 
 def main():
diff --git a/meta/lib/oeqa/runtime/cases/apt.py b/meta/lib/oeqa/runtime/cases/apt.py
index 53745df93f..1e01138760 100644
--- a/meta/lib/oeqa/runtime/cases/apt.py
+++ b/meta/lib/oeqa/runtime/cases/apt.py
@@ -10,7 +10,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 class AptTest(OERuntimeTestCase):
 
-    def pkg(self, command, expected = 0):
+    def pkg(self, command, expected=0):
         command = 'apt-get %s' % command
         status, output = self.target.run(command, 1500)
         message = os.linesep.join([command, output])
diff --git a/meta/lib/oeqa/runtime/cases/boot.py b/meta/lib/oeqa/runtime/cases/boot.py
index 2142f400a0..b801d13fc0 100644
--- a/meta/lib/oeqa/runtime/cases/boot.py
+++ b/meta/lib/oeqa/runtime/cases/boot.py
@@ -30,4 +30,4 @@ class BootTest(OERuntimeTestCase):
                 count = 0
         msg = ('Expected 5 consecutive, got %d.\n'
                'ping output is:\n%s' % (count,output))
-        self.assertEqual(count, 5, msg = msg)
+        self.assertEqual(count, 5, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/buildcpio.py b/meta/lib/oeqa/runtime/cases/buildcpio.py
index e29bf16ccb..095a82c10b 100644
--- a/meta/lib/oeqa/runtime/cases/buildcpio.py
+++ b/meta/lib/oeqa/runtime/cases/buildcpio.py
@@ -15,7 +15,7 @@ class BuildCpioTest(OERuntimeTestCase):
         uri = 'https://downloads.yoctoproject.org/mirror/sources/cpio-2.13.tar.gz'
         cls.project = TargetBuildProject(cls.tc.target,
                                          uri,
-                                         dl_dir = cls.tc.td['DL_DIR'])
+                                         dl_dir=cls.tc.td['DL_DIR'])
 
     @classmethod
     def tearDownClass(cls):
diff --git a/meta/lib/oeqa/runtime/cases/buildgalculator.py b/meta/lib/oeqa/runtime/cases/buildgalculator.py
index e5cc3e2888..f7af48c3be 100644
--- a/meta/lib/oeqa/runtime/cases/buildgalculator.py
+++ b/meta/lib/oeqa/runtime/cases/buildgalculator.py
@@ -15,7 +15,7 @@ class GalculatorTest(OERuntimeTestCase):
         uri = 'http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2'
         cls.project = TargetBuildProject(cls.tc.target,
                                          uri,
-                                         dl_dir = cls.tc.td['DL_DIR'])
+                                         dl_dir=cls.tc.td['DL_DIR'])
 
     @classmethod
     def tearDownClass(cls):
diff --git a/meta/lib/oeqa/runtime/cases/buildlzip.py b/meta/lib/oeqa/runtime/cases/buildlzip.py
index bc70b41461..ef4c9cebac 100644
--- a/meta/lib/oeqa/runtime/cases/buildlzip.py
+++ b/meta/lib/oeqa/runtime/cases/buildlzip.py
@@ -16,7 +16,7 @@ class BuildLzipTest(OERuntimeTestCase):
         uri = '%s/lzip-1.19.tar.gz' % uri
         cls.project = TargetBuildProject(cls.tc.target,
                                          uri,
-                                         dl_dir = cls.tc.td['DL_DIR'])
+                                         dl_dir=cls.tc.td['DL_DIR'])
 
     @classmethod
     def tearDownClass(cls):
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
index f40c63026e..aeef8c6086 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -14,7 +14,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 class DnfTest(OERuntimeTestCase):
 
-    def dnf(self, command, expected = 0):
+    def dnf(self, command, expected=0):
         command = 'dnf %s' % command
         status, output = self.target.run(command, 1500)
         message = os.linesep.join([command, output])
diff --git a/meta/lib/oeqa/runtime/cases/logrotate.py b/meta/lib/oeqa/runtime/cases/logrotate.py
index a4efcd07c0..7d7dbb7afb 100644
--- a/meta/lib/oeqa/runtime/cases/logrotate.py
+++ b/meta/lib/oeqa/runtime/cases/logrotate.py
@@ -27,45 +27,45 @@ class LogrotateTest(OERuntimeTestCase):
         # /var/log/wtmp may not always exist initially, so use touch to ensure it is present
         status, output = self.target.run('touch /var/log/wtmp')
         msg = ('Could not create/update /var/log/wtmp with touch')
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
 
         status, output = self.target.run('mkdir $HOME/logrotate_dir')
         msg = ('Could not create logrotate_dir. Output: %s' % output)
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
 
         status, output = self.target.run('echo "create \n olddir $HOME/logrotate_dir \n include /etc/logrotate.d/wtmp" > /tmp/logrotate-test.conf')
         msg = ('Could not write to /tmp/logrotate-test.conf')
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
         
         # If logrotate fails to rotate the log, view the verbose output of logrotate to see what prevented it
         _, logrotate_output = self.target.run('logrotate -vf /tmp/logrotate-test.conf')
         status, _ = self.target.run('find $HOME/logrotate_dir -type f | grep wtmp.1')
         msg = ("logrotate did not successfully rotate the wtmp log. Output from logrotate -vf: \n%s" % (logrotate_output))
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
        
     @OETestDepends(['logrotate.LogrotateTest.test_logrotate_wtmp'])
     def test_logrotate_newlog(self):
         
         status, output = self.target.run('echo "oeqa logrotate test file" > /var/log/logrotate_testfile')
         msg = ('Could not create logrotate test file in /var/log')
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
         
         status, output = self.target.run('echo "/var/log/logrotate_testfile {\n missingok \n monthly \n rotate 1" > /etc/logrotate.d/logrotate_testfile')
         msg = ('Could not write to /etc/logrotate.d/logrotate_testfile')
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
 
         status, output = self.target.run('echo "create \n olddir $HOME/logrotate_dir \n include /etc/logrotate.d/logrotate_testfile" > /tmp/logrotate-test2.conf')
         msg = ('Could not write to /tmp/logrotate_test2.conf')
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
 
         status, output = self.target.run('find $HOME/logrotate_dir -type f | grep logrotate_testfile.1')
         msg = ('A rotated log for logrotate_testfile is already present in logrotate_dir')
-        self.assertEqual(status, 1, msg = msg)
+        self.assertEqual(status, 1, msg=msg)
 
         # If logrotate fails to rotate the log, view the verbose output of logrotate instead of just listing the files in olddir
         _, logrotate_output = self.target.run('logrotate -vf /tmp/logrotate-test2.conf')
         status, _ = self.target.run('find $HOME/logrotate_dir -type f | grep logrotate_testfile.1')
         msg = ('logrotate did not successfully rotate the logrotate_test log. Output from logrotate -vf: \n%s' % (logrotate_output))
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
 
 
diff --git a/meta/lib/oeqa/runtime/cases/opkg.py b/meta/lib/oeqa/runtime/cases/opkg.py
index 9cfee1cd88..de96b3ff3a 100644
--- a/meta/lib/oeqa/runtime/cases/opkg.py
+++ b/meta/lib/oeqa/runtime/cases/opkg.py
@@ -10,7 +10,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 class OpkgTest(OERuntimeTestCase):
 
-    def pkg(self, command, expected = 0):
+    def pkg(self, command, expected=0):
         command = 'opkg %s' % command
         status, output = self.target.run(command, 1500)
         message = os.linesep.join([command, output])
diff --git a/meta/lib/oeqa/runtime/cases/pam.py b/meta/lib/oeqa/runtime/cases/pam.py
index a482ded945..4cd5325201 100644
--- a/meta/lib/oeqa/runtime/cases/pam.py
+++ b/meta/lib/oeqa/runtime/cases/pam.py
@@ -20,19 +20,19 @@ class PamBasicTest(OERuntimeTestCase):
         status, output = self.target.run('login --help')
         msg = ('login command does not work as expected. '
                'Status and output:%s and %s' % (status, output))
-        self.assertEqual(status, 1, msg = msg)
+        self.assertEqual(status, 1, msg=msg)
 
         status, output = self.target.run('passwd --help')
         msg = ('passwd command does not work as expected. '
                'Status and output:%s and %s' % (status, output))
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
 
         status, output = self.target.run('su --help')
         msg = ('su command does not work as expected. '
                'Status and output:%s and %s' % (status, output))
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
 
         status, output = self.target.run('useradd --help')
         msg = ('useradd command does not work as expected. '
                'Status and output:%s and %s' % (status, output))
-        self.assertEqual(status, 0, msg = msg)
+        self.assertEqual(status, 0, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/parselogs.py b/meta/lib/oeqa/runtime/cases/parselogs.py
index 1bb0425521..d58968923e 100644
--- a/meta/lib/oeqa/runtime/cases/parselogs.py
+++ b/meta/lib/oeqa/runtime/cases/parselogs.py
@@ -328,7 +328,7 @@ class ParseLogsTest(OERuntimeTestCase):
     # Grep only the errors so that their context could be collected.
     # Default context is 10 lines before and after the error itself
     def parse_logs(self, errors, ignore_errors, logs,
-                   lines_before = 10, lines_after = 10):
+                   lines_before=10, lines_after=10):
         results = {}
         rez = []
         grep_output = ''
diff --git a/meta/lib/oeqa/runtime/cases/ping.py b/meta/lib/oeqa/runtime/cases/ping.py
index f6603f75ec..d550efe17f 100644
--- a/meta/lib/oeqa/runtime/cases/ping.py
+++ b/meta/lib/oeqa/runtime/cases/ping.py
@@ -23,4 +23,4 @@ class PingTest(OERuntimeTestCase):
                 count = 0
         msg = ('Expected 5 consecutive, got %d.\n'
                'ping output is:\n%s' % (count,output))
-        self.assertEqual(count, 5, msg = msg)
+        self.assertEqual(count, 5, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/scp.py b/meta/lib/oeqa/runtime/cases/scp.py
index 3a5f292152..aca9bd673a 100644
--- a/meta/lib/oeqa/runtime/cases/scp.py
+++ b/meta/lib/oeqa/runtime/cases/scp.py
@@ -32,6 +32,6 @@ class ScpTest(OERuntimeTestCase):
         self.assertEqual(status, 0, msg=msg)
 
         (status, output) = self.target.run('ls -la %s' % dst)
-        self.assertEqual(status, 0, msg = 'SCP test failed')
+        self.assertEqual(status, 0, msg='SCP test failed')
 
         self.target.run('rm %s' % dst)
diff --git a/meta/lib/oeqa/runtime/cases/storage.py b/meta/lib/oeqa/runtime/cases/storage.py
index 166d26b252..1d037ef2e0 100644
--- a/meta/lib/oeqa/runtime/cases/storage.py
+++ b/meta/lib/oeqa/runtime/cases/storage.py
@@ -15,35 +15,35 @@ class StorageBase(OERuntimeTestCase):
         (status, output) = cls.target.run('mkdir -p %s' % cls.mount_point)
         (status, output) = cls.target.run('mount %s %s' % (cls.device, cls.mount_point))
         msg = ('Mount failed: %s.' % status)
-        cls.assertFalse(output, msg = msg)
+        cls.assertFalse(output, msg=msg)
         time.sleep(tmo)
         (status, output) = cls.target.run('cat /proc/mounts')
         match = re.search('%s' % cls.device, output)
         if match:
             msg = ('Device %s not mounted.' % cls.device)
-            cls.assertTrue(match, msg = msg)
+            cls.assertTrue(match, msg=msg)
 
         (status, output) = cls.target.run('mkdir -p %s' % cls.test_dir)
 
         (status, output) = cls.target.run('rm -f %s/*' % cls.test_dir)
         msg = ('Failed to cleanup files @ %s/*' % cls.test_dir)
-        cls.assertFalse(output, msg = msg)
+        cls.assertFalse(output, msg=msg)
 
 
     def storage_basic(cls):
         # create file on device
         (status, output) = cls.target.run('touch %s/%s' % (cls.test_dir, cls.test_file))
         msg = ('File %s not created on %s' % (cls.test_file, cls.device))
-        cls.assertFalse(status, msg = msg)
+        cls.assertFalse(status, msg=msg)
         # move file
         (status, output) = cls.target.run('mv %s/%s %s/%s1' %  
                 (cls.test_dir, cls.test_file, cls.test_dir, cls.test_file))
         msg = ('File %s not moved to %s' % (cls.test_file, cls.device))
-        cls.assertFalse(status, msg = msg)
+        cls.assertFalse(status, msg=msg)
         # remove file
         (status, output) = cls.target.run('rm %s/%s1' % (cls.test_dir, cls.test_file))
         msg = ('File %s not removed on %s' % (cls.test_file, cls.device))
-        cls.assertFalse(status, msg = msg)
+        cls.assertFalse(status, msg=msg)
 
     def storage_read(cls):
         # check if message is in file
@@ -52,14 +52,14 @@ class StorageBase(OERuntimeTestCase):
 
         match = re.search('%s' % cls.test_msg, output)
         msg = ('Test message %s not in file %s.' % (cls.test_msg, cls.test_file))
-        cls.assertEqual(status, 0,  msg = msg)
+        cls.assertEqual(status, 0,  msg=msg)
 
     def storage_write(cls):
         # create test message in file on device
         (status, output) = cls.target.run('echo "%s" >  %s/%s' % 
                 (cls.test_msg, cls.test_dir, cls.test_file))
         msg = ('File %s not create test message on %s' % (cls.test_file, cls.device))
-        cls.assertEqual(status, 0,  msg = msg)
+        cls.assertEqual(status, 0,  msg=msg)
 
     def storage_umount(cls, tmo=1):
         time.sleep(tmo)
@@ -70,13 +70,13 @@ class StorageBase(OERuntimeTestCase):
             return
         else:
             msg = ('Device not unmount %s' % cls.mount_point)
-            cls.assertEqual(status, 0,  msg = msg)
+            cls.assertEqual(status, 0,  msg=msg)
 
         (status, output) = cls.target.run('cat /proc/mounts')
         match = re.search('%s' % cls.device, output)
         if match:
             msg = ('Device %s still mounted.' % cls.device)
-            cls.assertTrue(match, msg = msg)
+            cls.assertTrue(match, msg=msg)
 
 
 class UsbTest(StorageBase):
diff --git a/meta/lib/oeqa/runtime/cases/suspend.py b/meta/lib/oeqa/runtime/cases/suspend.py
index 67b6f7e56f..9aa1cf6f5d 100644
--- a/meta/lib/oeqa/runtime/cases/suspend.py
+++ b/meta/lib/oeqa/runtime/cases/suspend.py
@@ -8,7 +8,7 @@ class Suspend_Test(OERuntimeTestCase):
 
     def test_date(self): 
         (status, output) = self.target.run('date')
-        self.assertEqual(status, 0,  msg = 'Failed to run date command, output : %s' % output)
+        self.assertEqual(status, 0,  msg='Failed to run date command, output : %s' % output)
         
     def test_ping(self):
         t_thread = threading.Thread(target=self.target.run, args=("ping 8.8.8.8",))
@@ -17,11 +17,11 @@ class Suspend_Test(OERuntimeTestCase):
         
         status, output = self.target.run('pidof ping')
         self.target.run('kill -9 %s' % output)
-        self.assertEqual(status, 0, msg = 'Not able to find process that runs ping, output : %s' % output)  
+        self.assertEqual(status, 0, msg='Not able to find process that runs ping, output : %s' % output)  
         
     def set_suspend(self): 
         (status, output) = self.target.run('sudo rtcwake -m mem -s 10')
-        self.assertEqual(status, 0,  msg = 'Failed to suspends your system to RAM, output : %s' % output)
+        self.assertEqual(status, 0,  msg='Failed to suspends your system to RAM, output : %s' % output)
     
     @skipIfQemu('qemuall', 'Test only runs on real hardware')
     @OETestDepends(['ssh.SSHTest.test_ssh'])
diff --git a/meta/lib/oeqa/runtime/cases/usb_hid.py b/meta/lib/oeqa/runtime/cases/usb_hid.py
index 3c292cf661..dbc8eada74 100644
--- a/meta/lib/oeqa/runtime/cases/usb_hid.py
+++ b/meta/lib/oeqa/runtime/cases/usb_hid.py
@@ -7,11 +7,11 @@ class USB_HID_Test(OERuntimeTestCase):
 
     def keyboard_mouse_simulation(self): 
         (status, output) = self.target.run('export DISPLAY=:0 && xdotool key F2 && xdotool mousemove 100 100')
-        return self.assertEqual(status, 0,  msg = 'Failed to simulate keyboard/mouse input event, output : %s' % output)
+        return self.assertEqual(status, 0,  msg='Failed to simulate keyboard/mouse input event, output : %s' % output)
              
     def set_suspend(self): 
         (status, output) = self.target.run('sudo rtcwake -m mem -s 10')
-        return self.assertEqual(status, 0,  msg = 'Failed to suspends your system to RAM, output : %s' % output)
+        return self.assertEqual(status, 0,  msg='Failed to suspends your system to RAM, output : %s' % output)
     
     @OEHasPackage(['xdotool'])
     @skipIfQemu('qemuall', 'Test only runs on real hardware')
diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py
index 7d74833f61..139c65978f 100644
--- a/meta/lib/oeqa/selftest/cases/bblayers.py
+++ b/meta/lib/oeqa/selftest/cases/bblayers.py
@@ -15,7 +15,7 @@ class BitbakeLayers(OESelftestTestCase):
     def test_bitbakelayers_layerindexshowdepends(self):
         result = runCmd('bitbake-layers layerindex-show-depends meta-poky')
         find_in_contents = re.search("openembedded-core", result.output)
-        self.assertTrue(find_in_contents, msg = "openembedded-core should have been listed at this step. bitbake-layers layerindex-show-depends meta-poky output: %s" % result.output)
+        self.assertTrue(find_in_contents, msg="openembedded-core should have been listed at this step. bitbake-layers layerindex-show-depends meta-poky output: %s" % result.output)
 
     def test_bitbakelayers_showcrossdepends(self):
         result = runCmd('bitbake-layers show-cross-depends')
@@ -40,14 +40,14 @@ class BitbakeLayers(OESelftestTestCase):
         recipe_path = "recipes-graphics/xcursor-transparent-theme"
         recipe_file = self.get_recipe_basename(recipe)
         testoutdir = os.path.join(self.builddir, 'test_bitbakelayers_flatten')
-        self.assertFalse(os.path.isdir(testoutdir), msg = "test_bitbakelayers_flatten should not exist at this point in time")
+        self.assertFalse(os.path.isdir(testoutdir), msg="test_bitbakelayers_flatten should not exist at this point in time")
         self.track_for_cleanup(testoutdir)
         result = runCmd('bitbake-layers flatten %s' % testoutdir)
         bb_file = os.path.join(testoutdir, recipe_path, recipe_file)
-        self.assertTrue(os.path.isfile(bb_file), msg = "Cannot find xcursor-transparent-theme_0.1.1.bb in the test_bitbakelayers_flatten local dir.")
+        self.assertTrue(os.path.isfile(bb_file), msg="Cannot find xcursor-transparent-theme_0.1.1.bb in the test_bitbakelayers_flatten local dir.")
         contents = ftools.read_file(bb_file)
         find_in_contents = re.search("##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents)
-        self.assertTrue(find_in_contents, msg = "Flattening layers did not work. bitbake-layers flatten output: %s" % result.output)
+        self.assertTrue(find_in_contents, msg="Flattening layers did not work. bitbake-layers flatten output: %s" % result.output)
 
     def test_bitbakelayers_add_remove(self):
         test_layer = os.path.join(get_bb_var('COREBASE'), 'meta-skeleton')
@@ -55,16 +55,16 @@ class BitbakeLayers(OESelftestTestCase):
         self.assertNotIn('meta-skeleton', result.output, "This test cannot run with meta-skeleton in bblayers.conf. bitbake-layers show-layers output: %s" % result.output)
         result = runCmd('bitbake-layers add-layer %s' % test_layer)
         result = runCmd('bitbake-layers show-layers')
-        self.assertIn('meta-skeleton', result.output, msg = "Something wrong happened. meta-skeleton layer was not added to conf/bblayers.conf.  bitbake-layers show-layers output: %s" % result.output)
+        self.assertIn('meta-skeleton', result.output, msg="Something wrong happened. meta-skeleton layer was not added to conf/bblayers.conf.  bitbake-layers show-layers output: %s" % result.output)
         result = runCmd('bitbake-layers remove-layer %s' % test_layer)
         result = runCmd('bitbake-layers show-layers')
-        self.assertNotIn('meta-skeleton', result.output, msg = "meta-skeleton should have been removed at this step.  bitbake-layers show-layers output: %s" % result.output)
+        self.assertNotIn('meta-skeleton', result.output, msg="meta-skeleton should have been removed at this step.  bitbake-layers show-layers output: %s" % result.output)
         result = runCmd('bitbake-layers add-layer %s' % test_layer)
         result = runCmd('bitbake-layers show-layers')
-        self.assertIn('meta-skeleton', result.output, msg = "Something wrong happened. meta-skeleton layer was not added to conf/bblayers.conf.  bitbake-layers show-layers output: %s" % result.output)
+        self.assertIn('meta-skeleton', result.output, msg="Something wrong happened. meta-skeleton layer was not added to conf/bblayers.conf.  bitbake-layers show-layers output: %s" % result.output)
         result = runCmd('bitbake-layers remove-layer */meta-skeleton')
         result = runCmd('bitbake-layers show-layers')
-        self.assertNotIn('meta-skeleton', result.output, msg = "meta-skeleton should have been removed at this step.  bitbake-layers show-layers output: %s" % result.output)
+        self.assertNotIn('meta-skeleton', result.output, msg="meta-skeleton should have been removed at this step.  bitbake-layers show-layers output: %s" % result.output)
 
     def test_bitbakelayers_showrecipes(self):
         result = runCmd('bitbake-layers show-recipes')
@@ -119,5 +119,5 @@ class BitbakeLayers(OESelftestTestCase):
                 recipe_file = line
                 break
 
-        self.assertTrue(os.path.isfile(recipe_file), msg = "Can't find recipe file for %s" % recipe)
+        self.assertTrue(os.path.isfile(recipe_file), msg="Can't find recipe file for %s" % recipe)
         return os.path.basename(recipe_file)
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index 79390acc0d..e8ce78480b 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -20,21 +20,21 @@ class BitbakeTests(OESelftestTestCase):
     # Test bitbake can run from the <builddir>/conf directory
     def test_run_bitbake_from_dir_1(self):
         os.chdir(os.path.join(self.builddir, 'conf'))
-        self.assertEqual(bitbake('-e').status, 0, msg = "bitbake couldn't run from \"conf\" dir")
+        self.assertEqual(bitbake('-e').status, 0, msg="bitbake couldn't run from \"conf\" dir")
 
     # Test bitbake can run from the <builddir>'s parent directory
     def test_run_bitbake_from_dir_2(self):
         my_env = os.environ.copy()
         my_env['BBPATH'] = my_env['BUILDDIR']
         os.chdir(os.path.dirname(os.environ['BUILDDIR']))
-        self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from builddir's parent directory")
+        self.assertEqual(bitbake('-e', env=my_env).status, 0, msg="bitbake couldn't run from builddir's parent directory")
 
     # Test bitbake can run from some other random system location (we use /tmp/)
     def test_run_bitbake_from_dir_3(self):
         my_env = os.environ.copy()
         my_env['BBPATH'] = my_env['BUILDDIR']
         os.chdir("/tmp/")
-        self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from /tmp/")
+        self.assertEqual(bitbake('-e', env=my_env).status, 0, msg="bitbake couldn't run from /tmp/")
 
 
     def test_event_handler(self):
@@ -42,8 +42,8 @@ class BitbakeTests(OESelftestTestCase):
         result = bitbake('m4-native')
         find_build_started = re.search(r"NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Executing.*Tasks", result.output)
         find_build_completed = re.search(r"Tasks Summary:.*(\n.*)*NOTE: Test for bb\.event\.BuildCompleted", result.output)
-        self.assertTrue(find_build_started, msg = "Match failed in:\n%s"  % result.output)
-        self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output)
+        self.assertTrue(find_build_started, msg="Match failed in:\n%s"  % result.output)
+        self.assertTrue(find_build_completed, msg="Match failed in:\n%s" % result.output)
         self.assertNotIn('Test for bb.event.InvalidEvent', result.output)
 
     def test_local_sstate(self):
@@ -51,11 +51,11 @@ class BitbakeTests(OESelftestTestCase):
         bitbake('m4-native -cclean')
         result = bitbake('m4-native')
         find_setscene = re.search("m4-native.*do_.*_setscene", result.output)
-        self.assertTrue(find_setscene, msg = "No \"m4-native.*do_.*_setscene\" message found during bitbake m4-native. bitbake output: %s" % result.output )
+        self.assertTrue(find_setscene, msg="No \"m4-native.*do_.*_setscene\" message found during bitbake m4-native. bitbake output: %s" % result.output )
 
     def test_bitbake_invalid_recipe(self):
         result = bitbake('-b asdf', ignore_status=True)
-        self.assertTrue("ERROR: Unable to find any recipe file matching 'asdf'" in result.output, msg = "Though asdf recipe doesn't exist, bitbake didn't output any err. message. bitbake output: %s" % result.output)
+        self.assertTrue("ERROR: Unable to find any recipe file matching 'asdf'" in result.output, msg="Though asdf recipe doesn't exist, bitbake didn't output any err. message. bitbake output: %s" % result.output)
 
     def test_bitbake_invalid_target(self):
         result = bitbake('asdf', ignore_status=True)
@@ -79,7 +79,7 @@ class BitbakeTests(OESelftestTestCase):
         for l in result.output.split('\n'):
             if l.startswith("ERROR:") and "failed" in l and "do_patch" in l:
                 found = l
-        self.assertTrue(found and found.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output)
+        self.assertTrue(found and found.startswith("ERROR:"), msg="Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output)
 
     def test_force_task_1(self):
         # test 1 from bug 5875
@@ -123,7 +123,7 @@ class BitbakeTests(OESelftestTestCase):
         result = bitbake('-g %s' % recipe)
         for f in ['pn-buildlist', 'task-depends.dot']:
             self.addCleanup(os.remove, f)
-        self.assertTrue('Task dependencies saved to \'task-depends.dot\'' in result.output, msg = "No task dependency \"task-depends.dot\" file was generated for the given task target. bitbake output: %s" % result.output)
+        self.assertTrue('Task dependencies saved to \'task-depends.dot\'' in result.output, msg="No task dependency \"task-depends.dot\" file was generated for the given task target. bitbake output: %s" % result.output)
         self.assertIn(recipe, ftools.read_file(os.path.join(self.builddir, 'task-depends.dot')))
 
     def test_image_manifest(self):
@@ -150,7 +150,7 @@ INHERIT_remove = \"report-error\"
         self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output)
         self.assertIn('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:', result.output)
         line = self.getline(result, 'Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.')
-        self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \
+        self.assertTrue(line and line.startswith("ERROR:"), msg="\"invalid\" file \
 doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output)
 
     def test_rename_downloaded_file(self):
@@ -165,9 +165,9 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
         self.write_recipeinc('aspell', data)
         result = bitbake('-f -c fetch aspell', ignore_status=True)
         self.delete_recipeinc('aspell')
-        self.assertEqual(result.status, 0, msg = "Couldn't fetch aspell. %s" % result.output)
+        self.assertEqual(result.status, 0, msg="Couldn't fetch aspell. %s" % result.output)
         dl_dir = get_bb_var("DL_DIR")
-        self.assertTrue(os.path.isfile(os.path.join(dl_dir, 'test-aspell.tar.gz')), msg = "File rename failed. No corresponding test-aspell.tar.gz file found under %s" % dl_dir)
+        self.assertTrue(os.path.isfile(os.path.join(dl_dir, 'test-aspell.tar.gz')), msg="File rename failed. No corresponding test-aspell.tar.gz file found under %s" % dl_dir)
         self.assertTrue(os.path.isfile(os.path.join(dl_dir, 'test-aspell.tar.gz.done')), "File rename failed. No corresponding test-aspell.tar.gz.done file found under %s" % dl_dir)
 
     def test_environment(self):
@@ -208,7 +208,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
 
     def test_checkuri(self):
         result = runCmd('bitbake -c checkuri m4')
-        self.assertEqual(0, result.status, msg = "\"checkuri\" task was not executed. bitbake output: %s" % result.output)
+        self.assertEqual(0, result.status, msg="\"checkuri\" task was not executed. bitbake output: %s" % result.output)
 
     def test_continue(self):
         self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
@@ -222,7 +222,7 @@ INHERIT_remove = \"report-error\"
         errorpos = result.output.find('ERROR: Function failed: do_fail_task')
         manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task do_unpack: Started", result.output)
         continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
-        self.assertLess(errorpos,continuepos, msg = "bitbake didn't pass do_fail_task. bitbake output: %s" % result.output)
+        self.assertLess(errorpos,continuepos, msg="bitbake didn't pass do_fail_task. bitbake output: %s" % result.output)
 
     def test_non_gplv3(self):
         self.write_config('INCOMPATIBLE_LICENSE = "GPLv3"')
diff --git a/meta/lib/oeqa/selftest/cases/binutils.py b/meta/lib/oeqa/selftest/cases/binutils.py
index 821f52f5a8..2f6aeadffc 100644
--- a/meta/lib/oeqa/selftest/cases/binutils.py
+++ b/meta/lib/oeqa/selftest/cases/binutils.py
@@ -43,7 +43,7 @@ class BinutilsCrossSelfTest(OESelftestTestCase, OEPTestResultTestCase):
         logpath = os.path.splitext(sumspath)[0] + ".log"
 
         ptestsuite = "binutils-{}".format(suite) if suite != "binutils" else suite
-        self.ptest_section(ptestsuite, logfile = logpath)
+        self.ptest_section(ptestsuite, logfile=logpath)
         with open(sumspath, "r") as f:
             for test, result in parse_values(f):
                 self.ptest_result(ptestsuite, test, result)
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py
index 754b77defd..35ff0cbcf2 100644
--- a/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -26,17 +26,17 @@ class ImageOptionsTests(OESelftestTestCase):
         log_data_created = ftools.read_file(log_data_file)
         incremental_created = re.search(r"Installing\s*:\s*packagegroup-core-ssh-openssh", log_data_created)
         self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
-        self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % log_data_created)
+        self.assertTrue(incremental_created, msg="Match failed in:\n%s" % log_data_created)
         bitbake("core-image-minimal")
         log_data_removed = ftools.read_file(log_data_file)
         incremental_removed = re.search(r"Erasing\s*:\s*packagegroup-core-ssh-openssh", log_data_removed)
-        self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
+        self.assertTrue(incremental_removed, msg="Match failed in:\n%s" % log_data_removed)
 
     def test_ccache_tool(self):
         bitbake("ccache-native")
         bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'ccache-native')
         p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "ccache"
-        self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p)
+        self.assertTrue(os.path.isfile(p), msg="No ccache found (%s)" % p)
         self.write_config('INHERIT += "ccache"')
         recipe = "libgcc-initial"
         self.add_command_to_tearDown('bitbake -c clean %s' % recipe)
@@ -59,16 +59,16 @@ class DiskMonTest(OESelftestTestCase):
 
     def test_stoptask_behavior(self):
         self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"\nBB_HEARTBEAT_EVENT = "1"')
-        res = bitbake("delay -c delay", ignore_status = True)
-        self.assertTrue('ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!' in res.output, msg = "Tasks should have stopped. Disk monitor is set to STOPTASK: %s" % res.output)
-        self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
+        res = bitbake("delay -c delay", ignore_status=True)
+        self.assertTrue('ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!' in res.output, msg="Tasks should have stopped. Disk monitor is set to STOPTASK: %s" % res.output)
+        self.assertEqual(res.status, 1, msg="bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
         self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},100000G,100K"\nBB_HEARTBEAT_EVENT = "1"')
-        res = bitbake("delay -c delay", ignore_status = True)
+        res = bitbake("delay -c delay", ignore_status=True)
         self.assertTrue('ERROR: Immediately abort since the disk space monitor action is "ABORT"!' in res.output, "Tasks should have been aborted immediatelly. Disk monitor is set to ABORT: %s" % res.output)
-        self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
+        self.assertEqual(res.status, 1, msg="bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
         self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"\nBB_HEARTBEAT_EVENT = "1"')
         res = bitbake("delay -c delay")
-        self.assertTrue('WARNING: The free space' in res.output, msg = "A warning should have been displayed for disk monitor is set to WARN: %s" %res.output)
+        self.assertTrue('WARNING: The free space' in res.output, msg="A warning should have been displayed for disk monitor is set to WARN: %s" %res.output)
 
 class SanityOptionsTest(OESelftestTestCase):
     def getline(self, res, line):
@@ -88,7 +88,7 @@ class SanityOptionsTest(OESelftestTestCase):
         self.delete_recipeinc('xcursor-transparent-theme')
         line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
         self.assertTrue(line and line.startswith("ERROR:"), msg=res.output)
-        self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
+        self.assertEqual(res.status, 1, msg="bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
         self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
         self.append_config('ERROR_QA_remove = "packages-list"')
         self.append_config('WARN_QA_append = " packages-list"')
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 3385546e8e..95142aeaa7 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -249,14 +249,14 @@ class DevtoolTests(DevtoolBase):
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         self.track_for_cleanup(tempdir)
         result = runCmd('devtool create-workspace %s' % tempdir)
-        self.assertTrue(os.path.isfile(os.path.join(tempdir, 'conf', 'layer.conf')), msg = "No workspace created. devtool output: %s " % result.output)
+        self.assertTrue(os.path.isfile(os.path.join(tempdir, 'conf', 'layer.conf')), msg="No workspace created. devtool output: %s " % result.output)
         result = runCmd('bitbake-layers show-layers')
         self.assertIn(tempdir, result.output)
         # Try creating a workspace layer with the default path
         self.track_for_cleanup(self.workspacedir)
         self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
         result = runCmd('devtool create-workspace')
-        self.assertTrue(os.path.isfile(os.path.join(self.workspacedir, 'conf', 'layer.conf')), msg = "No workspace created. devtool output: %s " % result.output)
+        self.assertTrue(os.path.isfile(os.path.join(self.workspacedir, 'conf', 'layer.conf')), msg="No workspace created. devtool output: %s " % result.output)
         result = runCmd('bitbake-layers show-layers')
         self.assertNotIn(tempdir, result.output)
         self.assertIn(self.workspacedir, result.output)
diff --git a/meta/lib/oeqa/selftest/cases/gcc.py b/meta/lib/oeqa/selftest/cases/gcc.py
index 3efe15228f..46fd9813d6 100644
--- a/meta/lib/oeqa/selftest/cases/gcc.py
+++ b/meta/lib/oeqa/selftest/cases/gcc.py
@@ -18,7 +18,7 @@ class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
         if suite not in targets:
             self.skipTest("Target does not use {0}".format(suite))
 
-    def run_check(self, *suites, ssh = None):
+    def run_check(self, *suites, ssh=None):
         targets = set()
         for s in suites:
             if s == "gcc":
@@ -54,7 +54,7 @@ class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
 
             ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite
             ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite
-            self.ptest_section(ptestsuite, logfile = logpath)
+            self.ptest_section(ptestsuite, logfile=logpath)
             with open(sumspath, "r") as f:
                 for test, result in parse_values(f):
                     self.ptest_result(ptestsuite, test, result)
@@ -69,7 +69,7 @@ class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
         bitbake("core-image-minimal")
 
         # wrap the execution with a qemu instance
-        with runqemu("core-image-minimal", runqemuparams = "nographic") as qemu:
+        with runqemu("core-image-minimal", runqemuparams="nographic") as qemu:
             # validate that SSH is working
             status, _ = qemu.run("uname")
             self.assertEqual(status, 0)
diff --git a/meta/lib/oeqa/selftest/cases/glibc.py b/meta/lib/oeqa/selftest/cases/glibc.py
index c687f6ef93..852c8635df 100644
--- a/meta/lib/oeqa/selftest/cases/glibc.py
+++ b/meta/lib/oeqa/selftest/cases/glibc.py
@@ -15,7 +15,7 @@ def parse_values(content):
                 break
 
 class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
-    def run_check(self, ssh = None):
+    def run_check(self, ssh=None):
         # configure ssh target
         features = []
         if ssh is not None:
@@ -61,7 +61,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
             bitbake("core-image-minimal")
 
             # start runqemu
-            qemu = s.enter_context(runqemu("core-image-minimal", runqemuparams = "nographic"))
+            qemu = s.enter_context(runqemu("core-image-minimal", runqemuparams="nographic"))
 
             # validate that SSH is working
             status, _ = qemu.run("uname")
@@ -75,7 +75,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
             if status != 0:
                 raise Exception("Failed to setup NFS mount on target ({})".format(repr(output)))
 
-            self.run_check(ssh = qemu.ip)
+            self.run_check(ssh=qemu.ip)
 
 @OETestTag("toolchain-user")
 class GlibcSelfTest(GlibcSelfTestBase):
diff --git a/meta/lib/oeqa/selftest/cases/manifest.py b/meta/lib/oeqa/selftest/cases/manifest.py
index e4755c595b..b5505fa60e 100644
--- a/meta/lib/oeqa/selftest/cases/manifest.py
+++ b/meta/lib/oeqa/selftest/cases/manifest.py
@@ -38,7 +38,7 @@ class VerifyManifest(OESelftestTestCase):
 
     #this will possibly move from here
     @classmethod
-    def get_dir_from_bb_var(self, bb_var, target = None):
+    def get_dir_from_bb_var(self, bb_var, target=None):
         target == self.buildtarget if target == None else target
         directory = get_bb_var(bb_var, target)
         if not directory or not os.path.isdir(directory):
@@ -81,8 +81,8 @@ class VerifyManifest(OESelftestTestCase):
         pkgdata_dir = reverse_dir = {}
         mfilename = mpath = m_entry = {}
         # get manifest location based on target to query about
-        d_target= dict(target = self.buildtarget,
-                         host = 'nativesdk-packagegroup-sdk-host')
+        d_target= dict(target=self.buildtarget,
+                         host='nativesdk-packagegroup-sdk-host')
         try:
             mdir = self.get_dir_from_bb_var('SDK_DEPLOY', self.buildtarget)
             for k in d_target.keys():
diff --git a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
index 802a91a488..8b0fb8a8f6 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
@@ -28,7 +28,7 @@ class TestBlobParsing(OESelftestTestCase):
         import shutil
         shutil.rmtree(self.repo_path)
 
-    def commit_vars(self, to_add={}, to_remove = [], msg="A commit message"):
+    def commit_vars(self, to_add={}, to_remove=[], msg="A commit message"):
         if len(to_add) == 0 and len(to_remove) == 0:
             return
 
@@ -50,7 +50,7 @@ class TestBlobParsing(OESelftestTestCase):
         """
         from oe.buildhistory_analysis import blob_to_dict
         valuesmap = { "foo" : "1", "bar" : "2" }
-        self.commit_vars(to_add = valuesmap)
+        self.commit_vars(to_add=valuesmap)
 
         blob = self.repo.head.commit.tree.blobs[0]
         self.assertEqual(valuesmap, blob_to_dict(blob),
@@ -64,10 +64,10 @@ class TestBlobParsing(OESelftestTestCase):
 
         changesmap = { "foo-2" : ("2", "8"), "bar" : ("","4"), "bar-2" : ("","5")}
 
-        self.commit_vars(to_add = { "foo" : "1", "foo-2" : "2", "foo-3" : "3" })
+        self.commit_vars(to_add={ "foo" : "1", "foo-2" : "2", "foo-3" : "3" })
         blob1 = self.repo.heads.master.commit.tree.blobs[0]
 
-        self.commit_vars(to_add = { "foo-2" : "8", "bar" : "4", "bar-2" : "5" })
+        self.commit_vars(to_add={ "foo-2" : "8", "bar" : "4", "bar-2" : "5" })
         blob2 = self.repo.heads.master.commit.tree.blobs[0]
 
         change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file),
@@ -83,10 +83,10 @@ class TestBlobParsing(OESelftestTestCase):
         from oe.buildhistory_analysis import compare_dict_blobs
         defaultmap = { x : ("default", "1")  for x in ["PKG", "PKGE", "PKGV", "PKGR"]}
 
-        self.commit_vars(to_add = { "foo" : "1" })
+        self.commit_vars(to_add={ "foo" : "1" })
         blob1 = self.repo.heads.master.commit.tree.blobs[0]
 
-        self.commit_vars(to_add = { "PKG" : "1", "PKGE" : "1", "PKGV" : "1", "PKGR" : "1" })
+        self.commit_vars(to_add={ "PKG" : "1", "PKGE" : "1", "PKGV" : "1", "PKGR" : "1" })
         blob2 = self.repo.heads.master.commit.tree.blobs[0]
 
         change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file),
diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py b/meta/lib/oeqa/selftest/cases/oelib/path.py
index 098734fa5d..39e683ab5a 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/path.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
@@ -44,7 +44,7 @@ class TestRealPath(TestCase):
     ]
 
     def setUp(self):
-        self.tmpdir = tempfile.mkdtemp(prefix = "oe-test_path")
+        self.tmpdir = tempfile.mkdtemp(prefix="oe-test_path")
         self.root = os.path.join(self.tmpdir, "R")
 
         os.mkdir(os.path.join(self.tmpdir, "_real"))
@@ -60,9 +60,9 @@ class TestRealPath(TestCase):
     def tearDown(self):
         shutil.rmtree(self.tmpdir)
 
-    def __realpath(self, file, use_physdir, assume_dir = True):
+    def __realpath(self, file, use_physdir, assume_dir=True):
         return oe.path.realpath(os.path.join(self.root, file), self.root,
-                                use_physdir, assume_dir = assume_dir)
+                                use_physdir, assume_dir=assume_dir)
 
     def test_norm(self):
         for l in self.LINKS:
diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
index 254abc40c6..e837daf8b1 100644
--- a/meta/lib/oeqa/selftest/cases/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -223,4 +223,4 @@ class OePkgdataUtilTests(OESelftestTestCase):
         result = runCmd('oe-pkgdata-util', ignore_status=True)
         self.assertEqual(result.status, 2, "Status different than 2. output: %s" % result.output)
         currpos = result.output.find('usage: oe-pkgdata-util')
-        self.assertTrue(currpos != -1, msg = "Test is Failed. Help is not Displayed in %s" % result.output)
+        self.assertTrue(currpos != -1, msg="Test is Failed. Help is not Displayed in %s" % result.output)
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 9db2a0bb44..9b62e5164e 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -137,7 +137,7 @@ class SStateTests(SStateBase):
             filtered_results.append(r)
         self.assertTrue(filtered_results == [], msg="Found distro non-specific sstate for: %s (%s)" % (', '.join(map(str, targets)), str(filtered_results)))
         file_tracker_1 = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False)
-        self.assertTrue(len(file_tracker_1) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
+        self.assertTrue(len(file_tracker_1) >= len(targets), msg="Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
 
         self.track_for_cleanup(self.distro_specific_sstate + "_old")
         shutil.copytree(self.distro_specific_sstate, self.distro_specific_sstate + "_old")
@@ -146,7 +146,7 @@ class SStateTests(SStateBase):
         bitbake(['-cclean'] + targets)
         bitbake(targets)
         file_tracker_2 = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False)
-        self.assertTrue(len(file_tracker_2) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
+        self.assertTrue(len(file_tracker_2) >= len(targets), msg="Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
 
         not_recreated = [x for x in file_tracker_1 if x not in file_tracker_2]
         self.assertTrue(not_recreated == [], msg="The following sstate files ware not recreated: %s" % ', '.join(map(str, not_recreated)))
@@ -196,7 +196,7 @@ class SStateTests(SStateBase):
                 expected_remaining_sstate += [x for x in target_sstate_after_build if x not in target_sstate_before_build if not any(pattern in x for pattern in ignore_patterns)]
             self.remove_config(global_config[idx])
             self.remove_recipeinc(target, target_config[idx])
-            self.assertEqual(result.status, 0, msg = "build of %s failed with %s" % (target, result.output))
+            self.assertEqual(result.status, 0, msg="build of %s failed with %s" % (target, result.output))
 
         runCmd("sstate-cache-management.sh -y --cache-dir=%s --remove-duplicated --extra-archs=%s" % (self.sstate_path, ','.join(map(str, sstate_archs_list))))
         actual_remaining_sstate = [x for x in self.search_sstate(target + r'.*?\.tgz$') if not any(pattern in x for pattern in ignore_patterns)]
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 005ebaa7f3..751d1303cf 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -127,28 +127,28 @@ class QemuTarget(BaseTarget):
         if d.getVar("DISTRO") == "poky-tiny":
             self.runner = QemuTinyRunner(machine=d.getVar("MACHINE"),
                             rootfs=self.rootfs,
-                            tmpdir = d.getVar("TMPDIR"),
-                            deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE"),
-                            display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY"),
-                            logfile = self.qemulog,
-                            kernel = self.kernel,
-                            boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT")),
-                            tmpfsdir = d.getVar("RUNQEMU_TMPFS_DIR"),
-                            logger = logger)
+                            tmpdir=d.getVar("TMPDIR"),
+                            deploy_dir_image=d.getVar("DEPLOY_DIR_IMAGE"),
+                            display=d.getVar("BB_ORIGENV", False).getVar("DISPLAY"),
+                            logfile=self.qemulog,
+                            kernel=self.kernel,
+                            boottime=int(d.getVar("TEST_QEMUBOOT_TIMEOUT")),
+                            tmpfsdir=d.getVar("RUNQEMU_TMPFS_DIR"),
+                            logger=logger)
         else:
             self.runner = QemuRunner(machine=d.getVar("MACHINE"),
                             rootfs=self.rootfs,
-                            tmpdir = d.getVar("TMPDIR"),
-                            deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE"),
-                            display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY"),
-                            logfile = self.qemulog,
-                            boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT")),
-                            use_kvm = use_kvm,
-                            dump_dir = dump_dir,
-                            dump_host_cmds = d.getVar("testimage_dump_host"),
-                            logger = logger,
-                            tmpfsdir = d.getVar("RUNQEMU_TMPFS_DIR"),
-                            serial_ports = len(d.getVar("SERIAL_CONSOLES").split()))
+                            tmpdir=d.getVar("TMPDIR"),
+                            deploy_dir_image=d.getVar("DEPLOY_DIR_IMAGE"),
+                            display=d.getVar("BB_ORIGENV", False).getVar("DISPLAY"),
+                            logfile=self.qemulog,
+                            boottime=int(d.getVar("TEST_QEMUBOOT_TIMEOUT")),
+                            use_kvm=use_kvm,
+                            dump_dir=dump_dir,
+                            dump_host_cmds=d.getVar("testimage_dump_host"),
+                            logger=logger,
+                            tmpfsdir=d.getVar("RUNQEMU_TMPFS_DIR"),
+                            serial_ports=len(d.getVar("SERIAL_CONSOLES").split()))
 
         self.target_dumper = TargetDumper(dump_target_cmds, dump_dir, self.runner)
         self.monitor_dumper = MonitorDumper(dump_monitor_cmds, dump_dir, self.runner)
diff --git a/meta/lib/oeqa/utils/__init__.py b/meta/lib/oeqa/utils/__init__.py
index 96926746cc..fb81c136f0 100644
--- a/meta/lib/oeqa/utils/__init__.py
+++ b/meta/lib/oeqa/utils/__init__.py
@@ -8,7 +8,7 @@ __path__ = extend_path(__path__, __name__)
 # Borrowed from CalledProcessError
 
 class CommandError(Exception):
-    def __init__(self, retcode, cmd, output = None):
+    def __init__(self, retcode, cmd, output=None):
         self.retcode = retcode
         self.cmd = cmd
         self.output = output
diff --git a/meta/lib/oeqa/utils/network.py b/meta/lib/oeqa/utils/network.py
index 59d01723a1..0436d27582 100644
--- a/meta/lib/oeqa/utils/network.py
+++ b/meta/lib/oeqa/utils/network.py
@@ -4,7 +4,7 @@
 
 import socket
 
-def get_free_port(udp = False):
+def get_free_port(udp=False):
     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM if not udp else socket.SOCK_DGRAM)
     s.bind(('', 0))
     addr = s.getsockname()
diff --git a/meta/lib/oeqa/utils/nfs.py b/meta/lib/oeqa/utils/nfs.py
index a37686c914..1dd65588bb 100644
--- a/meta/lib/oeqa/utils/nfs.py
+++ b/meta/lib/oeqa/utils/nfs.py
@@ -8,7 +8,7 @@ from oeqa.utils.commands import bitbake, get_bb_var, Command
 from oeqa.utils.network import get_free_port
 
 @contextlib.contextmanager
-def unfs_server(directory, logger = None):
+def unfs_server(directory, logger=None):
     unfs_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "unfs3-native")
     if not os.path.exists(os.path.join(unfs_sysroot, "usr", "bin", "unfsd")):
         # build native tool
@@ -18,16 +18,16 @@ def unfs_server(directory, logger = None):
     cmd = None
     try:
         # create the exports file
-        with tempfile.NamedTemporaryFile(delete = False) as exports:
+        with tempfile.NamedTemporaryFile(delete=False) as exports:
             exports.write("{0} (rw,no_root_squash,no_all_squash,insecure)\n".format(directory).encode())
 
         # find some ports for the server
-        nfsport, mountport = get_free_port(udp = True), get_free_port(udp = True)
+        nfsport, mountport = get_free_port(udp=True), get_free_port(udp=True)
 
         nenv = dict(os.environ)
         nenv['PATH'] = "{0}/sbin:{0}/usr/sbin:{0}/usr/bin:".format(unfs_sysroot) + nenv.get('PATH', '')
         cmd = Command(["unfsd", "-d", "-p", "-N", "-e", exports.name, "-n", str(nfsport), "-m", str(mountport)],
-                bg = True, env = nenv, output_log = logger)
+                bg=True, env=nenv, output_log=logger)
         cmd.run()
         yield nfsport, mountport
     finally:
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index c7f7860317..96355fbfc3 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -34,7 +34,7 @@ re_control_char = re.compile('[%s]' % re.escape("".join(control_chars)))
 class QemuRunner:
 
     def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, boottime, dump_dir, dump_host_cmds,
-                 use_kvm, logger, use_slirp=False, serial_ports=2, boot_patterns = defaultdict(str), use_ovmf=False, workdir=None, tmpfsdir=None):
+                 use_kvm, logger, use_slirp=False, serial_ports=2, boot_patterns=defaultdict(str), use_ovmf=False, workdir=None, tmpfsdir=None):
 
         # Popen object for runqemu
         self.runqemu = None
@@ -134,7 +134,7 @@ class QemuRunner:
                 self.stop()
                 self._dump_host()
 
-    def start(self, qemuparams = None, get_ip = True, extra_bootparams = None, runqemuparams='', launch_cmd=None, discard_writes=True):
+    def start(self, qemuparams=None, get_ip=True, extra_bootparams=None, runqemuparams='', launch_cmd=None, discard_writes=True):
         env = os.environ.copy()
         if self.display:
             env["DISPLAY"] = self.display
@@ -175,7 +175,7 @@ class QemuRunner:
 
         return self.launch(launch_cmd, qemuparams=qemuparams, get_ip=get_ip, extra_bootparams=extra_bootparams, env=env)
 
-    def launch(self, launch_cmd, get_ip = True, qemuparams = None, extra_bootparams = None, env = None):
+    def launch(self, launch_cmd, get_ip=True, qemuparams=None, extra_bootparams=None, env=None):
         # use logfile to determine the recipe-sysroot-native path and
         # then add in the site-packages path components and add that
         # to the python sys.path so qmp.py can be found.
@@ -574,7 +574,7 @@ class QemuRunner:
         if self.thread:
             self.thread.allowexit()
 
-    def restart(self, qemuparams = None):
+    def restart(self, qemuparams=None):
         self.logger.warning("Restarting qemu process")
         if self.runqemu.poll() is None:
             self.stop()
diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py
index 20009401ca..be82a7947a 100644
--- a/meta/lib/oeqa/utils/qemutinyrunner.py
+++ b/meta/lib/oeqa/utils/qemutinyrunner.py
@@ -64,7 +64,7 @@ class QemuTinyRunner(QemuRunner):
             with open(self.logfile, "a") as f:
                 f.write("%s" % msg)
 
-    def start(self, qemuparams = None, ssh=True, extra_bootparams=None, runqemuparams='', discard_writes=True):
+    def start(self, qemuparams=None, ssh=True, extra_bootparams=None, runqemuparams='', discard_writes=True):
 
         if self.display:
             os.environ["DISPLAY"] = self.display
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index 36c2ecb3db..403bad7b1f 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -120,7 +120,7 @@ class SSHControl(object):
             with open(self.logfile, "a") as f:
                 f.write("%s\n" % msg)
 
-    def _internal_run(self, command, timeout=None, ignore_status = True):
+    def _internal_run(self, command, timeout=None, ignore_status=True):
         self.log("[Running]$ %s" % " ".join(command))
 
         proc = SSHProcess()
diff --git a/meta/recipes-core/glibc/glibc/check-test-wrapper b/meta/recipes-core/glibc/glibc/check-test-wrapper
index 6ec9b9b29e..820d4732da 100644
--- a/meta/recipes-core/glibc/glibc/check-test-wrapper
+++ b/meta/recipes-core/glibc/glibc/check-test-wrapper
@@ -73,7 +73,7 @@ else:
     sys.exit(-1)
 
 try:
-    r = subprocess.run(command, timeout = 1800, env = env)
+    r = subprocess.run(command, timeout=1800, env=env)
     sys.exit(r.returncode)
 except subprocess.TimeoutExpired:
     sys.exit(-1)
diff --git a/scripts/bitbake-whatchanged b/scripts/bitbake-whatchanged
index 674d690450..8c4486ee62 100755
--- a/scripts/bitbake-whatchanged
+++ b/scripts/bitbake-whatchanged
@@ -104,7 +104,7 @@ def split_pntask(s):
     return (tmp.group(1), tmp.group(2))
 
 
-def print_added(d_new = None, d_old = None):
+def print_added(d_new=None, d_old=None):
     """
     Print the newly added tasks
     """
@@ -137,7 +137,7 @@ def print_added(d_new = None, d_old = None):
 
     return counter
 
-def print_vrchanged(d_new = None, d_old = None, vr = None):
+def print_vrchanged(d_new=None, d_old=None, vr=None):
     """
     Print the pv or pr changed tasks.
     The arg "vr" is "pv" or "pr"
@@ -165,7 +165,7 @@ def print_vrchanged(d_new = None, d_old = None, vr = None):
 
     return counter
 
-def print_depchanged(d_new = None, d_old = None, verbose = False):
+def print_depchanged(d_new=None, d_old=None, verbose=False):
     """
     Print the dependency changes
     """
@@ -210,7 +210,7 @@ def main():
     3) Use bb.siggen.compare_sigfiles to diff the old and new stamps
     """
 
-    parser = argparse_oe.ArgumentParser(usage = """%(prog)s [options] [package ...]
+    parser = argparse_oe.ArgumentParser(usage="""%(prog)s [options] [package ...]
 print what will be done between the current and last builds, for example:
 
     $ bitbake core-image-sato
@@ -226,7 +226,7 @@ Note:
 """
 )
     parser.add_argument("recipe", help="recipe to check")
-    parser.add_argument("-v", "--verbose", help = "print the verbose changes", action = "store_true")
+    parser.add_argument("-v", "--verbose", help="print the verbose changes", action="store_true")
     args = parser.parse_args()
 
     # Get the STAMPS_DIR
diff --git a/scripts/buildhistory-collect-srcrevs b/scripts/buildhistory-collect-srcrevs
index 340bee78bb..653972a969 100755
--- a/scripts/buildhistory-collect-srcrevs
+++ b/scripts/buildhistory-collect-srcrevs
@@ -26,18 +26,18 @@ logger = logger_create()
 
 def main():
     parser = optparse.OptionParser(
-        description = "Collects the recorded SRCREV values from buildhistory and reports on them.",
-        usage = """
+        description="Collects the recorded SRCREV values from buildhistory and reports on them.",
+        usage="""
     %prog [options]""")
 
     parser.add_option("-a", "--report-all",
-            help = "Report all SRCREV values, not just ones where AUTOREV has been used",
+            help="Report all SRCREV values, not just ones where AUTOREV has been used",
             action="store_true", dest="reportall")
     parser.add_option("-f", "--forcevariable",
-            help = "Use forcevariable override for all output lines",
+            help="Use forcevariable override for all output lines",
             action="store_true", dest="forcevariable")
     parser.add_option("-p", "--buildhistory-dir",
-            help = "Specify path to buildhistory directory (defaults to buildhistory/ under cwd)",
+            help="Specify path to buildhistory directory (defaults to buildhistory/ under cwd)",
             action="store", dest="buildhistory_dir", default='buildhistory/')
 
     options, args = parser.parse_args(sys.argv)
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff
index 3bd40a2a1e..f176857fdd 100755
--- a/scripts/buildhistory-diff
+++ b/scripts/buildhistory-diff
@@ -63,7 +63,7 @@ def get_args_parser():
                         default="auto",
                         help="Whether to colourise (defaults to auto)")
     parser.add_argument('revisions',
-                        default = ['build-minus-1', 'HEAD'],
+                        default=['build-minus-1', 'HEAD'],
                         nargs='*',
                         help=argparse.SUPPRESS)
     return parser
diff --git a/scripts/combo-layer b/scripts/combo-layer
index d0ed701e91..5aea6971c7 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -746,7 +746,7 @@ def conf_commit_msg(conf, components):
 
     # expand the template with known values
     template = Template(conf.commit_msg_template)
-    msg = template.substitute(components = component_str)
+    msg = template.substitute(components=component_str)
     return msg
 
 def commit_conf_file(conf, components, commit=True):
@@ -1307,8 +1307,8 @@ actions = {
 
 def main():
     parser = optparse.OptionParser(
-        version = "Combo Layer Repo Tool version %s" % __version__,
-        usage = """%prog [options] action
+        version="Combo Layer Repo Tool version %s" % __version__,
+        usage="""%prog [options] action
 
 Create and update a combination layer repository from multiple component repositories.
 
@@ -1318,24 +1318,24 @@ Action:
   pull [components]    just pull component repos only
   splitpatch [commit]  generate commit patch and split per component, default commit is HEAD""")
 
-    parser.add_option("-c", "--conf", help = "specify the config file (conf/combo-layer.conf is the default).",
-               action = "store", dest = "conffile", default = "conf/combo-layer.conf")
+    parser.add_option("-c", "--conf", help="specify the config file (conf/combo-layer.conf is the default).",
+               action="store", dest="conffile", default="conf/combo-layer.conf")
 
-    parser.add_option("-i", "--interactive", help = "interactive mode, user can edit the patch list and patches",
-               action = "store_true", dest = "interactive", default = False)
+    parser.add_option("-i", "--interactive", help="interactive mode, user can edit the patch list and patches",
+               action="store_true", dest="interactive", default=False)
 
-    parser.add_option("-D", "--debug", help = "output debug information",
-               action = "store_true", dest = "debug", default = False)
+    parser.add_option("-D", "--debug", help="output debug information",
+               action="store_true", dest="debug", default=False)
 
-    parser.add_option("-n", "--no-pull", help = "skip pulling component repos during update",
-               action = "store_true", dest = "nopull", default = False)
+    parser.add_option("-n", "--no-pull", help="skip pulling component repos during update",
+               action="store_true", dest="nopull", default=False)
 
     parser.add_option("--hard-reset",
-               help = "instead of pull do fetch and hard-reset in component repos",
-               action = "store_true", dest = "hard_reset", default = False)
+               help="instead of pull do fetch and hard-reset in component repos",
+               action="store_true", dest="hard_reset", default=False)
 
-    parser.add_option("-H", "--history", help = "import full history of components during init",
-                      action = "store_true", default = False)
+    parser.add_option("-H", "--history", help="import full history of components during init",
+                      action="store_true", default=False)
 
     options, args = parser.parse_args(sys.argv)
 
diff --git a/scripts/contrib/list-packageconfig-flags.py b/scripts/contrib/list-packageconfig-flags.py
index bb288e9099..d88de43bd2 100755
--- a/scripts/contrib/list-packageconfig-flags.py
+++ b/scripts/contrib/list-packageconfig-flags.py
@@ -132,18 +132,18 @@ def main():
 
     # Collect and validate input
     parser = optparse.OptionParser(
-        description = "Lists recipes and PACKAGECONFIG flags. Without -a or -f, recipes and their available PACKAGECONFIG flags are listed.",
-        usage = """
+        description="Lists recipes and PACKAGECONFIG flags. Without -a or -f, recipes and their available PACKAGECONFIG flags are listed.",
+        usage="""
     %prog [options]""")
 
     parser.add_option("-f", "--flags",
-            help = "list available PACKAGECONFIG flags and affected recipes",
+            help="list available PACKAGECONFIG flags and affected recipes",
             action="store_const", dest="listtype", const="flags", default="recipes")
     parser.add_option("-a", "--all",
-            help = "list all recipes and PACKAGECONFIG information",
+            help="list all recipes and PACKAGECONFIG information",
             action="store_const", dest="listtype", const="all")
     parser.add_option("-p", "--preferred-only",
-            help = "where multiple recipe versions are available, list only the preferred version",
+            help="where multiple recipe versions are available, list only the preferred version",
             action="store_true", dest="preferred", default=False)
 
     options, args = parser.parse_args(sys.argv)
diff --git a/scripts/contrib/verify-homepage.py b/scripts/contrib/verify-homepage.py
index 7bffa78e23..9991b35395 100755
--- a/scripts/contrib/verify-homepage.py
+++ b/scripts/contrib/verify-homepage.py
@@ -27,7 +27,7 @@ import bb.tinfoil
 logger = scriptutils.logger_create('verify_homepage')
 
 def wgetHomepage(pn, homepage):
-    result = subprocess.call('wget ' + '-q -T 5 -t 1 --spider ' + homepage, shell = True)
+    result = subprocess.call('wget ' + '-q -T 5 -t 1 --spider ' + homepage, shell=True)
     if result:
         logger.warning("%s: failed to verify HOMEPAGE: %s " % (pn, homepage))
         return 1
diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py
index f526111be5..b849843154 100644
--- a/scripts/lib/checklayer/__init__.py
+++ b/scripts/lib/checklayer/__init__.py
@@ -157,7 +157,7 @@ def _find_layer_depends(depend, layers):
     return None
 
 def add_layer_dependencies(bblayersconf, layer, layers, logger):
-    def recurse_dependencies(depends, layer, layers, logger, ret = []):
+    def recurse_dependencies(depends, layer, layers, logger, ret=[]):
         logger.debug('Processing dependencies %s for layer %s.' %
                     (depends, layer['name']))
 
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index f92255d8dc..b3a51c7553 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -37,7 +37,7 @@ class KeepAliveStreamHandler(logging.StreamHandler):
                         self.emit(logging.LogRecord("keepalive", logging.INFO,
                             None, None, "Keepalive message", None, None))
 
-        self._thread = threading.Thread(target = thread, daemon = True)
+        self._thread = threading.Thread(target=thread, daemon=True)
         self._thread.start()
 
     def close(self):
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 8968b2f651..03c3d71594 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -169,7 +169,7 @@ class KickStart():
         part.add_argument('--part-type')
         part.add_argument('--rootfs-dir')
         part.add_argument('--type', default='primary',
-                choices = ('primary', 'logical'))
+                choices=('primary', 'logical'))
 
         # --size and --fixed-size cannot be specified together; options
         # ----extra-space and --overhead-factor should also raise a parser
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index e0b2c5bdf2..d4ca39a09e 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -199,7 +199,7 @@ class Partition():
                            (self.mountpoint, self.size, self.fixed_size))
 
     def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir,
-                       native_sysroot, real_rootfs = True, pseudo_dir = None):
+                       native_sysroot, real_rootfs=True, pseudo_dir=None):
         """
         Prepare content for a rootfs partition i.e. create a partition
         and fill it from a /rootfs dir.
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index 96d940a91d..03b642f4fa 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -230,4 +230,4 @@ class RootfsPlugin(SourcePlugin):
 
         part.prepare_rootfs(cr_workdir, oe_builddir,
                             new_rootfs or part.rootfs_dir, native_sysroot,
-                            pseudo_dir = new_pseudo or pseudo_dir)
+                            pseudo_dir=new_pseudo or pseudo_dir)
diff --git a/scripts/oe-depends-dot b/scripts/oe-depends-dot
index 5eb3e12769..14ad54008b 100755
--- a/scripts/oe-depends-dot
+++ b/scripts/oe-depends-dot
@@ -17,18 +17,18 @@ class Dot(object):
             description="Analyse recipe-depends.dot generated by bitbake -g",
             epilog="Use %(prog)s --help to get help")
         parser.add_argument("dotfile",
-            help = "Specify the dotfile", nargs = 1, action='store', default='')
+            help="Specify the dotfile", nargs=1, action='store', default='')
         parser.add_argument("-k", "--key",
-            help = "Specify the key, e.g., recipe name",
+            help="Specify the key, e.g., recipe name",
             action="store", default='')
         parser.add_argument("-d", "--depends",
-            help = "Print the key's dependencies",
+            help="Print the key's dependencies",
             action="store_true", default=False)
         parser.add_argument("-w", "--why",
-            help = "Print why the key is built",
+            help="Print why the key is built",
             action="store_true", default=False)
         parser.add_argument("-r", "--remove",
-            help = "Remove duplicated dependencies to reduce the size of the dot files."
+            help="Remove duplicated dependencies to reduce the size of the dot files."
                     " For example, A->B, B->C, A->C, then A->C can be removed.",
             action="store_true", default=False)
 
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 1dc9bd02a6..802ca7d5a9 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -395,7 +395,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
                     proc_tree, None)
 
         # render disk throughput
-        max_sample = max (trace.disk_stats, key = lambda s: s.tput)
+        max_sample = max (trace.disk_stats, key=lambda s: s.tput)
         if clip_visible (clip, chart_rect):
             draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect,
                     [(sample.time, sample.tput) for sample in trace.disk_stats],
@@ -782,7 +782,7 @@ class CumlSample:
 
     def merge_samples(self, proc):
         self.samples.extend (proc.samples)
-        self.samples.sort (key = lambda p: p.time)
+        self.samples.sort (key=lambda p: p.time)
 
     def next(self):
         global palette_idx
diff --git a/scripts/pybootchartgui/pybootchartgui/process_tree.py b/scripts/pybootchartgui/pybootchartgui/process_tree.py
index cf88110b1c..5572c5d19c 100644
--- a/scripts/pybootchartgui/pybootchartgui/process_tree.py
+++ b/scripts/pybootchartgui/pybootchartgui/process_tree.py
@@ -39,7 +39,7 @@ class ProcessTree:
 
     def __init__(self, writer, kernel, psstats, sample_period,
                  monitoredApp, prune, idle, taskstats,
-                 accurate_parentage, for_testing = False):
+                 accurate_parentage, for_testing=False):
         self.writer = writer
         self.process_tree = []
         self.taskstats = taskstats
@@ -49,7 +49,7 @@ class ProcessTree:
             process_list = psstats.process_map.values()
         else:
             process_list = list(kernel) + list(psstats.process_map.values())
-        self.process_list = sorted(process_list, key = lambda p: p.pid)
+        self.process_list = sorted(process_list, key=lambda p: p.pid)
         self.sample_period = sample_period
 
         self.build()
@@ -94,7 +94,7 @@ class ProcessTree:
     def sort(self, process_subtree):
         """Sort process tree."""
         for p in process_subtree:
-            p.child_list.sort(key = lambda p: p.pid)
+            p.child_list.sort(key=lambda p: p.pid)
             self.sort(p.child_list)
 
     def num_nodes(self, process_list):
@@ -284,7 +284,7 @@ class ProcessTree:
     def merge_processes(self, p1, p2):
         """Merges two process' samples."""
         p1.samples.extend(p2.samples)
-        p1.samples.sort( key = lambda p: p.time )
+        p1.samples.sort( key=lambda p: p.time )
         p1time = p1.start_time
         p2time = p2.start_time
         p1.start_time = min(p1time, p2time)
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py
index ab573329f2..69299fbd21 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -22,7 +22,7 @@ class DiskStatSample:
         self.diskdata = [ a + b for a, b in zip(self.diskdata, new_diskdata) ]
 
 class CPUSample:
-    def __init__(self, time, user, sys, io = 0.0, swap = 0.0):
+    def __init__(self, time, user, sys, io=0.0, swap=0.0):
         self.time = time
         self.user = user
         self.sys = sys
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py b/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
index 47249056fd..a30e13ca06 100644
--- a/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
+++ b/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
@@ -25,7 +25,7 @@ class TestProcessTree(unittest.TestCase):
         parsing.parse_file(writer, trace, self.mk_fname('proc_ps.log'))
         trace.compile(writer)
         self.processtree = process_tree.ProcessTree(writer, None, trace.ps_stats,
-            trace.ps_stats.sample_period, None, options.prune, None, None, False, for_testing = True)
+            trace.ps_stats.sample_period, None, options.prune, None, None, False, for_testing=True)
 
     def mk_fname(self,f):
         return os.path.join(self.rootdir, f)
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/8] PEP8 double aggressive E20 and E211
  2021-06-28  5:59 [PATCH 1/8] PEP8 double aggressive E401 Khem Raj
  2021-06-28  5:59 ` [PATCH 2/8] PEP8 double aggressive E701, E70 and E502 Khem Raj
  2021-06-28  5:59 ` [PATCH 3/8] PEP8 double aggressive E251 and E252 Khem Raj
@ 2021-06-28  5:59 ` Khem Raj
  2021-06-28  5:59 ` [PATCH 5/8] PEP8 double aggressive E22, E224, E241, E242 and E27 Khem Raj
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Khem Raj @ 2021-06-28  5:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: persianpros, Khem Raj

From: persianpros <persianpros@yahoo.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-selftest/lib/devtool/bbpath.py           |   4 +-
 meta-selftest/lib/recipetool/bbpath.py        |   6 +-
 meta/lib/buildstats.py                        |   6 +-
 meta/lib/oe/distro_check.py                   |   6 +-
 meta/lib/oe/elf.py                            | 134 +++++++-------
 meta/lib/oe/lsb.py                            |   2 +-
 meta/lib/oe/package_manager/ipk/__init__.py   |   2 +-
 meta/lib/oe/package_manager/rpm/__init__.py   |   2 +-
 meta/lib/oe/patch.py                          |   4 +-
 meta/lib/oe/rootfs.py                         |   2 +-
 meta/lib/oe/sstatesig.py                      |   4 +-
 meta/lib/oe/terminal.py                       |   2 +-
 meta/lib/oe/utils.py                          |   2 +-
 meta/lib/oeqa/controllers/masterimage.py      |   2 +-
 meta/lib/oeqa/controllers/testtargetloader.py |   2 +-
 meta/lib/oeqa/core/case.py                    |  12 +-
 meta/lib/oeqa/core/runner.py                  |   2 +-
 meta/lib/oeqa/core/target/ssh.py              |   6 +-
 meta/lib/oeqa/core/tests/test_data.py         |   4 +-
 meta/lib/oeqa/core/utils/concurrencytest.py   |   2 +-
 meta/lib/oeqa/oetest.py                       |   2 +-
 meta/lib/oeqa/runexported.py                  |   2 +-
 meta/lib/oeqa/runtime/cases/dnf.py            |   2 +-
 meta/lib/oeqa/runtime/cases/ltp.py            |   2 +-
 meta/lib/oeqa/runtime/cases/parselogs.py      |  30 +--
 meta/lib/oeqa/runtime/cases/ptest.py          |   4 +-
 meta/lib/oeqa/sdk/cases/gcc.py                |   4 +-
 meta/lib/oeqa/sdkext/cases/devtool.py         |   4 +-
 meta/lib/oeqa/selftest/cases/archiver.py      |   4 +-
 meta/lib/oeqa/selftest/cases/bbtests.py       |   8 +-
 meta/lib/oeqa/selftest/cases/buildoptions.py  |   2 +-
 .../lib/oeqa/selftest/cases/containerimage.py |   6 +-
 meta/lib/oeqa/selftest/cases/cve_check.py     |  30 +--
 meta/lib/oeqa/selftest/cases/fitimage.py      |   4 +-
 meta/lib/oeqa/selftest/cases/imagefeatures.py |   2 +-
 .../oeqa/selftest/cases/kerneldevelopment.py  |   3 +-
 .../oeqa/selftest/cases/oelib/buildhistory.py |  16 +-
 meta/lib/oeqa/selftest/cases/oelib/path.py    |  46 ++---
 meta/lib/oeqa/selftest/cases/package.py       |  16 +-
 meta/lib/oeqa/selftest/cases/sstatetests.py   |   4 +-
 meta/lib/oeqa/selftest/cases/wic.py           |   3 +-
 meta/lib/oeqa/targetcontrol.py                |   2 +-
 meta/lib/oeqa/utils/commands.py               |   2 +-
 meta/lib/oeqa/utils/logparser.py              |   2 +-
 meta/lib/oeqa/utils/sshcontrol.py             |   6 +-
 meta/lib/oeqa/utils/testexport.py             |   2 +-
 .../python/python3/create_manifest3.py        |   4 +-
 .../python/python3/get_module_deps3.py        |   8 +-
 .../perf/perf/sort-pmuevents.py               |  40 ++--
 meta/recipes-rt/rt-tests/files/rt_bmark.py    |   4 +-
 scripts/buildstats-diff                       |   2 +-
 scripts/combo-layer                           |   2 +-
 scripts/lib/checklayer/cases/bsp.py           |   2 +-
 scripts/lib/devtool/upgrade.py                |   2 +-
 scripts/lib/resulttool/manualexecution.py     |   4 +-
 scripts/lib/resulttool/report.py              |  14 +-
 scripts/lib/scriptutils.py                    |   2 +-
 scripts/lib/wic/engine.py                     |   5 +-
 scripts/lib/wic/filemap.py                    |   2 +-
 scripts/lib/wic/misc.py                       |   6 +-
 .../wic/plugins/source/bootimg-biosplusefi.py |   6 +-
 scripts/oe-pkgdata-browser                    |   4 +-
 scripts/oe-trim-schemas                       |   4 +-
 scripts/oepydevshell-internal.py              |   2 +-
 .../pybootchartgui/pybootchartgui/batch.py    |  18 +-
 scripts/pybootchartgui/pybootchartgui/draw.py | 174 +++++++++---------
 scripts/pybootchartgui/pybootchartgui/gui.py  |  32 ++--
 .../pybootchartgui/pybootchartgui/main.py.in  |   4 +-
 .../pybootchartgui/pybootchartgui/parsing.py  | 102 +++++-----
 .../pybootchartgui/process_tree.py            |   8 +-
 .../pybootchartgui/pybootchartgui/samples.py  |  18 +-
 scripts/wic                                   |   2 +-
 72 files changed, 441 insertions(+), 444 deletions(-)

diff --git a/meta-selftest/lib/devtool/bbpath.py b/meta-selftest/lib/devtool/bbpath.py
index 5e8ffb3af6..0204f13dd1 100644
--- a/meta-selftest/lib/devtool/bbpath.py
+++ b/meta-selftest/lib/devtool/bbpath.py
@@ -11,10 +11,10 @@ def plugin_init(plugins):
     already_loaded = plugin_name(__file__) in (plugin_name(p.__name__) for p in plugins)
 
 def print_name(args, config, basepath, workspace):
-    print (__file__)
+    print(__file__)
 
 def print_bbdir(args, config, basepath, workspace):
-    print (__file__.replace('/lib/devtool/bbpath.py',''))
+    print(__file__.replace('/lib/devtool/bbpath.py',''))
 
 def print_registered(args, config, basepath, workspace):
     global kept_context
diff --git a/meta-selftest/lib/recipetool/bbpath.py b/meta-selftest/lib/recipetool/bbpath.py
index 783b2dc769..23e6fa1b06 100644
--- a/meta-selftest/lib/recipetool/bbpath.py
+++ b/meta-selftest/lib/recipetool/bbpath.py
@@ -11,15 +11,15 @@ def plugin_init(plugins):
     already_loaded = plugin_name(__file__) in (plugin_name(p.__name__) for p in plugins)
 
 def print_name(opts):
-    print (__file__)
+    print(__file__)
 
 def print_bbdir(opts):
-    print (__file__.replace('/lib/recipetool/bbpath.py',''))
+    print(__file__.replace('/lib/recipetool/bbpath.py',''))
 
 def print_registered(opts):
     #global kept_context
     #print(kept_context.loaded)
-    print ("1")
+    print("1")
 
 def multiloaded(opts):
     global already_loaded
diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
index 8627ed3c31..051daf7a5d 100644
--- a/meta/lib/buildstats.py
+++ b/meta/lib/buildstats.py
@@ -92,10 +92,10 @@ class SystemStats:
             # for that point in the past.
             interval = time - self.diskstats_ltime
             if interval > 0:
-                sums = [ a - b for a, b in zip(diskdata, self.diskstats_data) ]
+                sums = [a - b for a, b in zip(diskdata, self.diskstats_data)]
                 readTput = sums[0] / 2.0 * 100.0 / interval
                 writeTput = sums[1] / 2.0 * 100.0 / interval
-                util = float( sums[2] ) / 10 / interval
+                util = float(sums[2]) / 10 / interval
                 util = max(0.0, min(1.0, util))
                 reduced = (self.diskstats_ltime, (readTput, writeTput, util))
 
@@ -112,7 +112,7 @@ class SystemStats:
             return None
         # CPU times {user, nice, system, idle, io_wait, irq, softirq} from first line
         tokens = data.split(b'\n', 1)[0].split()
-        times = [ int(token) for token in tokens[1:] ]
+        times = [int(token) for token in tokens[1:]]
         reduced = None
         if self.stat_ltimes:
             user = float((times[0] + times[1]) - (self.stat_ltimes[0] + self.stat_ltimes[1]))
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 3daff5f547..508dcdb7d4 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -183,10 +183,10 @@ def update_distro_data(distro_check_dir, datetime, d):
     The operations has to be protected by a lock so that
     only one thread performes it at a time.
     """
-    if not os.path.isdir (distro_check_dir):
+    if not os.path.isdir(distro_check_dir):
         try:
-            bb.note ("Making new directory: %s" % distro_check_dir)
-            os.makedirs (distro_check_dir)
+            bb.note("Making new directory: %s" % distro_check_dir)
+            os.makedirs(distro_check_dir)
         except OSError:
             raise Exception('Unable to create directory %s' % (distro_check_dir))
 
diff --git a/meta/lib/oe/elf.py b/meta/lib/oe/elf.py
index df0a4593fa..6549e8f09b 100644
--- a/meta/lib/oe/elf.py
+++ b/meta/lib/oe/elf.py
@@ -5,120 +5,120 @@
 def machine_dict(d):
 #           TARGET_OS  TARGET_ARCH   MACHINE, OSABI, ABIVERSION, Little Endian, 32bit?
     machdata = {
-            "darwin9" : { 
-                        "arm" :       (40,     0,    0,          True,          32),
+            "darwin9": { 
+                        "arm":       (40,     0,    0,          True,          32),
                       },
-            "eabi" : {
-                        "arm" :       (40,     0,    0,          True,          32),
+            "eabi": {
+                        "arm":       (40,     0,    0,          True,          32),
                       },
-            "elf" : {
-                        "aarch64" :   (183,    0,    0,          True,          64),
-                        "aarch64_be" :(183,    0,    0,          False,         64),
-                        "i586" :      (3,      0,    0,          True,          32),
-                        "i686" :      (3,      0,    0,          True,          32),
+            "elf": {
+                        "aarch64":   (183,    0,    0,          True,          64),
+                        "aarch64_be":(183,    0,    0,          False,         64),
+                        "i586":      (3,      0,    0,          True,          32),
+                        "i686":      (3,      0,    0,          True,          32),
                         "x86_64":     (62,     0,    0,          True,          64),
                         "epiphany":   (4643,   0,    0,          True,          32),
                         "lm32":       (138,    0,    0,          False,         32),
-                        "mips":       ( 8,     0,    0,          False,         32),
-                        "mipsel":     ( 8,     0,    0,          True,          32),
+                        "mips":       (8,     0,    0,          False,         32),
+                        "mipsel":     (8,     0,    0,          True,          32),
                         "microblaze":  (189,   0,    0,          False,         32),
                         "microblazeel":(189,   0,    0,          True,          32),
                         "powerpc":    (20,     0,    0,          False,         32),
                         "riscv32":    (243,    0,    0,          True,          32),
                         "riscv64":    (243,    0,    0,          True,          64),
                       },
-            "linux" : { 
-                        "aarch64" :   (183,    0,    0,          True,          64),
-                        "aarch64_be" :(183,    0,    0,          False,         64),
-                        "arm" :       (40,    97,    0,          True,          32),
+            "linux": { 
+                        "aarch64":   (183,    0,    0,          True,          64),
+                        "aarch64_be":(183,    0,    0,          False,         64),
+                        "arm":       (40,    97,    0,          True,          32),
                         "armeb":      (40,    97,    0,          False,         32),
                         "powerpc":    (20,     0,    0,          False,         32),
                         "powerpc64":  (21,     0,    0,          False,         64),
                         "powerpc64le":  (21,     0,    0,          True,         64),
-                        "i386":       ( 3,     0,    0,          True,          32),
-                        "i486":       ( 3,     0,    0,          True,          32),
-                        "i586":       ( 3,     0,    0,          True,          32),
-                        "i686":       ( 3,     0,    0,          True,          32),
+                        "i386":       (3,     0,    0,          True,          32),
+                        "i486":       (3,     0,    0,          True,          32),
+                        "i586":       (3,     0,    0,          True,          32),
+                        "i686":       (3,     0,    0,          True,          32),
                         "x86_64":     (62,     0,    0,          True,          64),
                         "ia64":       (50,     0,    0,          True,          64),
                         "alpha":      (36902,  0,    0,          True,          64),
                         "hppa":       (15,     3,    0,          False,         32),
-                        "m68k":       ( 4,     0,    0,          False,         32),
-                        "mips":       ( 8,     0,    0,          False,         32),
-                        "mipsel":     ( 8,     0,    0,          True,          32),
-                        "mips64":     ( 8,     0,    0,          False,         64),
-                        "mips64el":   ( 8,     0,    0,          True,          64),
-                        "mipsisa32r6":   ( 8,  0,    0,          False,         32),
-                        "mipsisa32r6el": ( 8,  0,    0,          True,          32),
-                        "mipsisa64r6":   ( 8,  0,    0,          False,         64),
-                        "mipsisa64r6el": ( 8,  0,    0,          True,          64),
+                        "m68k":       (4,     0,    0,          False,         32),
+                        "mips":       (8,     0,    0,          False,         32),
+                        "mipsel":     (8,     0,    0,          True,          32),
+                        "mips64":     (8,     0,    0,          False,         64),
+                        "mips64el":   (8,     0,    0,          True,          64),
+                        "mipsisa32r6":   (8,  0,    0,          False,         32),
+                        "mipsisa32r6el": (8,  0,    0,          True,          32),
+                        "mipsisa64r6":   (8,  0,    0,          False,         64),
+                        "mipsisa64r6el": (8,  0,    0,          True,          64),
                         "nios2":      (113,    0,    0,          True,          32),
                         "riscv32":    (243,    0,    0,          True,          32),
                         "riscv64":    (243,    0,    0,          True,          64),
                         "s390":       (22,     0,    0,          False,         32),
                         "sh4":        (42,     0,    0,          True,          32),
-                        "sparc":      ( 2,     0,    0,          False,         32),
+                        "sparc":      (2,     0,    0,          False,         32),
                         "microblaze":  (189,   0,    0,          False,         32),
                         "microblazeel":(189,   0,    0,          True,          32),
                       },
-            "linux-musl" : { 
-                        "aarch64" :   (183,    0,    0,            True,          64),
-                        "aarch64_be" :(183,    0,    0,            False,         64),
-                        "arm" :       (  40,    97,    0,          True,          32),
-                        "armeb":      (  40,    97,    0,          False,         32),
-                        "powerpc":    (  20,     0,    0,          False,         32),
-                        "powerpc64":  (  21,     0,    0,          False,         64),
+            "linux-musl": { 
+                        "aarch64":   (183,    0,    0,            True,          64),
+                        "aarch64_be":(183,    0,    0,            False,         64),
+                        "arm":       (40,    97,    0,          True,          32),
+                        "armeb":      (40,    97,    0,          False,         32),
+                        "powerpc":    (20,     0,    0,          False,         32),
+                        "powerpc64":  (21,     0,    0,          False,         64),
                         "powerpc64le":  (21,     0,    0,          True,         64),
-                        "i386":       (   3,     0,    0,          True,          32),
-                        "i486":       (   3,     0,    0,          True,          32),
-                        "i586":       (   3,     0,    0,          True,          32),
-                        "i686":       (   3,     0,    0,          True,          32),
-                        "x86_64":     (  62,     0,    0,          True,          64),
-                        "mips":       (   8,     0,    0,          False,         32),
-                        "mipsel":     (   8,     0,    0,          True,          32),
-                        "mips64":     (   8,     0,    0,          False,         64),
-                        "mips64el":   (   8,     0,    0,          True,          64),
+                        "i386":       (3,     0,    0,          True,          32),
+                        "i486":       (3,     0,    0,          True,          32),
+                        "i586":       (3,     0,    0,          True,          32),
+                        "i686":       (3,     0,    0,          True,          32),
+                        "x86_64":     (62,     0,    0,          True,          64),
+                        "mips":       (8,     0,    0,          False,         32),
+                        "mipsel":     (8,     0,    0,          True,          32),
+                        "mips64":     (8,     0,    0,          False,         64),
+                        "mips64el":   (8,     0,    0,          True,          64),
                         "microblaze":  (189,     0,    0,          False,         32),
                         "microblazeel":(189,     0,    0,          True,          32),
                         "riscv32":    (243,      0,    0,          True,          32),
                         "riscv64":    (243,      0,    0,          True,          64),
-                        "sh4":        (  42,     0,    0,          True,          32),
+                        "sh4":        (42,     0,    0,          True,          32),
                       },
-            "uclinux-uclibc" : {
-                        "bfin":       ( 106,     0,    0,          True,         32),
+            "uclinux-uclibc": {
+                        "bfin":       (106,     0,    0,          True,         32),
                       }, 
-            "linux-gnueabi" : {
-                        "arm" :       (40,     0,    0,          True,          32),
-                        "armeb" :     (40,     0,    0,          False,         32),
+            "linux-gnueabi": {
+                        "arm":       (40,     0,    0,          True,          32),
+                        "armeb":     (40,     0,    0,          False,         32),
                       },
-            "linux-musleabi" : {
-                        "arm" :       (40,     0,    0,          True,          32),
-                        "armeb" :     (40,     0,    0,          False,         32),
+            "linux-musleabi": {
+                        "arm":       (40,     0,    0,          True,          32),
+                        "armeb":     (40,     0,    0,          False,         32),
                       },
-            "linux-gnuspe" : {
+            "linux-gnuspe": {
                         "powerpc":    (20,     0,    0,          False,         32),
                       },
-            "linux-muslspe" : {
+            "linux-muslspe": {
                         "powerpc":    (20,     0,    0,          False,         32),
                       },
-            "linux-gnu" :       {
+            "linux-gnu":       {
                         "powerpc":    (20,     0,    0,          False,         32),
                         "sh4":        (42,     0,    0,          True,          32),
                       },
-            "linux-gnu_ilp32" :     {
-                        "aarch64" :   (183,    0,    0,          True,          32),
+            "linux-gnu_ilp32":     {
+                        "aarch64":   (183,    0,    0,          True,          32),
                       },
-            "linux-gnux32" :       {
+            "linux-gnux32":       {
                         "x86_64":     (62,     0,    0,          True,          32),
                       },
-            "linux-muslx32" :       {
+            "linux-muslx32":       {
                         "x86_64":     (62,     0,    0,          True,          32),
                       },
-            "linux-gnun32" :       {
-                        "mips64":       ( 8,     0,    0,          False,         32),
-                        "mips64el":     ( 8,     0,    0,          True,          32),
-                        "mipsisa64r6":  ( 8,     0,    0,          False,         32),
-                        "mipsisa64r6el":( 8,     0,    0,          True,          32),
+            "linux-gnun32":       {
+                        "mips64":       (8,     0,    0,          False,         32),
+                        "mips64el":     (8,     0,    0,          True,          32),
+                        "mipsisa64r6":  (8,     0,    0,          False,         32),
+                        "mipsisa64r6el":(8,     0,    0,          True,          32),
                       },
         }
 
@@ -127,7 +127,7 @@ def machine_dict(d):
     extra_machdata = (d and d.getVar("PACKAGEQA_EXTRA_MACHDEFFUNCS" or None) or "").split()
     for m in extra_machdata:
         call = m + "(machdata, d)"
-        locs = { "machdata" : machdata, "d" : d}
+        locs = {"machdata": machdata, "d": d}
         machdata = bb.utils.better_eval(call, locs)
 
     return machdata
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 43e46380d7..791d529935 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -37,7 +37,7 @@ def release_dict_lsb():
     except bb.process.CmdError as exc:
         return {}
 
-    lsb_map = { 'Distributor ID': 'DISTRIB_ID',
+    lsb_map = {'Distributor ID': 'DISTRIB_ID',
                 'Release': 'DISTRIB_RELEASE'}
     lsb_keys = lsb_map.keys()
 
diff --git a/meta/lib/oe/package_manager/ipk/__init__.py b/meta/lib/oe/package_manager/ipk/__init__.py
index 4cd3963111..8e2086a6f3 100644
--- a/meta/lib/oe/package_manager/ipk/__init__.py
+++ b/meta/lib/oe/package_manager/ipk/__init__.py
@@ -166,7 +166,7 @@ class OpkgPM(OpkgDpkgPM):
         self.deploy_dir = oe.path.join(self.d.getVar('WORKDIR'), ipk_repo_workdir)
         self.deploy_lock_file = os.path.join(self.deploy_dir, "deploy.lock")
         self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg")
-        self.opkg_args = "--volatile-cache -f %s -t %s -o %s " % (self.config_file, self.d.expand('${T}/ipktemp/') ,target_rootfs)
+        self.opkg_args = "--volatile-cache -f %s -t %s -o %s " % (self.config_file, self.d.expand('${T}/ipktemp/'),target_rootfs)
         self.opkg_args += self.d.getVar("OPKG_ARGS")
 
         if prepare_index:
diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py
index c5419a3bc7..9acb2b2ea3 100644
--- a/meta/lib/oe/package_manager/rpm/__init__.py
+++ b/meta/lib/oe/package_manager/rpm/__init__.py
@@ -300,7 +300,7 @@ class RpmPM(PackageManager):
     def update(self):
         self._invoke_dnf(["makecache", "--refresh"])
 
-    def _invoke_dnf(self, dnf_args, fatal=True, print_output=True ):
+    def _invoke_dnf(self, dnf_args, fatal=True, print_output=True):
         os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs
 
         dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf")
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index eeea18ef04..a191a613bd 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -35,7 +35,7 @@ def runcmd(args, dir=None):
         # print("cwd: %s -> %s" % (olddir, dir))
 
     try:
-        args = [ pipes.quote(str(arg)) for arg in args ]
+        args = [pipes.quote(str(arg)) for arg in args]
         cmd = " ".join(args)
         # print("cmd: %s" % cmd)
         proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
@@ -190,7 +190,7 @@ class PatchTree(PatchSet):
     def _appendPatchFile(self, patch, strippath):
         with open(self.seriespath, 'a') as f:
             f.write(os.path.basename(patch) + "," + strippath + "\n")
-        shellcmd = ["cat", patch, ">" , self.patchdir + "/" + os.path.basename(patch)]
+        shellcmd = ["cat", patch, ">", self.patchdir + "/" + os.path.basename(patch)]
         runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
 
     def _removePatch(self, p):
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index ad9fd77c8b..0043df18d7 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -46,7 +46,7 @@ class Rootfs(object, metaclass=ABCMeta):
         # Ignore any lines containing log_check to avoid recursion, and ignore
         # lines beginning with a + since sh -x may emit code which isn't
         # actually executed, but may contain error messages
-        excludes = [ 'log_check', r'^\+' ]
+        excludes = ['log_check', r'^\+']
         if hasattr(self, 'log_check_expected_regexes'):
             excludes.extend(self.log_check_expected_regexes)
         # Insert custom log_check excludes
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 5198203367..560c6a40dd 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -107,7 +107,7 @@ class SignatureGeneratorOEBasicHashMixIn(object):
         self.mismatch_msgs = []
         self.unlockedrecipes = (data.getVar("SIGGEN_UNLOCKED_RECIPES") or
                                 "").split()
-        self.unlockedrecipes = { k: "" for k in self.unlockedrecipes }
+        self.unlockedrecipes = {k: "" for k in self.unlockedrecipes}
         self.buildarch = data.getVar('BUILD_ARCH')
         self._internal = False
         pass
@@ -180,7 +180,7 @@ class SignatureGeneratorOEBasicHashMixIn(object):
 
             # If any unlocked recipe is in the direct dependencies then the
             # current recipe should be unlocked as well.
-            depnames = [ recipename_from_dep(x) for x in deps if mc == bb.runqueue.mc_from_tid(x)]
+            depnames = [recipename_from_dep(x) for x in deps if mc == bb.runqueue.mc_from_tid(x)]
             if any(x in y for y in depnames for x in self.unlockedrecipes):
                 self.unlockedrecipes[recipename] = ''
                 unlocked = True
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 116c104536..04585afd42 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -42,7 +42,7 @@ class Terminal(Popen, metaclass=Registry):
                 raise
 
     def format_command(self, sh_cmd, title):
-        fmt = {'title': title or 'Terminal', 'command': sh_cmd, 'cwd': os.getcwd() }
+        fmt = {'title': title or 'Terminal', 'command': sh_cmd, 'cwd': os.getcwd()}
         if isinstance(self.command, str):
             return shlex.split(self.command.format(**fmt))
         else:
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index b33d049722..123ad07fe4 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -8,7 +8,7 @@ import traceback
 
 def read_file(filename):
     try:
-        f = open( filename, "r" )
+        f = open(filename, "r")
     except IOError as reason:
         return "" # WARNING: can't raise an error now because of the new RDEPENDS handling. This is a bit ugly. :M:
     else:
diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py
index 0bf5917e48..c22bc2833d 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -42,7 +42,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
         self.server_ip = d.getVar("TEST_SERVER_IP")
         if not self.server_ip:
             try:
-                self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1]
+                self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip]).split("\n")[0].split()[-1]
             except Exception as e:
                 bb.fatal("Failed to determine the host IP address (alternatively you can set TEST_SERVER_IP with the IP address of this machine): %s" % e)
         bb.note("Server IP: %s" % self.server_ip)
diff --git a/meta/lib/oeqa/controllers/testtargetloader.py b/meta/lib/oeqa/controllers/testtargetloader.py
index 23101c7371..9ef039050e 100644
--- a/meta/lib/oeqa/controllers/testtargetloader.py
+++ b/meta/lib/oeqa/controllers/testtargetloader.py
@@ -65,7 +65,7 @@ class TestTargetLoader:
             obj = getattr(module, target)
             if obj: 
                 from oeqa.targetcontrol import BaseTarget
-                if( not issubclass(obj, BaseTarget)):
+                if(not issubclass(obj, BaseTarget)):
                     bb.warn("Target {0} found, but subclass is not BaseTarget".format(target))
         except:
             obj = None
diff --git a/meta/lib/oeqa/core/case.py b/meta/lib/oeqa/core/case.py
index 84daa343d8..7ddfd07677 100644
--- a/meta/lib/oeqa/core/case.py
+++ b/meta/lib/oeqa/core/case.py
@@ -67,16 +67,16 @@ class OEPTestResultTestCase:
         logdata = log.encode("utf-8") if isinstance(log, str) else log
         logdata = zlib.compress(logdata)
         logdata = base64.b64encode(logdata).decode("utf-8")
-        return {"compressed" : logdata}
+        return {"compressed": logdata}
 
     def ptest_rawlog(self, log):
         if not hasattr(self, "extraresults"):
-            self.extraresults = {"ptestresult.sections" : {}}
-        self.extraresults["ptestresult.rawlogs"] = {"log" : self._compress_log(log)}
+            self.extraresults = {"ptestresult.sections": {}}
+        self.extraresults["ptestresult.rawlogs"] = {"log": self._compress_log(log)}
 
     def ptest_section(self, section, duration=None, log=None, logfile=None, exitcode=None):
         if not hasattr(self, "extraresults"):
-            self.extraresults = {"ptestresult.sections" : {}}
+            self.extraresults = {"ptestresult.sections": {}}
 
         sections = self.extraresults.get("ptestresult.sections")
         if section not in sections:
@@ -95,11 +95,11 @@ class OEPTestResultTestCase:
 
     def ptest_result(self, section, test, result):
         if not hasattr(self, "extraresults"):
-            self.extraresults = {"ptestresult.sections" : {}}
+            self.extraresults = {"ptestresult.sections": {}}
 
         sections = self.extraresults.get("ptestresult.sections")
         if section not in sections:
             sections[section] = {}
         resultname = "ptestresult.{}.{}".format(section, test)
-        self.extraresults[resultname] = {"status" : result}
+        self.extraresults[resultname] = {"status": result}
 
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 1d325e188d..72078eb8bd 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -93,7 +93,7 @@ class OETestResult(_TestResult):
     def _getTestResultDetails(self, case):
         result_types = {'failures': 'FAILED', 'errors': 'ERROR', 'skipped': 'SKIPPED',
                         'expectedFailures': 'EXPECTEDFAIL', 'successes': 'PASSED',
-                        'unexpectedSuccesses' : 'PASSED'}
+                        'unexpectedSuccesses': 'PASSED'}
 
         for rtype in result_types:
             found = False
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 923a223b25..9493e186b3 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -38,11 +38,11 @@ class OESSHTarget(OETarget):
                 '-o', 'StrictHostKeyChecking=no',
                 '-o', 'LogLevel=ERROR'
                 ]
-        self.ssh = ['ssh', '-l', self.user ] + ssh_options
+        self.ssh = ['ssh', '-l', self.user] + ssh_options
         self.scp = ['scp'] + ssh_options
         if port:
-            self.ssh = self.ssh + [ '-p', port ]
-            self.scp = self.scp + [ '-P', port ]
+            self.ssh = self.ssh + ['-p', port]
+            self.scp = self.scp + ['-P', port]
         self._monitor_dumper = None
 
     def start(self, **kwargs):
diff --git a/meta/lib/oeqa/core/tests/test_data.py b/meta/lib/oeqa/core/tests/test_data.py
index acd726f3a0..6fddbb4e96 100755
--- a/meta/lib/oeqa/core/tests/test_data.py
+++ b/meta/lib/oeqa/core/tests/test_data.py
@@ -33,7 +33,7 @@ class TestData(TestBase):
 
     def test_data_fail_wrong_variable(self):
         expectedError = 'AssertionError'
-        d = {'IMAGE' : 'core-image-weston', 'ARCH' : 'arm'}
+        d = {'IMAGE': 'core-image-weston', 'ARCH': 'arm'}
 
         tc = self._testLoader(d=d, modules=self.modules)
         results = tc.runTests()
@@ -46,7 +46,7 @@ class TestData(TestBase):
             self.assertTrue(expect)
 
     def test_data_ok(self):
-        d = {'IMAGE' : 'core-image-minimal', 'ARCH' : 'x86', 'MACHINE' : 'qemuarm'}
+        d = {'IMAGE': 'core-image-minimal', 'ARCH': 'x86', 'MACHINE': 'qemuarm'}
 
         tc = self._testLoader(d=d, modules=self.modules)
         self.assertEqual(True, tc.runTests().wasSuccessful())
diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py b/meta/lib/oeqa/core/utils/concurrencytest.py
index 678484243b..e82acbd368 100644
--- a/meta/lib/oeqa/core/utils/concurrencytest.py
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -128,7 +128,7 @@ class ExtraResultsDecoderTestResult(ProxyTestResult):
 class ExtraResultsEncoderTestResult(ProxyTestResult):
     def _addResult(self, method, test, *args, exception=False, **kwargs):
         if hasattr(test, "extraresults"):
-            extras = lambda : [json.dumps(test.extraresults).encode()]
+            extras = lambda: [json.dumps(test.extraresults).encode()]
             kwargs = kwargs.copy()
             if "details" not in kwargs:
                 kwargs["details"] = {}
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 2ee67586f6..e1c74958bd 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -123,7 +123,7 @@ class oeRuntimeTest(oeTest):
             self.tc.host_dumper.dump_host()
             self.target.target_dumper.dump_target(
                     self.tc.host_dumper.dump_dir)
-            print ("%s dump data stored in %s" % (self._testMethodName,
+            print("%s dump data stored in %s" % (self._testMethodName,
                      self.tc.host_dumper.dump_dir))
 
         self.tearDownLocal()
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index 5f087bc950..1e994bc655 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -135,7 +135,7 @@ def extract_sdk(d):
     tarball_path = os.path.join(export_dir, tools_dir, tarball_name)
     extract_path = os.path.join(export_dir, "sysroot")
     if os.path.isfile(tarball_path):
-        print ("Found SDK tarball %s. Extracting..." % tarball_path)
+        print("Found SDK tarball %s. Extracting..." % tarball_path)
         result = runCmd("%s -y -d %s" % (tarball_path, extract_path))
         for f in os.listdir(extract_path):
             if f.startswith("environment-setup"):
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
index aeef8c6086..51f46cc4ba 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -187,5 +187,5 @@ class DnfRepoTest(DnfTest):
         self.assertEqual(1, status, "%s was not removed,  is listed as installed"%excludepkg)
         self.dnf_with_repo('install -y --exclude=%s --exclude=curl-staticdev curl*' % excludepkg)
         #check curl-dev is not installed after being excluded
-        status, output = self.target.run('dnf list --installed | grep %s'% excludepkg , 1500)
+        status, output = self.target.run('dnf list --installed | grep %s'% excludepkg, 1500)
         self.assertEqual(1, status, "%s was not excluded, is listed as installed"%excludepkg)
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py
index a66d5d13d7..a1d59c39d2 100644
--- a/meta/lib/oeqa/runtime/cases/ltp.py
+++ b/meta/lib/oeqa/runtime/cases/ltp.py
@@ -76,7 +76,7 @@ class LtpTest(LtpTestBase):
             self.extras['ltpresult.rawlogs']['log'] = self.extras['ltpresult.rawlogs']['log'] + output
 
             # copy nice log from DUT
-            dst = os.path.join(self.ltptest_log_dir, "%s" %  ltp_group )
+            dst = os.path.join(self.ltptest_log_dir, "%s" %  ltp_group)
             remote_src = "/opt/ltp/results/%s" % ltp_group 
             (status, output) = self.target.copyFrom(remote_src, dst, True)
             msg = 'File could not be copied. Output: %s' % output
diff --git a/meta/lib/oeqa/runtime/cases/parselogs.py b/meta/lib/oeqa/runtime/cases/parselogs.py
index d58968923e..3638ed529f 100644
--- a/meta/lib/oeqa/runtime/cases/parselogs.py
+++ b/meta/lib/oeqa/runtime/cases/parselogs.py
@@ -93,22 +93,22 @@ qemux86_common = [
 ] + common_errors
 
 ignore_errors = {
-    'default' : common_errors,
-    'qemux86' : [
+    'default': common_errors,
+    'qemux86': [
         'Failed to access perfctr msr (MSR',
         'pci 0000:00:00.0: [Firmware Bug]: reg 0x..: invalid BAR (can\'t size)',
         ] + qemux86_common,
-    'qemux86-64' : qemux86_common,
-    'qemumips' : [
+    'qemux86-64': qemux86_common,
+    'qemumips': [
         'Failed to load module "glx"',
         'pci 0000:00:00.0: [Firmware Bug]: reg 0x..: invalid BAR (can\'t size)',
         'cacheinfo: Failed to find cpu0 device node',
         ] + common_errors,
-    'qemumips64' : [
+    'qemumips64': [
         'pci 0000:00:00.0: [Firmware Bug]: reg 0x..: invalid BAR (can\'t size)',
         'cacheinfo: Failed to find cpu0 device node',
          ] + common_errors,
-    'qemuppc' : [
+    'qemuppc': [
         'PCI 0000:00 Cannot reserve Legacy IO [io  0x0000-0x0fff]',
         'host side 80-wire cable detection failed, limiting max speed',
         'mode "640x480" test failed',
@@ -116,12 +116,12 @@ ignore_errors = {
         'can\'t handle BAR above 4GB',
         'Cannot reserve Legacy IO',
         ] + common_errors,
-    'qemuppc64' : [
+    'qemuppc64': [
         'vio vio: uevent: failed to send synthetic uevent',
         'synth uevent: /devices/vio: failed to send uevent',
         'PCI 0000:00 Cannot reserve Legacy IO [io  0x10000-0x10fff]',
         ] + common_errors,
-    'qemuarm' : [
+    'qemuarm': [
         'mmci-pl18x: probe of fpga:05 failed with error -22',
         'mmci-pl18x: probe of fpga:0b failed with error -22',
         'Failed to load module "glx"',
@@ -136,14 +136,14 @@ ignore_errors = {
         'Failed to initialize \'/amba/timer@101e3000\': -22',
         'jitterentropy: Initialization failed with host not compliant with requirements: 2',
         ] + common_errors,
-    'qemuarm64' : [
+    'qemuarm64': [
         'Fatal server error:',
         '(EE) Server terminated with error (1). Closing log file.',
         'dmi: Firmware registration failed.',
         'irq: type mismatch, failed to map hwirq-27 for /intc',
         'logind: failed to get session seat',
         ] + common_errors,
-    'intel-core2-32' : [
+    'intel-core2-32': [
         'ACPI: No _BQC method, cannot determine initial brightness',
         '[Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness',
         '(EE) Failed to load module "psb"',
@@ -155,7 +155,7 @@ ignore_errors = {
         'dmi: Firmware registration failed.',
         'ioremap error for 0x78',
         ] + x86_common,
-    'intel-corei7-64' : [
+    'intel-corei7-64': [
         'can\'t set Max Payload Size to 256',
         'intel_punit_ipc: can\'t request region for resource',
         '[drm] parse error at position 4 in video mode \'efifb\'',
@@ -170,8 +170,8 @@ ignore_errors = {
         'Bluetooth: hci0: Failed to send firmware data (-38)',
         'atkbd serio0: Failed to enable keyboard on isa0060/serio0',
         ] + x86_common,
-    'genericx86' : x86_common,
-    'genericx86-64' : [
+    'genericx86': x86_common,
+    'genericx86-64': [
         'Direct firmware load for i915',
         'Failed to load firmware i915',
         'Failed to fetch GuC',
@@ -179,13 +179,13 @@ ignore_errors = {
         'Failed to load DMC firmware',
         'The driver is built-in, so to load the firmware you need to',
         ] + x86_common,
-    'edgerouter' : [
+    'edgerouter': [
         'not creating \'/sys/firmware/fdt\'',
         'Failed to find cpu0 device node',
         'Fatal server error:',
         'Server terminated with error',
         ] + common_errors,
-    'beaglebone-yocto' : [
+    'beaglebone-yocto': [
         'Direct firmware load for regulatory.db',
         'failed to load regulatory.db',
         'l4_wkup_cm',
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
index 0800f3c27f..a8a4d17003 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -54,7 +54,7 @@ class PtestRunnerTest(OERuntimeTestCase):
         ptest_runner_log = os.path.join(ptest_log_dir, 'ptest-runner.log')
 
         libdir = self.td.get('libdir', '')
-        ptest_dirs = [ '/usr/lib' ]
+        ptest_dirs = ['/usr/lib']
         if not libdir in ptest_dirs:
             ptest_dirs.append(libdir)
         status, output = self.target.run('ptest-runner -d \"{}\"'.format(' '.join(ptest_dirs)), 0)
@@ -95,7 +95,7 @@ class PtestRunnerTest(OERuntimeTestCase):
                 failed_tests[section] = sections[section]["log"]
 
         for section in results:
-            failed_testcases = [ "_".join(test.translate(trans).split()) for test in results[section] if results[section][test] == 'FAILED' ]
+            failed_testcases = ["_".join(test.translate(trans).split()) for test in results[section] if results[section][test] == 'FAILED']
             if failed_testcases:
                 failed_tests[section] = failed_testcases
 
diff --git a/meta/lib/oeqa/sdk/cases/gcc.py b/meta/lib/oeqa/sdk/cases/gcc.py
index 71e71dee0a..7146f368e9 100644
--- a/meta/lib/oeqa/sdk/cases/gcc.py
+++ b/meta/lib/oeqa/sdk/cases/gcc.py
@@ -17,8 +17,8 @@ class GccCompileTest(OESDKTestCase):
 
     @classmethod
     def setUpClass(self):
-        files = {'test.c' : self.tc.files_dir, 'test.cpp' : self.tc.files_dir,
-                'testsdkmakefile' : self.tc.sdk_files_dir} 
+        files = {'test.c': self.tc.files_dir, 'test.cpp': self.tc.files_dir,
+                'testsdkmakefile': self.tc.sdk_files_dir} 
         for f in files:
             shutil.copyfile(os.path.join(files[f], f),
                     os.path.join(self.tc.sdk_dir, f))
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py
index ef5dea1f47..8c07d5e3b3 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -72,7 +72,7 @@ class DevtoolTest(OESDKExtTestCase):
         req = 'https://github.com/rdfa/librdfa'
         recipe = "librdfa"
         self._run('devtool sdk-install libxml2')
-        self._run('devtool add %s %s' % (recipe, req) )
+        self._run('devtool add %s %s' % (recipe, req))
         try:
             self._run('devtool build %s' % recipe)
         finally:
@@ -81,7 +81,7 @@ class DevtoolTest(OESDKExtTestCase):
     def test_devtool_kernelmodule(self):
         docfile = 'https://git.yoctoproject.org/git/kernel-module-hello-world'
         recipe = 'kernel-module-hello-world'
-        self._run('devtool add %s %s' % (recipe, docfile) )
+        self._run('devtool add %s %s' % (recipe, docfile))
         try:
             self._run('devtool build %s' % recipe)
         finally:
diff --git a/meta/lib/oeqa/selftest/cases/archiver.py b/meta/lib/oeqa/selftest/cases/archiver.py
index ddd08ecf84..35b3ddb5fb 100644
--- a/meta/lib/oeqa/selftest/cases/archiver.py
+++ b/meta/lib/oeqa/selftest/cases/archiver.py
@@ -86,8 +86,8 @@ class Archiver(OESelftestTestCase):
         Author:      André Draszik <adraszik@tycoint.com>
         """
 
-        target_recipes = [ 'initscripts', 'selftest-ed' ]
-        native_recipes = [ 'update-rc.d-native', 'selftest-ed-native' ]
+        target_recipes = ['initscripts', 'selftest-ed']
+        native_recipes = ['update-rc.d-native', 'selftest-ed-native']
 
         features = 'INHERIT += "archiver"\n'
         features += 'ARCHIVER_MODE[src] = "original"\n'
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index e8ce78480b..524d7b6828 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -51,7 +51,7 @@ class BitbakeTests(OESelftestTestCase):
         bitbake('m4-native -cclean')
         result = bitbake('m4-native')
         find_setscene = re.search("m4-native.*do_.*_setscene", result.output)
-        self.assertTrue(find_setscene, msg="No \"m4-native.*do_.*_setscene\" message found during bitbake m4-native. bitbake output: %s" % result.output )
+        self.assertTrue(find_setscene, msg="No \"m4-native.*do_.*_setscene\" message found during bitbake m4-native. bitbake output: %s" % result.output)
 
     def test_bitbake_invalid_recipe(self):
         result = bitbake('-b asdf', ignore_status=True)
@@ -191,7 +191,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
     def test_prefile(self):
         preconf = os.path.join(self.builddir, 'conf/prefile.conf')
         self.track_for_cleanup(preconf)
-        ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"")
+        ftools.write_file(preconf,"TEST_PREFILE=\"prefile\"")
         result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
         self.assertIn('prefile', result.output)
         self.write_config("TEST_PREFILE=\"localconf\"")
@@ -201,7 +201,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
     def test_postfile(self):
         postconf = os.path.join(self.builddir, 'conf/postfile.conf')
         self.track_for_cleanup(postconf)
-        ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"")
+        ftools.write_file(postconf, "TEST_POSTFILE=\"postfile\"")
         self.write_config("TEST_POSTFILE=\"localconf\"")
         result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')
         self.assertIn('postfile', result.output)
@@ -216,7 +216,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
 INHERIT_remove = \"report-error\"
 """)
         self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
-        self.write_recipeinc('man-db',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
+        self.write_recipeinc('man-db',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n")
         runCmd('bitbake -c cleanall man-db xcursor-transparent-theme')
         result = runCmd('bitbake -c unpack -k man-db xcursor-transparent-theme', ignore_status=True)
         errorpos = result.output.find('ERROR: Function failed: do_fail_task')
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py
index 35ff0cbcf2..6621287696 100644
--- a/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -45,7 +45,7 @@ class ImageOptionsTests(OESelftestTestCase):
         log_compile = os.path.join(get_bb_var("WORKDIR", recipe), "temp/log.do_compile")
         with open(log_compile, "r") as f:
             loglines = "".join(f.readlines())
-        self.assertIn("ccache", loglines, msg="No match for ccache in %s log.do_compile. For further details: %s" % (recipe , log_compile))
+        self.assertIn("ccache", loglines, msg="No match for ccache in %s log.do_compile. For further details: %s" % (recipe, log_compile))
 
     def test_read_only_image(self):
         distro_features = get_bb_var('DISTRO_FEATURES')
diff --git a/meta/lib/oeqa/selftest/cases/containerimage.py b/meta/lib/oeqa/selftest/cases/containerimage.py
index 79cc8a0f2e..730ffe42c9 100644
--- a/meta/lib/oeqa/selftest/cases/containerimage.py
+++ b/meta/lib/oeqa/selftest/cases/containerimage.py
@@ -28,7 +28,7 @@ class ContainerImageTests(OESelftestTestCase):
 
         def get_each_path_part(path):
             if path:
-                part = [ '.' + path + '/' ]
+                part = ['.' + path + '/']
                 result = get_each_path_part(path.rsplit('/', 1)[0])
                 if result:
                     return part + result
@@ -63,10 +63,10 @@ IMAGE_INSTALL_remove = "ssh-pregen-hostkeys"
                     '.{localstatedir}/lib/'
                 ]
 
-        expected_files = [ x.format(bindir=bbvars['bindir'],
+        expected_files = [x.format(bindir=bbvars['bindir'],
                                     sysconfdir=bbvars['sysconfdir'],
                                     localstatedir=bbvars['localstatedir'])
-                                    for x in expected_files ]
+                                    for x in expected_files]
 
         # Since tar lists all directories individually, make sure each element
         # from bindir, sysconfdir, etc is added
diff --git a/meta/lib/oeqa/selftest/cases/cve_check.py b/meta/lib/oeqa/selftest/cases/cve_check.py
index d1947baffc..4f78bbaf55 100644
--- a/meta/lib/oeqa/selftest/cases/cve_check.py
+++ b/meta/lib/oeqa/selftest/cases/cve_check.py
@@ -5,40 +5,40 @@ class CVECheck(OESelftestTestCase):
 
     def test_version_compare(self):
         result = Version("100") > Version("99")
-        self.assertTrue( result, msg="Failed to compare version '100' > '99'")
+        self.assertTrue(result, msg="Failed to compare version '100' > '99'")
         result = Version("2.3.1") > Version("2.2.3")
-        self.assertTrue( result, msg="Failed to compare version '2.3.1' > '2.2.3'")
+        self.assertTrue(result, msg="Failed to compare version '2.3.1' > '2.2.3'")
         result = Version("2021-01-21") > Version("2020-12-25")
-        self.assertTrue( result, msg="Failed to compare version '2021-01-21' > '2020-12-25'")
+        self.assertTrue(result, msg="Failed to compare version '2021-01-21' > '2020-12-25'")
         result = Version("1.2-20200910") < Version("1.2-20200920")
-        self.assertTrue( result, msg="Failed to compare version '1.2-20200910' < '1.2-20200920'")
+        self.assertTrue(result, msg="Failed to compare version '1.2-20200910' < '1.2-20200920'")
 
         result = Version("1.0") >= Version("1.0beta")
-        self.assertTrue( result, msg="Failed to compare version '1.0' >= '1.0beta'")
+        self.assertTrue(result, msg="Failed to compare version '1.0' >= '1.0beta'")
         result = Version("1.0-rc2") > Version("1.0-rc1")
-        self.assertTrue( result, msg="Failed to compare version '1.0-rc2' > '1.0-rc1'")
+        self.assertTrue(result, msg="Failed to compare version '1.0-rc2' > '1.0-rc1'")
         result = Version("1.0.alpha1") < Version("1.0")
-        self.assertTrue( result, msg="Failed to compare version '1.0.alpha1' < '1.0'")
+        self.assertTrue(result, msg="Failed to compare version '1.0.alpha1' < '1.0'")
         result = Version("1.0_dev") <= Version("1.0")
-        self.assertTrue( result, msg="Failed to compare version '1.0_dev' <= '1.0'")
+        self.assertTrue(result, msg="Failed to compare version '1.0_dev' <= '1.0'")
 
         # ignore "p1" and "p2", so these should be equal
         result = Version("1.0p2") == Version("1.0p1")
-        self.assertTrue( result ,msg="Failed to compare version '1.0p2' to '1.0p1'")
+        self.assertTrue(result,msg="Failed to compare version '1.0p2' to '1.0p1'")
         # ignore the "b" and "r"
         result = Version("1.0b") == Version("1.0r")
-        self.assertTrue( result ,msg="Failed to compare version '1.0b' to '1.0r'")
+        self.assertTrue(result,msg="Failed to compare version '1.0b' to '1.0r'")
 
         # consider the trailing alphabet as patched level when comparing
         result = Version("1.0b","alphabetical") < Version("1.0r","alphabetical")
-        self.assertTrue( result ,msg="Failed to compare version with suffix '1.0b' < '1.0r'")
+        self.assertTrue(result,msg="Failed to compare version with suffix '1.0b' < '1.0r'")
         result = Version("1.0b","alphabetical") > Version("1.0","alphabetical")
-        self.assertTrue( result ,msg="Failed to compare version with suffix '1.0b' > '1.0'")
+        self.assertTrue(result,msg="Failed to compare version with suffix '1.0b' > '1.0'")
 
         # consider the trailing "p" and "patch" as patched released when comparing
         result = Version("1.0","patch") < Version("1.0p1","patch")
-        self.assertTrue( result ,msg="Failed to compare version with suffix '1.0' < '1.0p1'")
+        self.assertTrue(result,msg="Failed to compare version with suffix '1.0' < '1.0p1'")
         result = Version("1.0p2","patch") > Version("1.0p1","patch")
-        self.assertTrue( result ,msg="Failed to compare version with suffix '1.0p2' > '1.0p1'")
+        self.assertTrue(result,msg="Failed to compare version with suffix '1.0p2' > '1.0p1'")
         result = Version("1.0_patch2","patch") < Version("1.0_patch3","patch")
-        self.assertTrue( result ,msg="Failed to compare version with suffix '1.0_patch2' < '1.0_patch3'")
+        self.assertTrue(result,msg="Failed to compare version with suffix '1.0_patch2' < '1.0_patch3'")
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py
index 815ee48c05..67cae977d9 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -785,7 +785,7 @@ FIT_HASH_ALG = "sha256"
 
         test_passed = False
 
-        print ("checking kernel node\n")
+        print("checking kernel node\n")
 
         if node_str in its_lines:
             node_start_idx = its_lines.index(node_str)
@@ -803,7 +803,7 @@ FIT_HASH_ALG = "sha256"
             line_idx = cfg_start_idx + 2
             node_end = False
             while node_end == False:
-                if its_lines[line_idx] == "};" and its_lines[line_idx-1] == "};" :
+                if its_lines[line_idx] == "};" and its_lines[line_idx-1] == "};":
                     node_end = True
                 line_idx = line_idx + 1
 
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 2de22d3404..53c549ac95 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -128,7 +128,7 @@ class ImageFeatures(OESelftestTestCase):
         Author:      Tom Rini <trini@konsulko.com>
         """
 
-        img_types = [ 'vmdk', 'vdi', 'qcow2' ]
+        img_types = ['vmdk', 'vdi', 'qcow2']
         features = ""
         for itype in img_types:
             features += 'IMAGE_FSTYPES += "wic.%s"\n' % itype
diff --git a/meta/lib/oeqa/selftest/cases/kerneldevelopment.py b/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
index a61876ee61..697f6a94a5 100644
--- a/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
+++ b/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
@@ -12,8 +12,7 @@ class KernelDev(OESelftestTestCase):
         cls.layername = 'meta-kerneltest'
         runCmd('bitbake-layers create-layer %s' % cls.layername)
         runCmd('mkdir -p %s/recipes-kernel/linux/linux-yocto' % cls.layername)
-        cls.recipes_linuxyocto_dir = os.path.join \
-            (cls.builddir, cls.layername, 'recipes-kernel', 'linux', 'linux-yocto')
+        cls.recipes_linuxyocto_dir = os.path.join(cls.builddir, cls.layername, 'recipes-kernel', 'linux', 'linux-yocto')
         cls.recipeskernel_dir = os.path.dirname(cls.recipes_linuxyocto_dir)
         runCmd('bitbake-layers add-layer %s' % cls.layername)
 
diff --git a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
index 8b0fb8a8f6..e0bfd44f4e 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
@@ -49,7 +49,7 @@ class TestBlobParsing(OESelftestTestCase):
         Test conversion of git blobs to dictionary
         """
         from oe.buildhistory_analysis import blob_to_dict
-        valuesmap = { "foo" : "1", "bar" : "2" }
+        valuesmap = {"foo": "1", "bar": "2"}
         self.commit_vars(to_add=valuesmap)
 
         blob = self.repo.head.commit.tree.blobs[0]
@@ -62,18 +62,18 @@ class TestBlobParsing(OESelftestTestCase):
         """
         from oe.buildhistory_analysis import compare_dict_blobs
 
-        changesmap = { "foo-2" : ("2", "8"), "bar" : ("","4"), "bar-2" : ("","5")}
+        changesmap = {"foo-2": ("2", "8"), "bar": ("","4"), "bar-2": ("","5")}
 
-        self.commit_vars(to_add={ "foo" : "1", "foo-2" : "2", "foo-3" : "3" })
+        self.commit_vars(to_add={"foo": "1", "foo-2": "2", "foo-3": "3"})
         blob1 = self.repo.heads.master.commit.tree.blobs[0]
 
-        self.commit_vars(to_add={ "foo-2" : "8", "bar" : "4", "bar-2" : "5" })
+        self.commit_vars(to_add={"foo-2": "8", "bar": "4", "bar-2": "5"})
         blob2 = self.repo.heads.master.commit.tree.blobs[0]
 
         change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file),
             blob1, blob2, False, False)
 
-        var_changes = { x.fieldname : (x.oldvalue, x.newvalue) for x in change_records}
+        var_changes = {x.fieldname: (x.oldvalue, x.newvalue) for x in change_records}
         self.assertEqual(changesmap, var_changes, "Changes not reported correctly")
 
     def test_compare_dict_blobs_default(self):
@@ -81,12 +81,12 @@ class TestBlobParsing(OESelftestTestCase):
         Test default values for comparisson of git blob dictionaries
         """
         from oe.buildhistory_analysis import compare_dict_blobs
-        defaultmap = { x : ("default", "1")  for x in ["PKG", "PKGE", "PKGV", "PKGR"]}
+        defaultmap = {x: ("default", "1")  for x in ["PKG", "PKGE", "PKGV", "PKGR"]}
 
-        self.commit_vars(to_add={ "foo" : "1" })
+        self.commit_vars(to_add={"foo": "1"})
         blob1 = self.repo.heads.master.commit.tree.blobs[0]
 
-        self.commit_vars(to_add={ "PKG" : "1", "PKGE" : "1", "PKGV" : "1", "PKGR" : "1" })
+        self.commit_vars(to_add={"PKG": "1", "PKGE": "1", "PKGV": "1", "PKGR": "1"})
         blob2 = self.repo.heads.master.commit.tree.blobs[0]
 
         change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file),
diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py b/meta/lib/oeqa/selftest/cases/oelib/path.py
index 39e683ab5a..e5d36513fb 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/path.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
@@ -11,36 +11,36 @@ import errno
 import shutil
 
 class TestRealPath(TestCase):
-    DIRS = [ "a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX", "usr/sbin", "usr/include", "usr/include/gdbm" ]
-    FILES = [ "etc/passwd", "b/file" ]
+    DIRS = ["a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX", "usr/sbin", "usr/include", "usr/include/gdbm"]
+    FILES = ["etc/passwd", "b/file"]
     LINKS = [
-        ( "bin",             "/usr/bin",             "/usr/bin" ),
-        ( "binX",            "usr/binX",             "/usr/binX" ),
-        ( "c",               "broken",               "/broken" ),
-        ( "etc/passwd-1",    "passwd",               "/etc/passwd" ),
-        ( "etc/passwd-2",    "passwd-1",             "/etc/passwd" ),
-        ( "etc/passwd-3",    "/etc/passwd-1",        "/etc/passwd" ),
-        ( "etc/shadow-1",    "/etc/shadow",          "/etc/shadow" ),
-        ( "etc/shadow-2",    "/etc/shadow-1",        "/etc/shadow" ),
-        ( "prog-A",          "bin/prog-A",           "/usr/bin/prog-A" ),
-        ( "prog-B",          "/bin/prog-B",          "/usr/bin/prog-B" ),
-        ( "usr/bin/prog-C",  "../../sbin/prog-C",    "/sbin/prog-C" ),
-        ( "usr/bin/prog-D",  "/sbin/prog-D",         "/sbin/prog-D" ),
-        ( "usr/binX/prog-E", "../sbin/prog-E",       None ),
-        ( "usr/bin/prog-F",  "../../../sbin/prog-F", "/sbin/prog-F" ),
-        ( "loop",            "a/loop",               None ),
-        ( "a/loop",          "../loop",              None ),
-        ( "b/test",          "file/foo",             "/b/file/foo" ),
+        ("bin",             "/usr/bin",             "/usr/bin"),
+        ("binX",            "usr/binX",             "/usr/binX"),
+        ("c",               "broken",               "/broken"),
+        ("etc/passwd-1",    "passwd",               "/etc/passwd"),
+        ("etc/passwd-2",    "passwd-1",             "/etc/passwd"),
+        ("etc/passwd-3",    "/etc/passwd-1",        "/etc/passwd"),
+        ("etc/shadow-1",    "/etc/shadow",          "/etc/shadow"),
+        ("etc/shadow-2",    "/etc/shadow-1",        "/etc/shadow"),
+        ("prog-A",          "bin/prog-A",           "/usr/bin/prog-A"),
+        ("prog-B",          "/bin/prog-B",          "/usr/bin/prog-B"),
+        ("usr/bin/prog-C",  "../../sbin/prog-C",    "/sbin/prog-C"),
+        ("usr/bin/prog-D",  "/sbin/prog-D",         "/sbin/prog-D"),
+        ("usr/binX/prog-E", "../sbin/prog-E",       None),
+        ("usr/bin/prog-F",  "../../../sbin/prog-F", "/sbin/prog-F"),
+        ("loop",            "a/loop",               None),
+        ("a/loop",          "../loop",              None),
+        ("b/test",          "file/foo",             "/b/file/foo"),
     ]
 
     LINKS_PHYS = [
-        ( "./",          "/",                "" ),
-        ( "binX/prog-E", "/usr/sbin/prog-E", "/sbin/prog-E" ),
+        ("./",          "/",                ""),
+        ("binX/prog-E", "/usr/sbin/prog-E", "/sbin/prog-E"),
     ]
 
     EXCEPTIONS = [
-        ( "loop",   errno.ELOOP ),
-        ( "b/test", errno.ENOENT ),
+        ("loop",   errno.ELOOP),
+        ("b/test", errno.ENOENT),
     ]
 
     def setUp(self):
diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py
index 82aa1bde1c..eb39136b43 100644
--- a/meta/lib/oeqa/selftest/cases/package.py
+++ b/meta/lib/oeqa/selftest/cases/package.py
@@ -43,33 +43,33 @@ class VersionOrdering(OESelftestTestCase):
 
     def test_dpkg(self):
         for ver1, ver2, sort in self.tests:
-            op = { -1: "<<", 0: "=", 1: ">>" }[sort]
+            op = {-1: "<<", 0: "=", 1: ">>"}[sort]
             status = subprocess.call((oe.path.join(self.bindir, "dpkg"), "--compare-versions", ver1, op, ver2))
             self.assertEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
 
             # Now do it again but with incorrect operations
-            op = { -1: ">>", 0: ">>", 1: "<<" }[sort]
+            op = {-1: ">>", 0: ">>", 1: "<<"}[sort]
             status = subprocess.call((oe.path.join(self.bindir, "dpkg"), "--compare-versions", ver1, op, ver2))
             self.assertNotEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
 
             # Now do it again but with incorrect operations
-            op = { -1: "=", 0: "<<", 1: "=" }[sort]
+            op = {-1: "=", 0: "<<", 1: "="}[sort]
             status = subprocess.call((oe.path.join(self.bindir, "dpkg"), "--compare-versions", ver1, op, ver2))
             self.assertNotEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
 
     def test_opkg(self):
         for ver1, ver2, sort in self.tests:
-            op = { -1: "<<", 0: "=", 1: ">>" }[sort]
+            op = {-1: "<<", 0: "=", 1: ">>"}[sort]
             status = subprocess.call((oe.path.join(self.bindir, "opkg"), "compare-versions", ver1, op, ver2))
             self.assertEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
 
             # Now do it again but with incorrect operations
-            op = { -1: ">>", 0: ">>", 1: "<<" }[sort]
+            op = {-1: ">>", 0: ">>", 1: "<<"}[sort]
             status = subprocess.call((oe.path.join(self.bindir, "opkg"), "compare-versions", ver1, op, ver2))
             self.assertNotEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
 
             # Now do it again but with incorrect operations
-            op = { -1: "=", 0: "<<", 1: "=" }[sort]
+            op = {-1: "=", 0: "<<", 1: "="}[sort]
             status = subprocess.call((oe.path.join(self.bindir, "opkg"), "compare-versions", ver1, op, ver2))
             self.assertNotEqual(status, 0, "%s %s %s failed" % (ver1, op, ver2))
 
@@ -163,13 +163,13 @@ class PackageTests(OESelftestTestCase):
             self.logger.info("Check ownership of %s", path)
             status, output = qemu.run_serial(r'/bin/stat -c "%U %G" ' + path, timeout=60)
             output = output.split(" ")
-            if output[0] != uid or output[1] != gid :
+            if output[0] != uid or output[1] != gid:
                 self.logger.error("Incrrect ownership %s [%s:%s]", path, output[0], output[1])
                 return False
             return True
 
         with runqemu('core-image-minimal') as qemu:
-            for path in [ sysconfdir + "/selftest-chown/file",
+            for path in [sysconfdir + "/selftest-chown/file",
                           sysconfdir + "/selftest-chown/dir",
                           sysconfdir + "/selftest-chown/symlink",
                           sysconfdir + "/selftest-chown/fifotest/fifo"]:
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 9b62e5164e..3159eb3a3c 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -75,9 +75,9 @@ class SStateTests(SStateBase):
             file_tracker = results
 
         if should_pass:
-            self.assertTrue(file_tracker , msg="Could not find sstate files for: %s" % ', '.join(map(str, targets)))
+            self.assertTrue(file_tracker, msg="Could not find sstate files for: %s" % ', '.join(map(str, targets)))
         else:
-            self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s (found %s)" % (', '.join(map(str, targets)), str(file_tracker)))
+            self.assertTrue(not file_tracker, msg="Found sstate files in the wrong place for: %s (found %s)" % (', '.join(map(str, targets)), str(file_tracker)))
 
     def test_sstate_creation_distro_specific_pass(self):
         self.run_test_sstate_creation(['binutils-cross-'+ self.tune_arch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index ad1c1fbe67..9be2d2c39c 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -634,8 +634,7 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc
                 # check each partition for permission
                 for part in glob(os.path.join(tmpdir, 'temp-*.direct.p*')):
                     res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % (part))
-                    self.assertTrue(files_own_by_root(res.output)
-                        ,msg='Files permission incorrect using wks set "%s"' % test)
+                    self.assertTrue(files_own_by_root(res.output),msg='Files permission incorrect using wks set "%s"' % test)
 
                 # clean config and result directory for next cases
                 self.remove_config(config)
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 751d1303cf..047f5d16c7 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -223,7 +223,7 @@ class SimpleRemoteTarget(BaseTarget):
         self.server_ip = d.getVar("TEST_SERVER_IP")
         if not self.server_ip:
             try:
-                self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1]
+                self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip]).split("\n")[0].split()[-1]
             except Exception as e:
                 bb.fatal("Failed to determine the host IP address (alternatively you can set TEST_SERVER_IP with the IP address of this machine): %s" % e)
         self.logger.info("Server IP: %s" % self.server_ip)
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 024261410e..3f297967ab 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -223,7 +223,7 @@ def bitbake(command, ignore_status=False, timeout=None, postconfig=None, output_
     if isinstance(command, str):
         cmd = "bitbake " + extra_args + " " + command
     else:
-        cmd = [ "bitbake" ] + [a for a in (command + extra_args.split(" ")) if a not in [""]]
+        cmd = ["bitbake"] + [a for a in (command + extra_args.split(" ")) if a not in [""]]
 
     try:
         return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options)
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index 60e16d500e..6da2f6945a 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -29,7 +29,7 @@ class PtestParser(object):
         markers = ("PASS:", "FAIL:", "SKIP:", "BEGIN:", "END:", "DURATION:", "ERROR: Exit", "TIMEOUT:")
 
         def newsection():
-            return { 'name': "No-section", 'log': [] }
+            return {'name': "No-section", 'log': []}
 
         current_section = newsection()
 
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index 403bad7b1f..a1f71a8d38 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -109,11 +109,11 @@ class SSHControl(object):
                 '-o', 'StrictHostKeyChecking=no',
                 '-o', 'LogLevel=ERROR'
                 ]
-        self.ssh = ['ssh', '-l', self.user ] + self.ssh_options
+        self.ssh = ['ssh', '-l', self.user] + self.ssh_options
         self.scp = ['scp'] + self.ssh_options
         if port:
-            self.ssh = self.ssh + [ '-p', port ]
-            self.scp = self.scp + [ '-P', port ]
+            self.ssh = self.ssh + ['-p', port]
+            self.scp = self.scp + ['-P', port]
 
     def log(self, msg):
         if self.logfile:
diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py
index e90462d127..8fc6748e23 100644
--- a/meta/lib/oeqa/utils/testexport.py
+++ b/meta/lib/oeqa/utils/testexport.py
@@ -245,7 +245,7 @@ def send_bin_to_DUT(d,params):
                 break
         else:
             bb.warn("No rpm package found for %s %s in .rpm files dir %s. Skipping deployment." %
-                    (param_list[0], "ver. " + param_list[1] if param_list[1] else "", rpms_file_dir) )
+                    (param_list[0], "ver. " + param_list[1] if param_list[1] else "", rpms_file_dir))
             return
         (status, output) = oeRuntimeTest.tc.target.copy_to(os.path.join(arch_rpms_dir, rpm_to_send), remote_path)
         if status != 0:
diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py
index 045240ea0b..3dee1f71b7 100644
--- a/meta/recipes-devtools/python/python3/create_manifest3.py
+++ b/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -327,7 +327,7 @@ for pypkg in old_manifest:
                     check_path = pymodule_dep
                 else:
                     check_path = os.path.dirname(pymodule_dep)
-                if folder in check_path :
+                if folder in check_path:
                     inFolders = True # Did we find a folder?
                     folderFound = False # Second flag to break inner for
                     # Loop only through packages which contain folders
@@ -336,7 +336,7 @@ for pypkg in old_manifest:
                             # print('Checking folder %s on package %s' % (pymodule_dep,pypkg_with_folder))
                             for folder_dep in old_manifest[pypkg_with_folder]['files'] or folder_dep in old_manifest[pypkg_with_folder]['cached']:
                                 if folder_dep == folder:
-                                    print ('%s directory found in %s' % (folder, pypkg_with_folder))
+                                    print('%s directory found in %s' % (folder, pypkg_with_folder))
                                     folderFound = True
                                     if pypkg_with_folder not in new_manifest[pypkg]['rdepends'] and pypkg_with_folder != pypkg:
                                         new_manifest[pypkg]['rdepends'].append(pypkg_with_folder)
diff --git a/meta/recipes-devtools/python/python3/get_module_deps3.py b/meta/recipes-devtools/python/python3/get_module_deps3.py
index 1f4c982aed..53acc8cd71 100644
--- a/meta/recipes-devtools/python/python3/get_module_deps3.py
+++ b/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -118,7 +118,7 @@ for item in dif:
     if 'sitecustomize' in dep_path:
         dep_path = '${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py'
         # Prints out result, which is what will be used by create_manifest
-        print (dep_path)
+        print(dep_path)
         continue
 
     dep_path = fix_path(dep_path)
@@ -130,7 +130,7 @@ for item in dif:
         if debug == True:
             log.write('Shared library found in %s\n' % dep_path)
         dep_path = dep_path.replace(soabi,'*')
-        print (dep_path)
+        print(dep_path)
         continue
     if "_sysconfigdata" in dep_path:
         dep_path = dep_path.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*")
@@ -138,7 +138,7 @@ for item in dif:
     if debug == True:
         log.write(dep_path+'\n')
     # Prints out result, which is what will be used by create_manifest
-    print (dep_path)
+    print(dep_path)
 
 
     cpython_tag = sys.implementation.cache_tag
@@ -168,7 +168,7 @@ for item in dif:
         cached = cached.replace(cpython_tag,'*')
         if "_sysconfigdata" in cached:
             cached = cached.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*")
-        print (cached)
+        print(cached)
 
 if debug == True:
     log.close()
diff --git a/meta/recipes-kernel/perf/perf/sort-pmuevents.py b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
index 5ddf0f144f..c4d25e7f9f 100755
--- a/meta/recipes-kernel/perf/perf/sort-pmuevents.py
+++ b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
@@ -13,50 +13,50 @@ import re
 from collections import OrderedDict
 
 if len(sys.argv) < 2:
-    print( "[ERROR]: input and output pmu files missing" )
+    print("[ERROR]: input and output pmu files missing")
     sys.exit(1)
 
 if len(sys.argv) < 3:
-    print( "[ERROR]: output pmu file missing" )
+    print("[ERROR]: output pmu file missing")
     sys.exit(1)
 
 infile = sys.argv[1]
 outfile = sys.argv[2]
 
 if not os.path.exists(infile):
-    print( "ERROR. input file does not exist: %s" % infile )
+    print("ERROR. input file does not exist: %s" % infile)
     sys.exit(1)
 
 if os.path.exists(outfile):
-    print( "WARNING. output file will be overwritten: %s" % infile )
+    print("WARNING. output file will be overwritten: %s" % infile)
 
 with open(infile, 'r') as file:
     data = file.read()
 
-preamble_regex = re.compile( '^(.*?)^struct', re.MULTILINE | re.DOTALL )
+preamble_regex = re.compile('^(.*?)^struct', re.MULTILINE | re.DOTALL)
 
-preamble = re.search( preamble_regex, data )
-struct_block_regex = re.compile( '^struct.*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL )
-field_regex =  re.compile( '{.*?},', re.MULTILINE | re.DOTALL )
-cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL )
-name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL )
+preamble = re.search(preamble_regex, data)
+struct_block_regex = re.compile('^struct.*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL)
+field_regex =  re.compile('{.*?},', re.MULTILINE | re.DOTALL)
+cpuid_regex = re.compile('\.cpuid = (.*?),', re.MULTILINE | re.DOTALL)
+name_regex = re.compile('\.name = (.*?),', re.MULTILINE | re.DOTALL)
 
 # create a dictionary structure to store all the structs, their
 # types and then their fields.
 entry_dict = {}
-for struct in re.findall( struct_block_regex, data ):
+for struct in re.findall(struct_block_regex, data):
     # print( "struct: %s %s" % (struct[0],struct[1]) )
     entry_dict[struct[1]] = {}
     entry_dict[struct[1]]['type'] = struct[0]
     entry_dict[struct[1]]['fields'] = {}
-    for entry in re.findall( field_regex, struct[2] ):
+    for entry in re.findall(field_regex, struct[2]):
         #print( "    entry: %s" % entry )
-        cpuid = re.search( cpuid_regex, entry )
+        cpuid = re.search(cpuid_regex, entry)
         if cpuid:
             #print( "    cpuid found: %s" % cpuid.group(1) )
             entry_dict[struct[1]]['fields'][cpuid.group(1)] = entry
             
-        name = re.search( name_regex, entry )
+        name = re.search(name_regex, entry)
         if name:
             #print( "    name found: %s" % name.group(1) )
             entry_dict[struct[1]]['fields'][name.group(1)] = entry
@@ -78,16 +78,16 @@ for i in sorted(entry_dict.keys()):
         entry_dict_sorted[i]['fields'][f] = entry_dict[i]['fields'][f] 
 
 # dump the sorted elements to the outfile
-outf = open( outfile, 'w' )
+outf = open(outfile, 'w')
 
-print( preamble.group(1) )
-outf.write( preamble.group(1) )
+print(preamble.group(1))
+outf.write(preamble.group(1))
 for d in entry_dict_sorted:
-    outf.write( "struct %s %s[] = {\n" % (entry_dict_sorted[d]['type'],d) )
+    outf.write("struct %s %s[] = {\n" % (entry_dict_sorted[d]['type'],d))
     for f in entry_dict_sorted[d]['fields']:
-        outf.write( entry_dict_sorted[d]['fields'][f] + '\n' )
+        outf.write(entry_dict_sorted[d]['fields'][f] + '\n')
 
-    outf.write( "};\n" )
+    outf.write("};\n")
 
 outf.close()
     
diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py
index 7c87a14758..b29a48dca7 100755
--- a/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -130,7 +130,7 @@ def log_test_header(seq_no, nr_of_tests, name):
 #-------------------------------------------------------------------------------
 
 def start_stress(*args):
-        stress_cmd         = [ "stress-ng" ]
+        stress_cmd         = ["stress-ng"]
         added_stress_types = []
         req_stress_types   = set(args)
         cpu_cnt            = str(multiprocessing.cpu_count())
@@ -220,7 +220,7 @@ def set_hung_tmo(new_tmo):
 
         orig_tmo = int(subprocess.check_output(["cat", tmo_file]).strip())
         if new_tmo != orig_tmo:
-                cmd = ( "echo " + str(new_tmo) + " > " + tmo_file )
+                cmd = ("echo " + str(new_tmo) + " > " + tmo_file)
                 subprocess.check_output(cmd, shell=True)
                 log("Changed timeout for detection of hung tasks: ",
                     orig_tmo, " -> ", new_tmo)
diff --git a/scripts/buildstats-diff b/scripts/buildstats-diff
index 2f6498ab67..aed4f49923 100755
--- a/scripts/buildstats-diff
+++ b/scripts/buildstats-diff
@@ -202,7 +202,7 @@ def print_task_diff(bs1, bs2, val_type, min_val=0, min_absdiff=0, sort_by=('absd
     total1 = sum_vals(bs1)
     total2 = sum_vals(bs2)
     print("\nCumulative {}:".format(val_type))
-    print ("  {}    {:+.1f}%    {} ({}) -> {} ({})".format(
+    print("  {}    {:+.1f}%    {} ({}) -> {} ({})".format(
                 val_to_str(total2 - total1), 100 * (total2-total1) / total1,
                 val_to_str(total1, True), val_to_str(total1),
                 val_to_str(total2, True), val_to_str(total2)))
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 5aea6971c7..e42f428cc3 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -564,7 +564,7 @@ def get_repos(conf, repo_names):
             sys.exit(1)
 
     if not repos:
-        repos = [ repo for repo in conf.repos if conf.repos[repo].get("update", True) ]
+        repos = [repo for repo in conf.repos if conf.repos[repo].get("update", True)]
 
     return repos
 
diff --git a/scripts/lib/checklayer/cases/bsp.py b/scripts/lib/checklayer/cases/bsp.py
index f019d88f17..bd80f1132a 100644
--- a/scripts/lib/checklayer/cases/bsp.py
+++ b/scripts/lib/checklayer/cases/bsp.py
@@ -125,7 +125,7 @@ class BSPCheckLayer(OECheckLayerTestCase):
                 if color.setdefault(task, WHITE) == WHITE:
                     visit(task)
 
-        taskname_order = dict([(task, index) for index, task in enumerate(taskname_list) ])
+        taskname_order = dict([(task, index) for index, task in enumerate(taskname_list)])
         def task_key(task):
             pn, taskname = task.rsplit(':', 1)
             return (pn, taskname_order.get(taskname, len(taskname_list)), taskname)
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index c6d98299da..0c85d8c13f 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -605,7 +605,7 @@ def check_upgrade_status(args, config, basepath, workspace):
     for result in results:
         # pn, update_status, current, latest, maintainer, latest_commit, no_update_reason
         if args.all or result[1] != 'MATCH':
-            logger.info("{:25} {:15} {:15} {} {} {}".format(   result[0],
+            logger.info("{:25} {:15} {:15} {} {} {}".format(result[0],
                                                                result[2],
                                                                result[1] if result[1] != 'UPDATE' else (result[3] if not result[3].endswith("new-commits-available") else "new commits"),
                                                                result[4],
diff --git a/scripts/lib/resulttool/manualexecution.py b/scripts/lib/resulttool/manualexecution.py
index ecb27c5933..c5283c514e 100755
--- a/scripts/lib/resulttool/manualexecution.py
+++ b/scripts/lib/resulttool/manualexecution.py
@@ -130,7 +130,7 @@ class ManualTestRunner(object):
         if testcase_config_file:
             test_case_config = load_json_file(testcase_config_file)
             test_case_to_execute = test_case_config['testcases']
-            for case in copy.deepcopy(cases) :
+            for case in copy.deepcopy(cases):
                 if case['test']['@alias'] not in test_case_to_execute:
                     cases.remove(case)
 
@@ -232,4 +232,4 @@ def register_commands(subparsers):
     parser_build.add_argument('-t', '--testcase-config-file', default='',
                               help='the testcase configuration file to enable user to run a selected set of test case or make a testcase configuration file')
     parser_build.add_argument('-d', '--make-testcase-config-file', action='store_true',
-                    help='make the testcase configuration file to run a set of test cases based on user selection')
\ No newline at end of file
+                    help='make the testcase configuration file to run a set of test cases based on user selection')
diff --git a/scripts/lib/resulttool/report.py b/scripts/lib/resulttool/report.py
index f0ca50ebe2..7aa2b5aefe 100644
--- a/scripts/lib/resulttool/report.py
+++ b/scripts/lib/resulttool/report.py
@@ -33,7 +33,7 @@ class ResultsTextReport(object):
             for suite in result['ptestresult.sections']:
                 if suite not in self.ptests[machine]:
                     self.ptests[machine][suite] = {
-                            'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-',
+                            'passed': 0, 'failed': 0, 'skipped': 0, 'duration': '-',
                             'failed_testcases': [], "testcases": set(),
                             }
                 if 'duration' in result['ptestresult.sections'][suite]:
@@ -59,7 +59,7 @@ class ResultsTextReport(object):
 
         if suite not in self.ptests[machine]:
             self.ptests[machine][suite] = {
-                    'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-',
+                    'passed': 0, 'failed': 0, 'skipped': 0, 'duration': '-',
                     'failed_testcases': [], "testcases": set(),
                     }
 
@@ -82,7 +82,7 @@ class ResultsTextReport(object):
             # Ensure tests without any test results still show up on the report
             for suite in result['ltpresult.sections']:
                 if suite not in self.ltptests[machine]:
-                    self.ltptests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []}
+                    self.ltptests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration': '-', 'failed_testcases': []}
                 if 'duration' in result['ltpresult.sections'][suite]:
                     self.ltptests[machine][suite]['duration'] = result['ltpresult.sections'][suite]['duration']
                 if 'timeout' in result['ltpresult.sections'][suite]:
@@ -101,7 +101,7 @@ class ResultsTextReport(object):
             except ValueError:
                 pass
         if suite not in self.ltptests[machine]:
-            self.ltptests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []}
+            self.ltptests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration': '-', 'failed_testcases': []}
         for tk in self.result_types:
             if status in self.result_types[tk]:
                 self.ltptests[machine][suite][tk] += 1
@@ -114,7 +114,7 @@ class ResultsTextReport(object):
             # Ensure tests without any test results still show up on the report
             for suite in result['ltpposixresult.sections']:
                 if suite not in self.ltpposixtests[machine]:
-                    self.ltpposixtests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []}
+                    self.ltpposixtests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration': '-', 'failed_testcases': []}
                 if 'duration' in result['ltpposixresult.sections'][suite]:
                     self.ltpposixtests[machine][suite]['duration'] = result['ltpposixresult.sections'][suite]['duration']
             return
@@ -131,7 +131,7 @@ class ResultsTextReport(object):
             except ValueError:
                 pass
         if suite not in self.ltpposixtests[machine]:
-            self.ltpposixtests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []}
+            self.ltpposixtests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration': '-', 'failed_testcases': []}
         for tk in self.result_types:
             if status in self.result_types[tk]:
                 self.ltpposixtests[machine][suite][tk] += 1
@@ -167,7 +167,7 @@ class ResultsTextReport(object):
         reportvalues = []
         machines = []
         cols = ['passed', 'failed', 'skipped']
-        maxlen = {'passed' : 0, 'failed' : 0, 'skipped' : 0, 'result_id': 0, 'testseries' : 0, 'ptest' : 0 ,'ltptest': 0, 'ltpposixtest': 0}
+        maxlen = {'passed': 0, 'failed': 0, 'skipped': 0, 'result_id': 0, 'testseries': 0, 'ptest': 0,'ltptest': 0, 'ltpposixtest': 0}
         for line in test_count_reports:
             total_tested = line['passed'] + line['failed'] + line['skipped']
             vals = {}
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index b3a51c7553..50c9c95cd6 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -80,7 +80,7 @@ def load_plugins(logger, plugins, pluginpath):
 
     def load_plugin(name):
         logger.debug('Loading plugin %s' % name)
-        spec = importlib.machinery.PathFinder.find_spec(name, path=[pluginpath] )
+        spec = importlib.machinery.PathFinder.find_spec(name, path=[pluginpath])
         if spec:
             return spec.loader.load_module()
 
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index bee6b391e7..46e4d0f028 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -363,7 +363,7 @@ class Disk:
         cmd = "{} {} -wR 'rm \"{}\"'".format(self.debugfs,
                                             self._get_part_image(pnum),
                                             abs_path)
-        out = exec_cmd(cmd , as_shell=True)
+        out = exec_cmd(cmd, as_shell=True)
         for line in out.splitlines():
             if line.startswith("rm:"):
                 if "file is a directory" in line:
@@ -379,8 +379,7 @@ class Disk:
 
                     rmdir_out = exec_cmd("{} {} -wR 'rmdir \"{}\"'".format(self.debugfs,
                                                     self._get_part_image(pnum),
-                                                    abs_path.rstrip('/'))
-                                                    , as_shell=True)
+                                                    abs_path.rstrip('/')), as_shell=True)
 
                     for rmdir_line in rmdir_out.splitlines():
                         if "directory not empty" in rmdir_line:
diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index 65987d4c94..b7de950c7c 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -401,7 +401,7 @@ class FilemapFiemap(_FilemapBase):
 
         offset = _FIEMAP_SIZE + _FIEMAP_EXTENT_SIZE * index
         return struct.unpack(_FIEMAP_EXTENT_FORMAT,
-                             self._buf[offset : offset + _FIEMAP_EXTENT_SIZE])
+                             self._buf[offset: offset + _FIEMAP_EXTENT_SIZE])
 
     def _do_get_mapped_ranges(self, start, count):
         """
diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py
index 767b34dd24..bb362b64a8 100644
--- a/scripts/lib/wic/misc.py
+++ b/scripts/lib/wic/misc.py
@@ -30,9 +30,9 @@ NATIVE_RECIPES = {"bmaptool": "bmap-tools",
                   "grub-mkimage": "grub-efi",
                   "isohybrid": "syslinux",
                   "mcopy": "mtools",
-                  "mdel" : "mtools",
-                  "mdeltree" : "mtools",
-                  "mdir" : "mtools",
+                  "mdel": "mtools",
+                  "mdeltree": "mtools",
+                  "mdir": "mtools",
                   "mkdosfs": "dosfstools",
                   "mkisofs": "cdrtools",
                   "mkfs.btrfs": "btrfs-tools",
diff --git a/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py b/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
index 5bd7390680..8c6c645c39 100644
--- a/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
@@ -124,7 +124,7 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin):
         disk image.
         """
 
-        if ( (not cls.__imgEFIObj) or (not cls.__imgBiosObj) ):
+        if ((not cls.__imgEFIObj) or (not cls.__imgBiosObj)):
             cls.__instanciateSubClasses()
 
         cls.__imgEFIObj.do_install_disk(
@@ -155,7 +155,7 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin):
         Called before do_prepare_partition()
         """
 
-        if ( (not cls.__imgEFIObj) or (not cls.__imgBiosObj) ):
+        if ((not cls.__imgEFIObj) or (not cls.__imgBiosObj)):
             cls.__instanciateSubClasses()
 
         cls.__imgEFIObj.do_configure_partition(
@@ -187,7 +187,7 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin):
         'prepares' the partition to be incorporated into the image.
         """
 
-        if ( (not cls.__imgEFIObj) or (not cls.__imgBiosObj) ):
+        if ((not cls.__imgEFIObj) or (not cls.__imgBiosObj)):
             cls.__instanciateSubClasses()
 
         cls.__imgEFIObj.do_prepare_partition(
diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
index ade13e244b..3715282262 100755
--- a/scripts/oe-pkgdata-browser
+++ b/scripts/oe-pkgdata-browser
@@ -28,10 +28,10 @@ import time
 def timeit(f):
     def timed(*args, **kw):
         ts = time.time()
-        print ("func:%r calling" % f.__name__)
+        print("func:%r calling" % f.__name__)
         result = f(*args, **kw)
         te = time.time()
-        print ('func:%r args:[%r, %r] took: %2.4f sec' %
+        print('func:%r args:[%r, %r] took: %2.4f sec' %
           (f.__name__, args, kw, te-ts))
         return result
     return timed
diff --git a/scripts/oe-trim-schemas b/scripts/oe-trim-schemas
index bf77c8cf64..596da2d849 100755
--- a/scripts/oe-trim-schemas
+++ b/scripts/oe-trim-schemas
@@ -9,13 +9,13 @@ try:
 except:
     import xml.etree.ElementTree as etree
 
-def child (elem, name):
+def child(elem, name):
     for e in elem.getchildren():
         if e.tag == name:
             return e
     return None
 
-def children (elem, name=None):
+def children(elem, name=None):
     l = elem.getchildren()
     if name:
         l = [e for e in l if e.tag == name]
diff --git a/scripts/oepydevshell-internal.py b/scripts/oepydevshell-internal.py
index 96c078ef3d..51e425eff8 100755
--- a/scripts/oepydevshell-internal.py
+++ b/scripts/oepydevshell-internal.py
@@ -63,7 +63,7 @@ try:
             writers = []
             if i:
                 writers.append(sys.stdout)
-            (ready, _, _) = select.select([pty, sys.stdin], writers , [], 0)
+            (ready, _, _) = select.select([pty, sys.stdin], writers, [], 0)
             try:
                 if pty in ready:
                     readdata = pty.read()
diff --git a/scripts/pybootchartgui/pybootchartgui/batch.py b/scripts/pybootchartgui/pybootchartgui/batch.py
index 1fc2b9b882..1b9df3c1cd 100644
--- a/scripts/pybootchartgui/pybootchartgui/batch.py
+++ b/scripts/pybootchartgui/pybootchartgui/batch.py
@@ -31,16 +31,16 @@ def render(writer, trace, app_options, filename):
         fmt = app_options.format
 
     if not (fmt in handlers):
-        writer.error ("Unknown format '%s'." % fmt)
+        writer.error("Unknown format '%s'." % fmt)
         return 10
 
     make_surface, write_surface = handlers[fmt]
-    options = RenderOptions (app_options)
-    (w, h) = draw.extents (options, 1.0, trace)
-    w = max (w, draw.MIN_IMG_W)
-    surface = make_surface (w, h)
-    ctx = cairo.Context (surface)
-    draw.render (ctx, options, 1.0, trace)
-    write_surface (surface)
-    writer.status ("bootchart written to '%s'" % filename)
+    options = RenderOptions(app_options)
+    (w, h) = draw.extents(options, 1.0, trace)
+    w = max(w, draw.MIN_IMG_W)
+    surface = make_surface(w, h)
+    ctx = cairo.Context(surface)
+    draw.render(ctx, options, 1.0, trace)
+    write_surface(surface)
+    writer.status("bootchart written to '%s'" % filename)
 
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 802ca7d5a9..e6198e1c79 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -31,7 +31,7 @@ class RenderOptions:
         self.kernel_only = False
         self.app_options = app_options
 
-    def proc_tree (self, trace):
+    def proc_tree(self, trace):
         if self.kernel_only:
             return trace.kernel_tree
         else:
@@ -202,10 +202,10 @@ def draw_sec_labels(ctx, options, rect, sec_w, nsecs):
     ctx.set_font_size(AXIS_FONT_SIZE)
     prev_x = 0
     for i in range(0, rect[2] + 1, sec_w):
-        if ((i / sec_w) % nsecs == 0) :
-            if options.app_options.as_minutes :
+        if ((i / sec_w) % nsecs == 0):
+            if options.app_options.as_minutes:
                 label = "%.1f" % (i / sec_w / 60.0)
-            else :
+            else:
                 label = "%d" % (i / sec_w)
             label_w = ctx.text_extents(label)[2]
             x = rect[0] + i - label_w/2
@@ -219,15 +219,15 @@ def draw_box_ticks(ctx, rect, sec_w):
     ctx.set_line_cap(cairo.LINE_CAP_SQUARE)
 
     for i in range(sec_w, rect[2] + 1, sec_w):
-        if ((i / sec_w) % 10 == 0) :
+        if ((i / sec_w) % 10 == 0):
             ctx.set_line_width(1.5)
-        elif sec_w < 5 :
+        elif sec_w < 5:
             continue
-        else :
+        else:
             ctx.set_line_width(1.0)
-        if ((i / sec_w) % 30 == 0) :
+        if ((i / sec_w) % 30 == 0):
             ctx.set_source_rgba(*TICK_COLOR_BOLD)
-        else :
+        else:
             ctx.set_source_rgba(*TICK_COLOR)
         ctx.move_to(rect[0] + i, rect[1] + 1)
         ctx.line_to(rect[0] + i, rect[1] + rect[3] - 1)
@@ -262,12 +262,12 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
         y = (point[1] - y_base) * -yscale + y_trans + chart_bounds[3]
         return x, y
 
-    max_x = max (x for (x, y) in data)
-    max_y = max (y for (x, y) in data)
+    max_x = max(x for (x, y) in data)
+    max_y = max(y for (x, y) in data)
     # avoid divide by zero
     if max_y == 0:
         max_y = 1.0
-    xscale = float (chart_bounds[2]) / (max_x - x_shift)
+    xscale = float(chart_bounds[2]) / (max_x - x_shift)
     # If data_range is given, scale the chart so that the value range in
     # data_range matches the chart bounds exactly.
     # Otherwise, scale so that the actual data matches the chart bounds.
@@ -278,15 +278,15 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
         yscale = float(chart_bounds[3]) / max_y
         ybase = 0
 
-    first = transform_point_coords (data[0], x_shift, ybase, xscale, yscale,
+    first = transform_point_coords(data[0], x_shift, ybase, xscale, yscale,
                         chart_bounds[0], chart_bounds[1])
-    last =  transform_point_coords (data[-1], x_shift, ybase, xscale, yscale,
+    last =  transform_point_coords(data[-1], x_shift, ybase, xscale, yscale,
                         chart_bounds[0], chart_bounds[1])
 
     ctx.set_source_rgba(*color)
     ctx.move_to(*first)
     for point in data:
-        x, y = transform_point_coords (point, x_shift, ybase, xscale, yscale,
+        x, y = transform_point_coords(point, x_shift, ybase, xscale, yscale,
                            chart_bounds[0], chart_bounds[1])
         ctx.line_to(x, y)
     if fill:
@@ -329,7 +329,7 @@ def extents(options, xscale, trace):
         start = trace.min
         end = trace.max
 
-    w = int ((end - start) * sec_w_base * xscale) + 2 * off_x
+    w = int((end - start) * sec_w_base * xscale) + 2 * off_x
     h = proc_h * processes + header_h + 2 * off_y
 
     if options.charts:
@@ -349,10 +349,10 @@ def extents(options, xscale, trace):
     return (w, h)
 
 def clip_visible(clip, rect):
-    xmax = max (clip[0], rect[0])
-    ymax = max (clip[1], rect[1])
-    xmin = min (clip[0] + clip[2], rect[0] + rect[2])
-    ymin = min (clip[1] + clip[3], rect[1] + rect[3])
+    xmax = max(clip[0], rect[0])
+    ymax = max(clip[1], rect[1])
+    xmin = min(clip[0] + clip[2], rect[0] + rect[2])
+    ymin = min(clip[1] + clip[3], rect[1] + rect[3])
     return (xmin > xmax and ymin > ymax)
 
 def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
@@ -367,14 +367,14 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
 
         # render I/O wait
         chart_rect = (off_x, curr_y+30, w, bar_h)
-        if clip_visible (clip, chart_rect):
-            draw_box_ticks (ctx, chart_rect, sec_w)
-            draw_annotations (ctx, proc_tree, trace.times, chart_rect)
-            draw_chart (ctx, IO_COLOR, True, chart_rect,
+        if clip_visible(clip, chart_rect):
+            draw_box_ticks(ctx, chart_rect, sec_w)
+            draw_annotations(ctx, proc_tree, trace.times, chart_rect)
+            draw_chart(ctx, IO_COLOR, True, chart_rect,
                     [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats],
                     proc_tree, None)
             # render CPU load
-            draw_chart (ctx, CPU_COLOR, True, chart_rect,
+            draw_chart(ctx, CPU_COLOR, True, chart_rect,
                     [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats],
                     proc_tree, None)
 
@@ -387,17 +387,17 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
 
         # render I/O utilization
         chart_rect = (off_x, curr_y+30, w, bar_h)
-        if clip_visible (clip, chart_rect):
-            draw_box_ticks (ctx, chart_rect, sec_w)
-            draw_annotations (ctx, proc_tree, trace.times, chart_rect)
-            draw_chart (ctx, IO_COLOR, True, chart_rect,
+        if clip_visible(clip, chart_rect):
+            draw_box_ticks(ctx, chart_rect, sec_w)
+            draw_annotations(ctx, proc_tree, trace.times, chart_rect)
+            draw_chart(ctx, IO_COLOR, True, chart_rect,
                     [(sample.time, sample.util) for sample in trace.disk_stats],
                     proc_tree, None)
 
         # render disk throughput
-        max_sample = max (trace.disk_stats, key=lambda s: s.tput)
-        if clip_visible (clip, chart_rect):
-            draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect,
+        max_sample = max(trace.disk_stats, key=lambda s: s.tput)
+        if clip_visible(clip, chart_rect):
+            draw_chart(ctx, DISK_TPUT_COLOR, False, chart_rect,
                     [(sample.time, sample.tput) for sample in trace.disk_stats],
                     proc_tree, None)
 
@@ -407,8 +407,8 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
         if (pos_x < off_x + 245):
             shift_x, shift_y = 5, 40
 
-        label = "%dMB/s" % round ((max_sample.tput) / 1024.0)
-        draw_text (ctx, label, DISK_TPUT_COLOR, pos_x + shift_x, curr_y + shift_y)
+        label = "%dMB/s" % round((max_sample.tput) / 1024.0)
+        draw_text(ctx, label, DISK_TPUT_COLOR, pos_x + shift_x, curr_y + shift_y)
 
         curr_y = curr_y + 30 + bar_h
 
@@ -446,11 +446,11 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
 
         # render used amount of disk space
         chart_rect = (off_x, curr_y+30, w, bar_h)
-        if clip_visible (clip, chart_rect):
-            draw_box_ticks (ctx, chart_rect, sec_w)
-            draw_annotations (ctx, proc_tree, trace.times, chart_rect)
+        if clip_visible(clip, chart_rect):
+            draw_box_ticks(ctx, chart_rect, sec_w)
+            draw_annotations(ctx, proc_tree, trace.times, chart_rect)
             for i in range(len(volumes), 0, -1):
-                draw_chart (ctx, VOLUME_COLORS[(i - 1) % len(VOLUME_COLORS)], True, chart_rect,
+                draw_chart(ctx, VOLUME_COLORS[(i - 1) % len(VOLUME_COLORS)], True, chart_rect,
                             [(sample.time,
                               # Sum up used space of all volumes including the current one
                               # so that the graphs appear as stacked on top of each other.
@@ -467,7 +467,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
     # render mem usage
     chart_rect = (off_x, curr_y+30, w, meminfo_bar_h)
     mem_stats = trace.mem_stats
-    if mem_stats and clip_visible (clip, chart_rect):
+    if mem_stats and clip_visible(clip, chart_rect):
         mem_scale = max(sample.buffers for sample in mem_stats)
         draw_legend_box(ctx, "Mem cached (scale: %u MiB)" % (float(mem_scale) / 1024), MEM_CACHED_COLOR, off_x, curr_y+20, leg_s)
         draw_legend_box(ctx, "Used", MEM_USED_COLOR, off_x + 240, curr_y+20, leg_s)
@@ -494,19 +494,19 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
     return curr_y
 
 def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
-    chart_rect = [off_x, curr_y+header_h, w, h - curr_y - 1 * off_y - header_h  ]
+    chart_rect = [off_x, curr_y+header_h, w, h - curr_y - 1 * off_y - header_h]
 
-    draw_legend_box (ctx, "Configure",
-             TASK_COLOR_CONFIGURE, off_x  , curr_y + 45, leg_s)
-    draw_legend_box (ctx, "Compile",
+    draw_legend_box(ctx, "Configure",
+             TASK_COLOR_CONFIGURE, off_x, curr_y + 45, leg_s)
+    draw_legend_box(ctx, "Compile",
              TASK_COLOR_COMPILE, off_x+120, curr_y + 45, leg_s)
-    draw_legend_box (ctx, "Install",
+    draw_legend_box(ctx, "Install",
              TASK_COLOR_INSTALL, off_x+240, curr_y + 45, leg_s)
-    draw_legend_box (ctx, "Populate Sysroot",
+    draw_legend_box(ctx, "Populate Sysroot",
              TASK_COLOR_SYSROOT, off_x+360, curr_y + 45, leg_s)
-    draw_legend_box (ctx, "Package",
+    draw_legend_box(ctx, "Package",
              TASK_COLOR_PACKAGE, off_x+480, curr_y + 45, leg_s)
-    draw_legend_box (ctx, "Package Write",
+    draw_legend_box(ctx, "Package Write",
              TASK_COLOR_PACKAGE_WRITE, off_x+600, curr_y + 45, leg_s)
 
     ctx.set_font_size(PROC_TEXT_FONT_SIZE)
@@ -563,14 +563,14 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
 # Render the chart.
 #
 def render(ctx, options, xscale, trace):
-    (w, h) = extents (options, xscale, trace)
+    (w, h) = extents(options, xscale, trace)
     global OPTIONS
     OPTIONS = options.app_options
 
     # x, y, w, h
     clip = ctx.clip_extents()
 
-    sec_w = int (xscale * sec_w_base)
+    sec_w = int(xscale * sec_w_base)
     ctx.set_line_width(1.0)
     ctx.select_font_face(FONT_NAME)
     draw_fill_rect(ctx, WHITE, (0, 0, max(w, MIN_IMG_W), h))
@@ -578,13 +578,13 @@ def render(ctx, options, xscale, trace):
     curr_y = off_y
 
     if options.charts:
-        curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
+        curr_y = render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w)
 
-    curr_y = render_processes_chart (ctx, options, trace, curr_y, w, h, sec_w)
+    curr_y = render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w)
 
     return
 
-    proc_tree = options.proc_tree (trace)
+    proc_tree = options.proc_tree(trace)
 
     # draw the title and headers
     if proc_tree.idle:
@@ -593,7 +593,7 @@ def render(ctx, options, xscale, trace):
         duration = proc_tree.duration
 
     if not options.kernel_only:
-        curr_y = draw_header (ctx, trace.headers, duration)
+        curr_y = draw_header(ctx, trace.headers, duration)
     else:
         curr_y = off_y
 
@@ -612,39 +612,39 @@ def render(ctx, options, xscale, trace):
     # draw a cumulative CPU-time-per-process graph
     if proc_tree.taskstats and options.cumulative:
         cuml_rect = (off_x, curr_y + off_y, w, CUML_HEIGHT/2 - off_y * 2)
-        if clip_visible (clip, cuml_rect):
+        if clip_visible(clip, cuml_rect):
             draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_CPU)
 
     # draw a cumulative I/O-time-per-process graph
     if proc_tree.taskstats and options.cumulative:
         cuml_rect = (off_x, curr_y + off_y * 100, w, CUML_HEIGHT/2 - off_y * 2)
-        if clip_visible (clip, cuml_rect):
+        if clip_visible(clip, cuml_rect):
             draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_IO)
 
 def draw_process_bar_chart(ctx, clip, options, proc_tree, times, curr_y, w, h, sec_w):
     header_size = 0
     if not options.kernel_only:
-        draw_legend_box (ctx, "Running (%cpu)",
-                 PROC_COLOR_R, off_x    , curr_y + 45, leg_s)
-        draw_legend_box (ctx, "Unint.sleep (I/O)",
+        draw_legend_box(ctx, "Running (%cpu)",
+                 PROC_COLOR_R, off_x, curr_y + 45, leg_s)
+        draw_legend_box(ctx, "Unint.sleep (I/O)",
                  PROC_COLOR_D, off_x+120, curr_y + 45, leg_s)
-        draw_legend_box (ctx, "Sleeping",
+        draw_legend_box(ctx, "Sleeping",
                  PROC_COLOR_S, off_x+240, curr_y + 45, leg_s)
-        draw_legend_box (ctx, "Zombie",
+        draw_legend_box(ctx, "Zombie",
                  PROC_COLOR_Z, off_x+360, curr_y + 45, leg_s)
         header_size = 45
 
     chart_rect = [off_x, curr_y + header_size + 15,
               w, h - 2 * off_y - (curr_y + header_size + 15) + proc_h]
-    ctx.set_font_size (PROC_TEXT_FONT_SIZE)
+    ctx.set_font_size(PROC_TEXT_FONT_SIZE)
 
-    draw_box_ticks (ctx, chart_rect, sec_w)
+    draw_box_ticks(ctx, chart_rect, sec_w)
     if sec_w > 100:
         nsec = 1
     else:
         nsec = 5
-    draw_sec_labels (ctx, options, chart_rect, sec_w, nsec)
-    draw_annotations (ctx, proc_tree, times, chart_rect)
+    draw_sec_labels(ctx, options, chart_rect, sec_w, nsec)
+    draw_annotations(ctx, proc_tree, times, chart_rect)
 
     y = curr_y + 60
     for root in proc_tree.process_tree:
@@ -652,7 +652,7 @@ def draw_process_bar_chart(ctx, clip, options, proc_tree, times, curr_y, w, h, s
         y = y + proc_h * proc_tree.num_nodes([root])
 
 
-def draw_header (ctx, headers, duration):
+def draw_header(ctx, headers, duration):
     toshow = [
       ('system.uname', 'uname', lambda s: s),
       ('system.release', 'release', lambda s: s),
@@ -680,11 +680,11 @@ def draw_header (ctx, headers, duration):
         txt = txt + '      max pid: %s' % (headers.get('system.maxpid'))
 
     header_y += ctx.font_extents()[2]
-    draw_text (ctx, txt, TEXT_COLOR, off_x, header_y)
+    draw_text(ctx, txt, TEXT_COLOR, off_x, header_y)
 
     return header_y
 
-def draw_processes_recursively(ctx, proc, proc_tree, y, proc_h, rect, clip) :
+def draw_processes_recursively(ctx, proc, proc_tree, y, proc_h, rect, clip):
     x = rect[0] +  ((proc.start_time - proc_tree.start_time) * rect[2] / proc_tree.duration)
     w = ((proc.duration) * rect[2] / proc_tree.duration)
 
@@ -724,7 +724,7 @@ def draw_process_activity_colors(ctx, proc, proc_tree, x, y, w, proc_h, rect, cl
     draw_fill_rect(ctx, PROC_COLOR_S, (x, y, w, proc_h))
 
     last_tx = -1
-    for sample in proc.samples :
+    for sample in proc.samples:
         tx = rect[0] + round(((sample.time - proc_tree.start_time) * rect[2] / proc_tree.duration))
 
         # samples are sorted chronologically
@@ -737,14 +737,14 @@ def draw_process_activity_colors(ctx, proc, proc_tree, x, y, w, proc_h, rect, cl
         if last_tx != -1 and abs(last_tx - tx) <= tw:
             tw -= last_tx - tx
             tx = last_tx
-        tw = max (tw, 1) # nice to see at least something
+        tw = max(tw, 1) # nice to see at least something
 
         last_tx = tx + tw
-        state = get_proc_state( sample.state )
+        state = get_proc_state(sample.state)
 
         color = STATE_COLORS[state]
         if state == STATE_RUNNING:
-            alpha = min (sample.cpu_sample.user + sample.cpu_sample.sys, 1.0)
+            alpha = min(sample.cpu_sample.user + sample.cpu_sample.sys, 1.0)
             color = tuple(list(PROC_COLOR_R[0:3]) + [alpha])
 #            print "render time %d [ tx %d tw %d ], sample state %s color %s alpha %g" % (sample.time, tx, tw, state, color, alpha)
         elif state == STATE_SLEEPING:
@@ -777,12 +777,12 @@ class CumlSample:
     def __init__(self, proc):
         self.cmd = proc.cmd
         self.samples = []
-        self.merge_samples (proc)
+        self.merge_samples(proc)
         self.color = None
 
     def merge_samples(self, proc):
-        self.samples.extend (proc.samples)
-        self.samples.sort (key=lambda p: p.time)
+        self.samples.extend(proc.samples)
+        self.samples.sort(key=lambda p: p.time)
 
     def next(self):
         global palette_idx
@@ -797,7 +797,7 @@ class CumlSample:
                 h = (1.0 * i) / HSV_MAX_MOD
             s = 0.5
             v = 1.0
-            c = colorsys.hsv_to_rgb (h, s, v)
+            c = colorsys.hsv_to_rgb(h, s, v)
             self.color = (c[0], c[1], c[2], 1.0)
         return self.color
 
@@ -825,14 +825,14 @@ def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w, stat_type):
 
         # merge pids with the same cmd
         if not proc.cmd in m_proc_list:
-            m_proc_list[proc.cmd] = CumlSample (proc)
+            m_proc_list[proc.cmd] = CumlSample(proc)
             continue
         s = m_proc_list[proc.cmd]
-        s.merge_samples (proc)
+        s.merge_samples(proc)
 
     # all the sample times
     times = sorted(time_hash)
-    if len (times) < 2:
+    if len(times) < 2:
         print("degenerate boot chart")
         return
 
@@ -847,7 +847,7 @@ def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w, stat_type):
         below[time] = chart_bounds[1] + chart_bounds[3]
 
     # same colors each time we render
-    random.seed (0)
+    random.seed(0)
 
     ctx.set_line_width(1)
 
@@ -886,7 +886,7 @@ def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w, stat_type):
 
             # did we move up a pixel increase ?
             if time in row:
-                nc = round (row[time] * pix_per_ns)
+                nc = round(row[time] * pix_per_ns)
                 if nc != cuml:
                     last_cuml = cuml
                     cuml = nc
@@ -898,20 +898,20 @@ def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w, stat_type):
             # draw the trailing rectangle from the last time to
             # before now, at the height of the last segment.
             if render_seg:
-                w = math.ceil ((time - last_time) * chart_bounds[2] / proc_tree.duration) + 1
+                w = math.ceil((time - last_time) * chart_bounds[2] / proc_tree.duration) + 1
                 x = chart_bounds[0] + round((last_time - proc_tree.start_time) * chart_bounds[2] / proc_tree.duration)
-                ctx.rectangle (x, below[last_time] - last_cuml, w, last_cuml)
+                ctx.rectangle(x, below[last_time] - last_cuml, w, last_cuml)
                 ctx.fill()
 #                ctx.stroke()
                 last_time = time
-                y = below [time] - cuml
+                y = below[time] - cuml
 
             row[time] = y
 
         # render the last segment
         x = chart_bounds[0] + round((last_time - proc_tree.start_time) * chart_bounds[2] / proc_tree.duration)
         y = below[last_time] - cuml
-        ctx.rectangle (x, y, chart_bounds[2] - x, cuml)
+        ctx.rectangle(x, y, chart_bounds[2] - x, cuml)
         ctx.fill()
 #        ctx.stroke()
 
@@ -928,7 +928,7 @@ def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w, stat_type):
             if cs in legends:
                 print("ARGH - duplicate process in list !")
 
-        legends.append ((cs, process_total_time))
+        legends.append((cs, process_total_time))
 
         below = row
 
@@ -944,7 +944,7 @@ def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w, stat_type):
     label_width = 300
     LEGENDS_PER_COL = 15
     LEGENDS_TOTAL = 45
-    ctx.set_font_size (TITLE_FONT_SIZE)
+    ctx.set_font_size(TITLE_FONT_SIZE)
     dur_secs = duration / 100
     cpu_secs = total_time / 1000000000
 
@@ -966,7 +966,7 @@ def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w, stat_type):
     for t in legends:
         cs = t[0]
         time = t[1]
-        x = chart_bounds[0] + off_x + int (i/LEGENDS_PER_COL) * label_width
+        x = chart_bounds[0] + off_x + int(i/LEGENDS_PER_COL) * label_width
         y = chart_bounds[1] + font_height * ((i % LEGENDS_PER_COL) + 2)
         str = "%s - %.0f(ms) (%2.2f%%)" % (cs.cmd, time/1000000, (time/total_time) * 100.0)
         draw_legend_box(ctx, str, cs.color, x, y, leg_s)
diff --git a/scripts/pybootchartgui/pybootchartgui/gui.py b/scripts/pybootchartgui/pybootchartgui/gui.py
index e1fe915563..99e5914405 100644
--- a/scripts/pybootchartgui/pybootchartgui/gui.py
+++ b/scripts/pybootchartgui/pybootchartgui/gui.py
@@ -26,9 +26,9 @@ from .draw import RenderOptions
 
 class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
     __gsignals__ = {
-            'clicked' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_STRING, Gdk.Event)),
-            'position-changed' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_INT, gobject.TYPE_INT)),
-            'set-scroll-adjustments' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gtk.Adjustment, gtk.Adjustment))
+            'clicked': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_STRING, Gdk.Event)),
+            'position-changed': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_INT, gobject.TYPE_INT)),
+            'set-scroll-adjustments': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gtk.Adjustment, gtk.Adjustment))
     }
 
     hadjustment = GObject.property(type=Gtk.Adjustment,
@@ -101,12 +101,12 @@ class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
 
     ZOOM_INCREMENT = 1.25
 
-    def zoom_image (self, zoom_ratio):
+    def zoom_image(self, zoom_ratio):
         self.zoom_ratio = zoom_ratio
         self._set_scroll_adjustments()
         self.queue_draw()
 
-    def zoom_to_rect (self, rect):
+    def zoom_to_rect(self, rect):
         zoom_ratio = float(rect.width)/float(self.chart_width)
         self.zoom_image(zoom_ratio)
         self.x = 0
@@ -117,13 +117,13 @@ class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
         self.xscale = xscale
         self.chart_width, self.chart_height = draw.extents(self.options, self.xscale, self.trace)
         new_x = old_mid_x
-        self.zoom_image (self.zoom_ratio)
+        self.zoom_image(self.zoom_ratio)
 
     def on_expand(self, action):
-        self.set_xscale (int(self.xscale * 1.5 + 0.5))
+        self.set_xscale(int(self.xscale * 1.5 + 0.5))
 
     def on_contract(self, action):
-        self.set_xscale (max(int(self.xscale / 1.5), 1))
+        self.set_xscale(max(int(self.xscale / 1.5), 1))
 
     def on_zoom_in(self, action):
         self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT)
@@ -139,7 +139,7 @@ class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
         self.set_xscale(1.0)
 
     def show_toggled(self, button):
-        self.options.app_options.show_all = button.get_property ('active')
+        self.options.app_options.show_all = button.get_property('active')
         self.chart_width, self.chart_height = draw.extents(self.options, self.xscale, self.trace)
         self._set_scroll_adjustments()
         self.queue_draw()
@@ -224,8 +224,8 @@ class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
             adj.set_upper(upper)
 
     def _set_scroll_adjustments(self):
-        self._set_adj_upper (self.hadj, self.zoom_ratio * (self.chart_width - self.our_width))
-        self._set_adj_upper (self.vadj, self.zoom_ratio * (self.chart_height - self.our_height))
+        self._set_adj_upper(self.hadj, self.zoom_ratio * (self.chart_width - self.our_width))
+        self._set_adj_upper(self.vadj, self.zoom_ratio * (self.chart_height - self.our_height))
 
     def on_adjustments_changed(self, adj):
         self.x = self.hadj.get_value() / self.zoom_ratio
@@ -301,9 +301,9 @@ class PyBootchartShell(gtk.VBox):
         if not options.kernel_only:
             # Misc. options
             button = gtk.CheckButton("Show more")
-            button.connect ('toggled', self.widget2.show_toggled)
+            button.connect('toggled', self.widget2.show_toggled)
             button.set_active(options.app_options.show_all)
-            hbox.pack_start (button, False, True, 0)
+            hbox.pack_start(button, False, True, 0)
 
         self.pack_start(hbox, False, True, 0)
         self.pack_start(scrolled, True, True, 0)
@@ -328,15 +328,15 @@ class PyBootchartWindow(gtk.Window):
 
         full_opts = RenderOptions(app_options)
         full_tree = PyBootchartShell(window, trace, full_opts, 1.0)
-        tab_page.append_page (full_tree, gtk.Label("Full tree"))
+        tab_page.append_page(full_tree, gtk.Label("Full tree"))
 
-        if trace.kernel is not None and len (trace.kernel) > 2:
+        if trace.kernel is not None and len(trace.kernel) > 2:
             kernel_opts = RenderOptions(app_options)
             kernel_opts.cumulative = False
             kernel_opts.charts = False
             kernel_opts.kernel_only = True
             kernel_tree = PyBootchartShell(window, trace, kernel_opts, 5.0)
-            tab_page.append_page (kernel_tree, gtk.Label("Kernel boot"))
+            tab_page.append_page(kernel_tree, gtk.Label("Kernel boot"))
 
         full_tree.grab_focus(self)
         self.show()
diff --git a/scripts/pybootchartgui/pybootchartgui/main.py.in b/scripts/pybootchartgui/pybootchartgui/main.py.in
index a954b125da..cd64a716c7 100644
--- a/scripts/pybootchartgui/pybootchartgui/main.py.in
+++ b/scripts/pybootchartgui/pybootchartgui/main.py.in
@@ -124,7 +124,7 @@ def main(argv=None):
 
 		if len(args) == 0:
 			print("No path given, trying /var/log/bootchart.tgz")
-			args = [ "/var/log/bootchart.tgz" ]
+			args = ["/var/log/bootchart.tgz"]
 
 		res = parsing.Trace(writer, args, options)
 
@@ -142,7 +142,7 @@ def main(argv=None):
 			print('%02d:%05.2f' % (math.floor(dur/60), dur - 60 * math.floor(dur/60)))
 		else:
 			if options.annotate_file:
-				f = open (options.annotate_file, "w")
+				f = open(options.annotate_file, "w")
 				try:
 					for time in res[4]:
 						if time is not None:
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index d527bce2fc..43c8cf65ad 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -52,7 +52,7 @@ class Trace:
         self.times = [] # Always empty, but expected by draw.py when drawing system charts.
 
         if len(paths):
-            parse_paths (writer, self, paths)
+            parse_paths(writer, self, paths)
             if not self.valid():
                 raise ParseError("empty state: '%s' does not contain a valid bootchart" % ", ".join(paths))
 
@@ -82,12 +82,12 @@ class Trace:
         # Crop the chart to the end of the first idle period after the given
         # process
         if options.crop_after:
-            idle = self.crop (writer, options.crop_after)
+            idle = self.crop(writer, options.crop_after)
         else:
             idle = None
 
         # Annotate other times as the first start point of given process lists
-        self.times = [ idle ]
+        self.times = [idle]
         if options.annotate:
             for procnames in options.annotate:
                 names = [x[:15] for x in procnames.split(",")]
@@ -135,9 +135,9 @@ class Trace:
                 # many of these double forks are so short lived
                 # that we have no samples, or process info for them
                 # so climb the parent hierarcy to find one
-                if int (ppid * 1000) not in self.ps_stats.process_map:
+                if int(ppid * 1000) not in self.ps_stats.process_map:
 #                    print "Pid '%d' short lived with no process" % ppid
-                    ppid = find_parent_id_for (ppid)
+                    ppid = find_parent_id_for(ppid)
 #                else:
 #                    print "Pid '%d' has an entry" % ppid
             else:
@@ -148,7 +148,7 @@ class Trace:
         # merge in the cmdline data
         if self.cmdline is not None:
             for proc in self.ps_stats.process_map.values():
-                rpid = int (proc.pid // 1000)
+                rpid = int(proc.pid // 1000)
                 if rpid in self.cmdline:
                     cmd = self.cmdline[rpid]
                     proc.exe = cmd['exe']
@@ -159,17 +159,17 @@ class Trace:
         # re-parent any stray orphans if we can
         if self.parent_map is not None:
             for process in self.ps_stats.process_map.values():
-                ppid = find_parent_id_for (int(process.pid // 1000))
+                ppid = find_parent_id_for(int(process.pid // 1000))
                 if ppid:
                     process.ppid = ppid * 1000
 
         # stitch the tree together with pointers
         for process in self.ps_stats.process_map.values():
-            process.set_parent (self.ps_stats.process_map)
+            process.set_parent(self.ps_stats.process_map)
 
         # count on fingers variously
         for process in self.ps_stats.process_map.values():
-            process.calc_stats (self.ps_stats.sample_period)
+            process.calc_stats(self.ps_stats.sample_period)
 
     def crop(self, writer, crop_after):
 
@@ -218,15 +218,15 @@ class Trace:
                 break
 
         if idle is None:
-            writer.warn ("not idle after proc '%s'" % crop_after)
+            writer.warn("not idle after proc '%s'" % crop_after)
             return None
 
         crop_at = idle + 300
-        writer.info ("cropping at time %d" % crop_at)
-        while len (self.cpu_stats) \
+        writer.info("cropping at time %d" % crop_at)
+        while len(self.cpu_stats) \
                     and self.cpu_stats[-1].time > crop_at:
             self.cpu_stats.pop()
-        while len (self.disk_stats) \
+        while len(self.disk_stats) \
                     and self.disk_stats[-1].time > crop_at:
             self.disk_stats.pop()
 
@@ -238,8 +238,8 @@ class Trace:
                 cropped_map[key] = value
 
         for proc in cropped_map.values():
-            proc.duration = min (proc.duration, crop_at - proc.start_time)
-            while len (proc.samples) \
+            proc.duration = min(proc.duration, crop_at - proc.start_time)
+            while len(proc.samples) \
                         and proc.samples[-1].time > crop_at:
                 proc.samples.pop()
 
@@ -262,7 +262,7 @@ def _parse_headers(file):
     def parse(acc, line):
         (headers, last) = acc
         if '=' in line:
-            last, value = map (lambda x: x.strip(), line.split('=', 1))
+            last, value = map(lambda x: x.strip(), line.split('=', 1))
         else:
             value = line.strip()
         headers[last] += value
@@ -326,13 +326,13 @@ def _parse_proc_ps_log(writer, file):
             process.last_sys_cpu_time = sysCpu
         ltime = time
 
-    if len (timed_blocks) < 2:
+    if len(timed_blocks) < 2:
         return None
 
     startTime = timed_blocks[0][0]
-    avgSampleLength = (ltime - startTime)/(len (timed_blocks) - 1)
+    avgSampleLength = (ltime - startTime)/(len(timed_blocks) - 1)
 
-    return ProcessStats (writer, processMap, len (timed_blocks), avgSampleLength, startTime, ltime)
+    return ProcessStats(writer, processMap, len(timed_blocks), avgSampleLength, startTime, ltime)
 
 def _parse_taskstats_log(writer, file):
     """
@@ -379,7 +379,7 @@ def _parse_taskstats_log(writer, file):
                     pid += 1
                     pidRewrites[opid] = pid
 #                                       print "process mutation ! '%s' vs '%s' pid %s -> pid %s\n" % (process.cmd, cmd, opid, pid)
-                    process = process.split (writer, pid, cmd, ppid, time)
+                    process = process.split(writer, pid, cmd, ppid, time)
                     processMap[pid] = process
                 else:
                     process.cmd = cmd
@@ -387,9 +387,9 @@ def _parse_taskstats_log(writer, file):
                 process = Process(writer, pid, cmd, ppid, time)
                 processMap[pid] = process
 
-            delta_cpu_ns = (float) (cpu_ns - process.last_cpu_ns)
-            delta_blkio_delay_ns = (float) (blkio_delay_ns - process.last_blkio_delay_ns)
-            delta_swapin_delay_ns = (float) (swapin_delay_ns - process.last_swapin_delay_ns)
+            delta_cpu_ns = (float)(cpu_ns - process.last_cpu_ns)
+            delta_blkio_delay_ns = (float)(blkio_delay_ns - process.last_blkio_delay_ns)
+            delta_swapin_delay_ns = (float)(swapin_delay_ns - process.last_swapin_delay_ns)
 
             # make up some state data ...
             if delta_cpu_ns > 0:
@@ -413,13 +413,13 @@ def _parse_taskstats_log(writer, file):
             process.last_swapin_delay_ns = swapin_delay_ns
         ltime = time
 
-    if len (timed_blocks) < 2:
+    if len(timed_blocks) < 2:
         return None
 
     startTime = timed_blocks[0][0]
     avgSampleLength = (ltime - startTime)/(len(timed_blocks)-1)
 
-    return ProcessStats (writer, processMap, len (timed_blocks), avgSampleLength, startTime, ltime)
+    return ProcessStats(writer, processMap, len(timed_blocks), avgSampleLength, startTime, ltime)
 
 def _parse_proc_stat_log(file):
     samples = []
@@ -430,7 +430,7 @@ def _parse_proc_stat_log(file):
             continue
         # CPU times {user, nice, system, idle, io_wait, irq, softirq}
         tokens = lines[0].split()
-        times = [ int(token) for token in tokens[1:] ]
+        times = [int(token) for token in tokens[1:]]
         if ltimes:
             user = float((times[0] + times[1]) - (ltimes[0] + ltimes[1]))
             system = float((times[2] + times[5] + times[6]) - (ltimes[2] + ltimes[5] + ltimes[6]))
@@ -438,7 +438,7 @@ def _parse_proc_stat_log(file):
             iowait = float(times[4] - ltimes[4])
 
             aSum = max(user + system + idle + iowait, 1)
-            samples.append( CPUSample(time, user/aSum, system/aSum, iowait/aSum) )
+            samples.append(CPUSample(time, user/aSum, system/aSum, iowait/aSum))
 
         ltimes = times
         # skip the rest of statistics lines
@@ -456,7 +456,7 @@ def _parse_proc_disk_stat_log(file):
     not sda1, sda2 etc. The format of relevant lines should be:
     {major minor name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq}
     """
-    disk_regex_re = re.compile ('^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
+    disk_regex_re = re.compile('^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
 
     # this gets called an awful lot.
     def is_relevant_line(linetokens):
@@ -469,7 +469,7 @@ def _parse_proc_disk_stat_log(file):
 
     for time, lines in _parse_timed_blocks(file):
         sample = DiskStatSample(time)
-        relevant_tokens = [linetokens for linetokens in map (lambda x: x.split(),lines) if is_relevant_line(linetokens)]
+        relevant_tokens = [linetokens for linetokens in map(lambda x: x.split(),lines) if is_relevant_line(linetokens)]
 
         for tokens in relevant_tokens:
             disk, rsect, wsect, use = tokens[2], int(tokens[5]), int(tokens[9]), int(tokens[12])
@@ -482,10 +482,10 @@ def _parse_proc_disk_stat_log(file):
         interval = sample1.time - sample2.time
         if interval == 0:
             interval = 1
-        sums = [ a - b for a, b in zip(sample1.diskdata, sample2.diskdata) ]
+        sums = [a - b for a, b in zip(sample1.diskdata, sample2.diskdata)]
         readTput = sums[0] / 2.0 * 100.0 / interval
         writeTput = sums[1] / 2.0 * 100.0 / interval
-        util = float( sums[2] ) / 10 / interval
+        util = float(sums[2]) / 10 / interval
         util = max(0.0, min(1.0, util))
         disk_stats.append(DiskSample(sample2.time, readTput, writeTput, util))
 
@@ -570,8 +570,8 @@ def _parse_monitor_disk_log(file):
 # [    0.039993] calling  migration_init+0x0/0x6b @ 1
 # [    0.039993] initcall migration_init+0x0/0x6b returned 1 after 0 usecs
 def _parse_dmesg(writer, file):
-    timestamp_re = re.compile ("^\[\s*(\d+\.\d+)\s*]\s+(.*)$")
-    split_re = re.compile ("^(\S+)\s+([\S\+_-]+) (.*)$")
+    timestamp_re = re.compile("^\[\s*(\d+\.\d+)\s*]\s+(.*)$")
+    split_re = re.compile("^(\S+)\s+([\S\+_-]+) (.*)$")
     processMap = {}
     idx = 0
     inc = 1.0 / 1000000
@@ -580,12 +580,12 @@ def _parse_dmesg(writer, file):
     base_ts = False
     max_ts = 0
     for line in file.read().split('\n'):
-        t = timestamp_re.match (line)
+        t = timestamp_re.match(line)
         if t is None:
 #                       print "duff timestamp " + line
             continue
 
-        time_ms = float (t.group(1)) * 1000
+        time_ms = float(t.group(1)) * 1000
         # looks like we may have a huge diff after the clock
         # has been set up. This could lead to huge graph:
         # so huge we will be killed by the OOM.
@@ -599,7 +599,7 @@ def _parse_dmesg(writer, file):
         if base_ts:
 #                       print "fscked clock: used %f instead of %f" % (time_ms - base_ts, time_ms)
             time_ms -= base_ts
-        m = split_re.match (t.group(2))
+        m = split_re.match(t.group(2))
 
         if m is None:
             continue
@@ -608,19 +608,19 @@ def _parse_dmesg(writer, file):
         func = m.group(2)
         rest = m.group(3)
 
-        if t.group(2).startswith ('Write protecting the') or \
-           t.group(2).startswith ('Freeing unused kernel memory'):
+        if t.group(2).startswith('Write protecting the') or \
+           t.group(2).startswith('Freeing unused kernel memory'):
             kernel.duration = time_ms / 10
             continue
 
 #               print "foo: '%s' '%s' '%s'" % (type, func, rest)
         if type == "calling":
             ppid = kernel.pid
-            p = re.match ("\@ (\d+)", rest)
+            p = re.match("\@ (\d+)", rest)
             if p is not None:
-                ppid = float (p.group(1)) // 1000
+                ppid = float(p.group(1)) // 1000
 #                               print "match: '%s' ('%g') at '%s'" % (func, ppid, time_ms)
-            name = func.split ('+', 1) [0]
+            name = func.split('+', 1)[0]
             idx += inc
             processMap[func] = Process(writer, ppid + idx, name, ppid, time_ms / 10)
         elif type == "initcall":
@@ -655,13 +655,13 @@ def _parse_pacct(writer, file):
             print("Invalid version 0x%x" % (ord(ver)))
             return None
 
-        file.seek (14, 1)     # user, group etc.
-        pid = _read_le_int32 (file)
-        ppid = _read_le_int32 (file)
+        file.seek(14, 1)     # user, group etc.
+        pid = _read_le_int32(file)
+        ppid = _read_le_int32(file)
 #               print "Parent of %d is %d" % (pid, ppid)
         parent_map[pid] = ppid
-        file.seek (4 + 4 + 16, 1) # timings
-        file.seek (16, 1)         # acct_comm
+        file.seek(4 + 4 + 16, 1) # timings
+        file.seek(16, 1)         # acct_comm
     return parent_map
 
 def _parse_paternity_log(writer, file):
@@ -671,7 +671,7 @@ def _parse_paternity_log(writer, file):
         if not line:
             continue
         elems = line.split(' ') # <Child> <Parent>
-        if len (elems) >= 2:
+        if len(elems) >= 2:
 #                       print "paternity of %d is %d" % (int(elems[0]), int(elems[1]))
             parent_map[int(elems[0])] = int(elems[1])
         else:
@@ -682,9 +682,9 @@ def _parse_cmdline_log(writer, file):
     cmdLines = {}
     for block in file.read().split('\n\n'):
         lines = block.split('\n')
-        if len (lines) >= 3:
+        if len(lines) >= 3:
 #                       print "Lines '%s'" % (lines[0])
-            pid = int (lines[0])
+            pid = int(lines[0])
             values = {}
             values['exe'] = lines[1].lstrip(':')
             args = lines[2].lstrip(':').split('\0')
@@ -714,14 +714,14 @@ def get_num_cpus(headers):
     if headers is None:
         return 1
     if headers.get("system.cpu.num"):
-        return max (int (headers.get("system.cpu.num")), 1)
+        return max(int(headers.get("system.cpu.num")), 1)
     cpu_model = headers.get("system.cpu")
     if cpu_model is None:
         return 1
     mat = re.match(".*\\((\\d+)\\)", cpu_model)
     if mat is None:
         return 1
-    return max (int(mat.group(1)), 1)
+    return max(int(mat.group(1)), 1)
 
 def _do_parse(writer, state, filename, file):
     writer.info("parsing '%s'" % filename)
diff --git a/scripts/pybootchartgui/pybootchartgui/process_tree.py b/scripts/pybootchartgui/pybootchartgui/process_tree.py
index 5572c5d19c..b429e4b9ba 100644
--- a/scripts/pybootchartgui/pybootchartgui/process_tree.py
+++ b/scripts/pybootchartgui/pybootchartgui/process_tree.py
@@ -111,7 +111,7 @@ class ProcessTree:
         """
         if not process_subtree:
             return 100000000
-        return min( [min(proc.start_time, self.get_start_time(proc.child_list)) for proc in process_subtree] )
+        return min([min(proc.start_time, self.get_start_time(proc.child_list)) for proc in process_subtree])
 
     def get_end_time(self, process_subtree):
         """Returns the end time of the process subtree.  This is the end time
@@ -120,13 +120,13 @@ class ProcessTree:
         """
         if not process_subtree:
             return -100000000
-        return max( [max(proc.start_time + proc.duration, self.get_end_time(proc.child_list)) for proc in process_subtree] )
+        return max([max(proc.start_time + proc.duration, self.get_end_time(proc.child_list)) for proc in process_subtree])
 
     def get_max_pid(self, process_subtree):
         """Returns the max PID found in the process tree."""
         if not process_subtree:
             return -100000000
-        return max( [max(proc.pid, self.get_max_pid(proc.child_list)) for proc in process_subtree] )
+        return max([max(proc.pid, self.get_max_pid(proc.child_list)) for proc in process_subtree])
 
     def update_ppids_for_daemons(self, process_list):
         """Fedora hack: when loading the system services from rc, runuser(1)
@@ -284,7 +284,7 @@ class ProcessTree:
     def merge_processes(self, p1, p2):
         """Merges two process' samples."""
         p1.samples.extend(p2.samples)
-        p1.samples.sort( key=lambda p: p.time )
+        p1.samples.sort(key=lambda p: p.time)
         p1time = p1.start_time
         p2time = p2.start_time
         p1.start_time = min(p1time, p2time)
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py
index 69299fbd21..0b46c1491c 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -19,7 +19,7 @@ class DiskStatSample:
         self.time = time
         self.diskdata = [0, 0, 0]
     def add_diskdata(self, new_diskdata):
-        self.diskdata = [ a + b for a, b in zip(self.diskdata, new_diskdata) ]
+        self.diskdata = [a + b for a, b in zip(self.diskdata, new_diskdata)]
 
 class CPUSample:
     def __init__(self, time, user, sys, io=0.0, swap=0.0):
@@ -35,7 +35,7 @@ class CPUSample:
 
     def __str__(self):
         return str(self.time) + "\t" + str(self.user) + "\t" + \
-               str(self.sys) + "\t" + str(self.io) + "\t" + str (self.swap)
+               str(self.sys) + "\t" + str(self.io) + "\t" + str(self.swap)
 
 class MemSample:
     used_values = ('MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree',)
@@ -96,8 +96,8 @@ class ProcessStats:
         self.sample_period = sample_period
         self.start_time = start_time
         self.end_time = end_time
-        writer.info ("%d samples, avg. sample length %f" % (self.sample_count, self.sample_period))
-        writer.info ("process list size: %d" % len (self.process_map.values()))
+        writer.info("%d samples, avg. sample length %f" % (self.sample_count, self.sample_period))
+        writer.info("process list size: %d" % len(self.process_map.values()))
 
 class Process:
     def __init__(self, writer, pid, cmd, ppid, start_time):
@@ -123,7 +123,7 @@ class Process:
 
     # split this process' run - triggered by a name change
     def split(self, writer, pid, cmd, ppid, start_time):
-        split = Process (writer, pid, cmd, ppid, start_time)
+        split = Process(writer, pid, cmd, ppid, start_time)
 
         split.last_cpu_ns = self.last_cpu_ns
         split.last_blkio_delay_ns = self.last_blkio_delay_ns
@@ -132,7 +132,7 @@ class Process:
         return split
 
     def __str__(self):
-        return " ".join([str(self.pid), self.cmd, str(self.ppid), '[ ' + str(len(self.samples)) + ' samples ]' ])
+        return " ".join([str(self.pid), self.cmd, str(self.ppid), '[ ' + str(len(self.samples)) + ' samples ]'])
 
     def calc_stats(self, samplePeriod):
         if self.samples:
@@ -141,8 +141,8 @@ class Process:
             self.start_time = min(firstSample.time, self.start_time)
             self.duration = lastSample.time - self.start_time + samplePeriod
 
-        activeCount = sum( [1 for sample in self.samples if sample.cpu_sample and sample.cpu_sample.sys + sample.cpu_sample.user + sample.cpu_sample.io > 0.0] )
-        activeCount = activeCount + sum( [1 for sample in self.samples if sample.state == 'D'] )
+        activeCount = sum([1 for sample in self.samples if sample.cpu_sample and sample.cpu_sample.sys + sample.cpu_sample.user + sample.cpu_sample.io > 0.0])
+        activeCount = activeCount + sum([1 for sample in self.samples if sample.state == 'D'])
         self.active = (activeCount>2)
 
     def calc_load(self, userCpu, sysCpu, interval):
@@ -157,7 +157,7 @@ class Process:
 
     def set_parent(self, processMap):
         if self.ppid != None:
-            self.parent = processMap.get (self.ppid)
+            self.parent = processMap.get(self.ppid)
             if self.parent == None and self.pid // 1000 > 1 and \
                 not (self.ppid == 2000 or self.pid == 2000): # kernel threads: ppid=2
                 self.writer.warn("Missing CONFIG_PROC_EVENTS: no parent for pid '%i' ('%s') with ppid '%i'"
diff --git a/scripts/wic b/scripts/wic
index a741aed364..9fd2551b6f 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -337,7 +337,7 @@ def wic_init_parser_create(subparser):
                       dest='compressor',
                       help="compress image with specified compressor")
     subparser.add_argument("-m", "--bmap", action="store_true", help="generate .bmap")
-    subparser.add_argument("--no-fstab-update" ,action="store_true",
+    subparser.add_argument("--no-fstab-update",action="store_true",
                       help="Do not change fstab file.")
     subparser.add_argument("-v", "--vars", dest='vars_dir',
                       help="directory with <image>.env files that store "
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 5/8] PEP8 double aggressive E22, E224, E241, E242 and E27
  2021-06-28  5:59 [PATCH 1/8] PEP8 double aggressive E401 Khem Raj
                   ` (2 preceding siblings ...)
  2021-06-28  5:59 ` [PATCH 4/8] PEP8 double aggressive E20 and E211 Khem Raj
@ 2021-06-28  5:59 ` Khem Raj
  2021-06-28  5:59 ` [PATCH 6/8] PEP8 double aggressive E225 ~ E228 and E231 Khem Raj
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Khem Raj @ 2021-06-28  5:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: persianpros, Khem Raj

From: persianpros <persianpros@yahoo.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../lib/oeqa/runtime/cases/dnf_runtime.py     |   8 +-
 meta-selftest/lib/oeqa/runtime/cases/virgl.py |   6 +-
 meta/lib/bblayers/create.py                   |   2 +-
 meta/lib/buildstats.py                        |   2 +-
 meta/lib/oe/buildhistory_analysis.py          |  18 +-
 meta/lib/oe/classextend.py                    |   4 +-
 meta/lib/oe/copy_buildsystem.py               |   2 +-
 meta/lib/oe/cve_check.py                      |   6 +-
 meta/lib/oe/distro_check.py                   |   4 +-
 meta/lib/oe/elf.py                            | 180 +++++++++---------
 meta/lib/oe/gpg_sign.py                       |   2 +-
 meta/lib/oe/license.py                        |   2 +-
 meta/lib/oe/package_manager/__init__.py       |   4 +-
 meta/lib/oe/package_manager/deb/__init__.py   |   2 +-
 meta/lib/oe/package_manager/ipk/__init__.py   |   2 +-
 meta/lib/oe/package_manager/rpm/__init__.py   |  18 +-
 meta/lib/oe/patch.py                          |   2 +-
 meta/lib/oe/path.py                           |   2 +-
 meta/lib/oe/qa.py                             |  22 +--
 meta/lib/oe/recipeutils.py                    |  10 +-
 meta/lib/oe/sdk.py                            |   8 +-
 meta/lib/oe/terminal.py                       |   2 +-
 meta/lib/oe/utils.py                          |   6 +-
 meta/lib/oeqa/core/context.py                 |   4 +-
 meta/lib/oeqa/core/runner.py                  |   2 +-
 meta/lib/oeqa/core/target/ssh.py              |   2 +-
 meta/lib/oeqa/core/tests/test_decorators.py   |   6 +-
 meta/lib/oeqa/core/utils/concurrencytest.py   |   2 +-
 meta/lib/oeqa/oetest.py                       |   2 +-
 meta/lib/oeqa/runexported.py                  |   2 +-
 meta/lib/oeqa/runtime/cases/df.py             |   2 +-
 meta/lib/oeqa/runtime/cases/dnf.py            |  18 +-
 meta/lib/oeqa/runtime/cases/ksample.py        |   2 +-
 meta/lib/oeqa/runtime/cases/ltp.py            |  10 +-
 meta/lib/oeqa/runtime/cases/ltp_compliance.py |  10 +-
 meta/lib/oeqa/runtime/cases/ltp_stress.py     |   8 +-
 meta/lib/oeqa/runtime/cases/oe_syslog.py      |   8 +-
 meta/lib/oeqa/runtime/cases/parselogs.py      |  10 +-
 meta/lib/oeqa/runtime/cases/rpm.py            |   2 +-
 meta/lib/oeqa/runtime/cases/runlevel.py       |   2 +-
 meta/lib/oeqa/runtime/cases/scp.py            |   2 +-
 meta/lib/oeqa/runtime/cases/skeletoninit.py   |   2 +-
 meta/lib/oeqa/runtime/cases/storage.py        |   6 +-
 meta/lib/oeqa/runtime/cases/suspend.py        |   4 +-
 meta/lib/oeqa/runtime/cases/systemd.py        |   8 +-
 meta/lib/oeqa/runtime/cases/usb_hid.py        |   4 +-
 meta/lib/oeqa/runtime/cases/weston.py         |   4 +-
 meta/lib/oeqa/runtime/cases/xorg.py           |   2 +-
 meta/lib/oeqa/sdk/context.py                  |   2 +-
 meta/lib/oeqa/sdkext/cases/devtool.py         |   2 +-
 meta/lib/oeqa/sdkext/testsdk.py               |   2 +-
 meta/lib/oeqa/selftest/case.py                |   2 +-
 meta/lib/oeqa/selftest/cases/archiver.py      |   4 +-
 meta/lib/oeqa/selftest/cases/bbtests.py       |   2 +-
 meta/lib/oeqa/selftest/cases/buildoptions.py  |   2 +-
 meta/lib/oeqa/selftest/cases/devtool.py       |   4 +-
 meta/lib/oeqa/selftest/cases/eSDK.py          |   4 +-
 meta/lib/oeqa/selftest/cases/fitimage.py      |  10 +-
 meta/lib/oeqa/selftest/cases/gotoolchain.py   |   2 +-
 meta/lib/oeqa/selftest/cases/image_typedep.py |   2 +-
 meta/lib/oeqa/selftest/cases/manifest.py      |   6 +-
 .../oeqa/selftest/cases/oelib/buildhistory.py |   2 +-
 meta/lib/oeqa/selftest/cases/oelib/path.py    |  38 ++--
 meta/lib/oeqa/selftest/cases/oescripts.py     |   2 +-
 meta/lib/oeqa/selftest/cases/pkgdata.py       |  56 +++---
 meta/lib/oeqa/selftest/cases/runqemu.py       |   6 +-
 meta/lib/oeqa/selftest/cases/runtime_test.py  |   4 +-
 meta/lib/oeqa/selftest/cases/sstatetests.py   |  18 +-
 meta/lib/oeqa/selftest/cases/sysroot.py       |   2 +-
 meta/lib/oeqa/selftest/cases/wic.py           |   4 +-
 meta/lib/oeqa/selftest/context.py             |   2 +-
 meta/lib/oeqa/targetcontrol.py                |   6 +-
 meta/lib/oeqa/utils/decorators.py             |  16 +-
 meta/lib/oeqa/utils/gitarchive.py             |   2 +-
 meta/lib/oeqa/utils/qemurunner.py             |  10 +-
 meta/lib/oeqa/utils/qemutinyrunner.py         |   6 +-
 meta/lib/oeqa/utils/testexport.py             |   6 +-
 .../glibc/glibc/check-test-wrapper            |   2 +-
 .../python3/check_build_completeness.py       |   4 +-
 .../python/python3/create_manifest3.py        |   6 +-
 .../python/python3/get_module_deps3.py        |  14 +-
 .../perf/perf/sort-pmuevents.py               |   2 +-
 meta/recipes-rt/rt-tests/files/rt_bmark.py    |  50 ++---
 scripts/buildhistory-diff                     |   2 +-
 scripts/buildstats-diff                       |   4 +-
 scripts/combo-layer                           |  28 +--
 scripts/contrib/image-manifest                |   2 +-
 scripts/contrib/patchreview.py                |   2 +-
 scripts/contrib/verify-homepage.py            |   2 +-
 scripts/crosstap                              |   4 +-
 scripts/lib/build_perf/report.py              |   2 +-
 scripts/lib/buildstats.py                     |   4 +-
 scripts/lib/devtool/deploy.py                 |   2 +-
 scripts/lib/devtool/standard.py               |  14 +-
 scripts/lib/devtool/upgrade.py                |   6 +-
 scripts/lib/recipetool/create.py              |   2 +-
 scripts/lib/recipetool/create_buildsys.py     |   2 +-
 .../lib/recipetool/create_buildsys_python.py  |   2 +-
 scripts/lib/recipetool/create_npm.py          |   2 +-
 scripts/lib/resulttool/manualexecution.py     |   2 +-
 scripts/lib/resulttool/report.py              |   2 +-
 scripts/lib/resulttool/store.py               |   4 +-
 scripts/lib/wic/engine.py                     |   6 +-
 scripts/lib/wic/filemap.py                    |   2 +-
 scripts/lib/wic/ksparser.py                   |   2 +-
 scripts/lib/wic/misc.py                       |   2 +-
 scripts/lib/wic/plugins/imager/direct.py      |   2 +-
 scripts/oe-depends-dot                        |   8 +-
 scripts/oe-pkgdata-browser                    |   2 +-
 scripts/oepydevshell-internal.py              |   2 +-
 scripts/pybootchartgui/pybootchartgui/draw.py |  86 ++++-----
 scripts/pybootchartgui/pybootchartgui/gui.py  |  14 +-
 .../pybootchartgui/pybootchartgui/main.py.in  |   2 +-
 .../pybootchartgui/pybootchartgui/parsing.py  |  20 +-
 .../pybootchartgui/process_tree.py            |   6 +-
 .../pybootchartgui/pybootchartgui/samples.py  |   2 +-
 .../pybootchartgui/tests/parser_test.py       |   2 +-
 scripts/pythondeps                            |   4 +-
 scripts/relocate_sdk.py                       |   6 +-
 scripts/runqemu                               |  24 +--
 scripts/send-error-report                     |  12 +-
 scripts/sysroot-relativelinks.py              |   4 +-
 scripts/task-time                             |  14 +-
 scripts/tiny/ksize.py                         |  10 +-
 scripts/verify-bashisms                       |   2 +-
 scripts/wic                                   |  30 +--
 scripts/yocto-check-layer                     |   2 +-
 127 files changed, 547 insertions(+), 547 deletions(-)

diff --git a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
index 837a15730a..fcd6ae313c 100644
--- a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
+++ b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
@@ -41,10 +41,10 @@ class DnfSelftest(DnfTest):
         import re
         # Use '-y' for non-interactive mode: automatically import the feed signing key
         output_makecache = self.dnf('-vy makecache')
-        self.assertTrue(re.match(r".*Failed to synchronize cache", output_makecache, re.DOTALL) is None, msg="dnf makecache failed to synchronize repo: %s" %(output_makecache))
-        self.assertTrue(re.match(r".*Metadata cache created", output_makecache, re.DOTALL) is not None, msg="dnf makecache failed: %s" %(output_makecache))
+        self.assertTrue(re.match(r".*Failed to synchronize cache", output_makecache, re.DOTALL) is None, msg="dnf makecache failed to synchronize repo: %s" % (output_makecache))
+        self.assertTrue(re.match(r".*Metadata cache created", output_makecache, re.DOTALL) is not None, msg="dnf makecache failed: %s" % (output_makecache))
 
         output_repoinfo = self.dnf('-v repoinfo')
         matchobj = re.match(r".*Repo-pkgs\s*:\s*(?P<n_pkgs>[0-9]+)", output_repoinfo, re.DOTALL)
-        self.assertTrue(matchobj is not None, msg="Could not find the amount of packages in dnf repoinfo output: %s" %(output_repoinfo))
-        self.assertTrue(int(matchobj.group('n_pkgs')) > 0, msg="Amount of remote packages is not more than zero: %s\n" %(output_repoinfo))
+        self.assertTrue(matchobj is not None, msg="Could not find the amount of packages in dnf repoinfo output: %s" % (output_repoinfo))
+        self.assertTrue(int(matchobj.group('n_pkgs')) > 0, msg="Amount of remote packages is not more than zero: %s\n" % (output_repoinfo))
diff --git a/meta-selftest/lib/oeqa/runtime/cases/virgl.py b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
index 144decdd6b..e3b6fe1d80 100644
--- a/meta-selftest/lib/oeqa/runtime/cases/virgl.py
+++ b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
@@ -9,10 +9,10 @@ class VirglTest(OERuntimeTestCase):
     def test_kernel_driver(self):
         status, output = self.target.run('dmesg|grep virgl')
         self.assertEqual(status, 0, "Checking for virgl driver in dmesg returned non-zero: %d\n%s" % (status, output))
-        self.assertIn("features: +virgl", output, "virgl acceleration seems to be disabled:\n%s" %(output))
+        self.assertIn("features: +virgl", output, "virgl acceleration seems to be disabled:\n%s" % (output))
 
     @OETestDepends(['virgl.VirglTest.test_kernel_driver'])
     def test_kmscube(self):
         status, output = self.target.run('kmscube')
-        self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output))
-        self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" %(output))
+        self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" % (status, output))
+        self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" % (output))
diff --git a/meta/lib/bblayers/create.py b/meta/lib/bblayers/create.py
index 7ddb777dc7..06e1f6d342 100644
--- a/meta/lib/bblayers/create.py
+++ b/meta/lib/bblayers/create.py
@@ -38,7 +38,7 @@ class CreatePlugin(LayerPlugin):
         layerid = args.layerid if args.layerid is not None else layername
 
         # Create the README from templates/README
-        readme_template =  read_template('README').format(layername=layername)
+        readme_template = read_template('README').format(layername=layername)
         readme = os.path.join(layerdir, 'README')
         with open(readme, 'w') as fd:
             fd.write(readme_template)
diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
index 051daf7a5d..27bff9dda6 100644
--- a/meta/lib/buildstats.py
+++ b/meta/lib/buildstats.py
@@ -121,7 +121,7 @@ class SystemStats:
             iowait = float(times[4] - self.stat_ltimes[4])
 
             aSum = max(user + system + idle + iowait, 1)
-            reduced = (time, (user/aSum, system/aSum, iowait/aSum))
+            reduced = (time, (user / aSum, system / aSum, iowait / aSum))
 
         self.stat_ltimes = times
         return reduced
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 5a50eef711..a54c09ca56 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -37,8 +37,8 @@ img_monitor_files = ['installed-package-names.txt', 'files-in-image.txt']
 
 colours = {
     'colour_default': '',
-    'colour_add':     '',
-    'colour_remove':  '',
+    'colour_add': '',
+    'colour_remove': '',
 }
 
 def init_colours(use_colours):
@@ -46,14 +46,14 @@ def init_colours(use_colours):
     if use_colours:
         colours = {
             'colour_default': '\033[0m',
-            'colour_add':     '\033[1;32m',
-            'colour_remove':  '\033[1;31m',
+            'colour_add': '\033[1;32m',
+            'colour_remove': '\033[1;31m',
         }
     else:
         colours = {
             'colour_default': '',
-            'colour_add':     '',
-            'colour_remove':  '',
+            'colour_add': '',
+            'colour_remove': '',
         }
 
 class ChangeRecord:
@@ -358,8 +358,8 @@ def compare_file_lists(alines, blines, compare_ownership=True):
                 if commondir[i] != commondir2[i]:
                     idx = i
                     break
-            commondir = "/".join(commondir[:i+1])
-            commondir2 = "/".join(commondir2[:i+1])
+            commondir = "/".join(commondir[:i + 1])
+            commondir2 = "/".join(commondir2[:i + 1])
             # If the common parent is in one dict and not the other its likely a rename
             # so iterate through those files and process as such
             if commondir2 not in bdict and commondir not in adict:
@@ -593,7 +593,7 @@ def compare_siglists(a_blob, b_blob, taskdiff=False):
             elif len(tasks) == 2:
                 desc = '%s and %s' % (tasks[0], tasks[1])
             else:
-                desc = '%s and %d others' % (tasks[-1], len(tasks)-1)
+                desc = '%s and %d others' % (tasks[-1], len(tasks) - 1)
             out.append('%s: %s' % (desc, line))
     else:
         for key in keys:
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py
index 20366f78be..d5f252c63e 100644
--- a/meta/lib/oe/classextend.py
+++ b/meta/lib/oe/classextend.py
@@ -48,7 +48,7 @@ class ClassExtender(object):
         newvar = []
         for v in var:
             newvar.append(self.extend_name(v))
-        newdata =  " ".join(newvar)
+        newdata = " ".join(newvar)
         if setvar:
             self.d.setVar(varname, newdata)
         return newdata
@@ -66,7 +66,7 @@ class ClassExtender(object):
                 newvar.append("^" + self.extname + "-" + v[1:])
             else:
                 newvar.append(self.extend_name(v))
-        newdata =  " ".join(newvar)
+        newdata = " ".join(newvar)
         if setvar:
             self.d.setVar(varname, newdata)
         return newdata
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index 4998afa60f..5bd087060c 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -76,7 +76,7 @@ class BuildSystem(object):
                 workspace_newname = '%s-%d' % (workspace_name, extranum)
 
         corebase_files = self.d.getVar('COREBASE_FILES').split()
-        corebase_files = [corebase + '/' +x for x in corebase_files]
+        corebase_files = [corebase + '/' + x for x in corebase_files]
         # Make sure bitbake goes in
         bitbake_dir = bb.__file__.rsplit('/', 3)[0]
         corebase_files.append(bitbake_dir)
diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py
index a1d7c292af..6db988d5d0 100644
--- a/meta/lib/oe/cve_check.py
+++ b/meta/lib/oe/cve_check.py
@@ -15,11 +15,11 @@ class Version():
         suffixes = ["alphabetical", "patch"]
 
         if str(suffix) == "alphabetical":
-            version_pattern =  r"""r?v?(?:(?P<release>[0-9]+(?:[-\.][0-9]+)*)(?P<patch>[-_\.]?(?P<patch_l>[a-z]))?(?P<pre>[-_\.]?(?P<pre_l>(rc|alpha|beta|pre|preview|dev))[-_\.]?(?P<pre_v>[0-9]+)?)?)(.*)?"""
+            version_pattern = r"""r?v?(?:(?P<release>[0-9]+(?:[-\.][0-9]+)*)(?P<patch>[-_\.]?(?P<patch_l>[a-z]))?(?P<pre>[-_\.]?(?P<pre_l>(rc|alpha|beta|pre|preview|dev))[-_\.]?(?P<pre_v>[0-9]+)?)?)(.*)?"""
         elif str(suffix) == "patch":
-            version_pattern =  r"""r?v?(?:(?P<release>[0-9]+(?:[-\.][0-9]+)*)(?P<patch>[-_\.]?(p|patch)(?P<patch_l>[0-9]+))?(?P<pre>[-_\.]?(?P<pre_l>(rc|alpha|beta|pre|preview|dev))[-_\.]?(?P<pre_v>[0-9]+)?)?)(.*)?"""
+            version_pattern = r"""r?v?(?:(?P<release>[0-9]+(?:[-\.][0-9]+)*)(?P<patch>[-_\.]?(p|patch)(?P<patch_l>[0-9]+))?(?P<pre>[-_\.]?(?P<pre_l>(rc|alpha|beta|pre|preview|dev))[-_\.]?(?P<pre_v>[0-9]+)?)?)(.*)?"""
         else:
-            version_pattern =  r"""r?v?(?:(?P<release>[0-9]+(?:[-\.][0-9]+)*)(?P<pre>[-_\.]?(?P<pre_l>(rc|alpha|beta|pre|preview|dev))[-_\.]?(?P<pre_v>[0-9]+)?)?)(.*)?"""
+            version_pattern = r"""r?v?(?:(?P<release>[0-9]+(?:[-\.][0-9]+)*)(?P<pre>[-_\.]?(?P<pre_l>(rc|alpha|beta|pre|preview|dev))[-_\.]?(?P<pre_v>[0-9]+)?)?)(.*)?"""
         regex = re.compile(r"^\s*" + version_pattern + r"\s*$", re.VERBOSE | re.IGNORECASE)
 
         match = regex.search(version)
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 508dcdb7d4..0a9f4d162c 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -22,8 +22,8 @@ def get_links_from_url(url, d):
 
 def find_latest_numeric_release(url, d):
     "Find the latest listed numeric release on the given url"
-    max=0
-    maxstr=""
+    max = 0
+    maxstr = ""
     for link in get_links_from_url(url, d):
         try:
             # TODO use LooseVersion
diff --git a/meta/lib/oe/elf.py b/meta/lib/oe/elf.py
index 6549e8f09b..acc4185544 100644
--- a/meta/lib/oe/elf.py
+++ b/meta/lib/oe/elf.py
@@ -6,119 +6,119 @@ def machine_dict(d):
 #           TARGET_OS  TARGET_ARCH   MACHINE, OSABI, ABIVERSION, Little Endian, 32bit?
     machdata = {
             "darwin9": { 
-                        "arm":       (40,     0,    0,          True,          32),
+                        "arm": (40, 0, 0, True, 32),
                       },
             "eabi": {
-                        "arm":       (40,     0,    0,          True,          32),
+                        "arm": (40, 0, 0, True, 32),
                       },
             "elf": {
-                        "aarch64":   (183,    0,    0,          True,          64),
-                        "aarch64_be":(183,    0,    0,          False,         64),
-                        "i586":      (3,      0,    0,          True,          32),
-                        "i686":      (3,      0,    0,          True,          32),
-                        "x86_64":     (62,     0,    0,          True,          64),
-                        "epiphany":   (4643,   0,    0,          True,          32),
-                        "lm32":       (138,    0,    0,          False,         32),
-                        "mips":       (8,     0,    0,          False,         32),
-                        "mipsel":     (8,     0,    0,          True,          32),
-                        "microblaze":  (189,   0,    0,          False,         32),
-                        "microblazeel":(189,   0,    0,          True,          32),
-                        "powerpc":    (20,     0,    0,          False,         32),
-                        "riscv32":    (243,    0,    0,          True,          32),
-                        "riscv64":    (243,    0,    0,          True,          64),
+                        "aarch64": (183, 0, 0, True, 64),
+                        "aarch64_be":(183, 0, 0, False, 64),
+                        "i586": (3, 0, 0, True, 32),
+                        "i686": (3, 0, 0, True, 32),
+                        "x86_64": (62, 0, 0, True, 64),
+                        "epiphany": (4643, 0, 0, True, 32),
+                        "lm32": (138, 0, 0, False, 32),
+                        "mips": (8, 0, 0, False, 32),
+                        "mipsel": (8, 0, 0, True, 32),
+                        "microblaze": (189, 0, 0, False, 32),
+                        "microblazeel":(189, 0, 0, True, 32),
+                        "powerpc": (20, 0, 0, False, 32),
+                        "riscv32": (243, 0, 0, True, 32),
+                        "riscv64": (243, 0, 0, True, 64),
                       },
             "linux": { 
-                        "aarch64":   (183,    0,    0,          True,          64),
-                        "aarch64_be":(183,    0,    0,          False,         64),
-                        "arm":       (40,    97,    0,          True,          32),
-                        "armeb":      (40,    97,    0,          False,         32),
-                        "powerpc":    (20,     0,    0,          False,         32),
-                        "powerpc64":  (21,     0,    0,          False,         64),
-                        "powerpc64le":  (21,     0,    0,          True,         64),
-                        "i386":       (3,     0,    0,          True,          32),
-                        "i486":       (3,     0,    0,          True,          32),
-                        "i586":       (3,     0,    0,          True,          32),
-                        "i686":       (3,     0,    0,          True,          32),
-                        "x86_64":     (62,     0,    0,          True,          64),
-                        "ia64":       (50,     0,    0,          True,          64),
-                        "alpha":      (36902,  0,    0,          True,          64),
-                        "hppa":       (15,     3,    0,          False,         32),
-                        "m68k":       (4,     0,    0,          False,         32),
-                        "mips":       (8,     0,    0,          False,         32),
-                        "mipsel":     (8,     0,    0,          True,          32),
-                        "mips64":     (8,     0,    0,          False,         64),
-                        "mips64el":   (8,     0,    0,          True,          64),
-                        "mipsisa32r6":   (8,  0,    0,          False,         32),
-                        "mipsisa32r6el": (8,  0,    0,          True,          32),
-                        "mipsisa64r6":   (8,  0,    0,          False,         64),
-                        "mipsisa64r6el": (8,  0,    0,          True,          64),
-                        "nios2":      (113,    0,    0,          True,          32),
-                        "riscv32":    (243,    0,    0,          True,          32),
-                        "riscv64":    (243,    0,    0,          True,          64),
-                        "s390":       (22,     0,    0,          False,         32),
-                        "sh4":        (42,     0,    0,          True,          32),
-                        "sparc":      (2,     0,    0,          False,         32),
-                        "microblaze":  (189,   0,    0,          False,         32),
-                        "microblazeel":(189,   0,    0,          True,          32),
+                        "aarch64": (183, 0, 0, True, 64),
+                        "aarch64_be":(183, 0, 0, False, 64),
+                        "arm": (40, 97, 0, True, 32),
+                        "armeb": (40, 97, 0, False, 32),
+                        "powerpc": (20, 0, 0, False, 32),
+                        "powerpc64": (21, 0, 0, False, 64),
+                        "powerpc64le": (21, 0, 0, True, 64),
+                        "i386": (3, 0, 0, True, 32),
+                        "i486": (3, 0, 0, True, 32),
+                        "i586": (3, 0, 0, True, 32),
+                        "i686": (3, 0, 0, True, 32),
+                        "x86_64": (62, 0, 0, True, 64),
+                        "ia64": (50, 0, 0, True, 64),
+                        "alpha": (36902, 0, 0, True, 64),
+                        "hppa": (15, 3, 0, False, 32),
+                        "m68k": (4, 0, 0, False, 32),
+                        "mips": (8, 0, 0, False, 32),
+                        "mipsel": (8, 0, 0, True, 32),
+                        "mips64": (8, 0, 0, False, 64),
+                        "mips64el": (8, 0, 0, True, 64),
+                        "mipsisa32r6": (8, 0, 0, False, 32),
+                        "mipsisa32r6el": (8, 0, 0, True, 32),
+                        "mipsisa64r6": (8, 0, 0, False, 64),
+                        "mipsisa64r6el": (8, 0, 0, True, 64),
+                        "nios2": (113, 0, 0, True, 32),
+                        "riscv32": (243, 0, 0, True, 32),
+                        "riscv64": (243, 0, 0, True, 64),
+                        "s390": (22, 0, 0, False, 32),
+                        "sh4": (42, 0, 0, True, 32),
+                        "sparc": (2, 0, 0, False, 32),
+                        "microblaze": (189, 0, 0, False, 32),
+                        "microblazeel":(189, 0, 0, True, 32),
                       },
             "linux-musl": { 
-                        "aarch64":   (183,    0,    0,            True,          64),
-                        "aarch64_be":(183,    0,    0,            False,         64),
-                        "arm":       (40,    97,    0,          True,          32),
-                        "armeb":      (40,    97,    0,          False,         32),
-                        "powerpc":    (20,     0,    0,          False,         32),
-                        "powerpc64":  (21,     0,    0,          False,         64),
-                        "powerpc64le":  (21,     0,    0,          True,         64),
-                        "i386":       (3,     0,    0,          True,          32),
-                        "i486":       (3,     0,    0,          True,          32),
-                        "i586":       (3,     0,    0,          True,          32),
-                        "i686":       (3,     0,    0,          True,          32),
-                        "x86_64":     (62,     0,    0,          True,          64),
-                        "mips":       (8,     0,    0,          False,         32),
-                        "mipsel":     (8,     0,    0,          True,          32),
-                        "mips64":     (8,     0,    0,          False,         64),
-                        "mips64el":   (8,     0,    0,          True,          64),
-                        "microblaze":  (189,     0,    0,          False,         32),
-                        "microblazeel":(189,     0,    0,          True,          32),
-                        "riscv32":    (243,      0,    0,          True,          32),
-                        "riscv64":    (243,      0,    0,          True,          64),
-                        "sh4":        (42,     0,    0,          True,          32),
+                        "aarch64": (183, 0, 0, True, 64),
+                        "aarch64_be":(183, 0, 0, False, 64),
+                        "arm": (40, 97, 0, True, 32),
+                        "armeb": (40, 97, 0, False, 32),
+                        "powerpc": (20, 0, 0, False, 32),
+                        "powerpc64": (21, 0, 0, False, 64),
+                        "powerpc64le": (21, 0, 0, True, 64),
+                        "i386": (3, 0, 0, True, 32),
+                        "i486": (3, 0, 0, True, 32),
+                        "i586": (3, 0, 0, True, 32),
+                        "i686": (3, 0, 0, True, 32),
+                        "x86_64": (62, 0, 0, True, 64),
+                        "mips": (8, 0, 0, False, 32),
+                        "mipsel": (8, 0, 0, True, 32),
+                        "mips64": (8, 0, 0, False, 64),
+                        "mips64el": (8, 0, 0, True, 64),
+                        "microblaze": (189, 0, 0, False, 32),
+                        "microblazeel":(189, 0, 0, True, 32),
+                        "riscv32": (243, 0, 0, True, 32),
+                        "riscv64": (243, 0, 0, True, 64),
+                        "sh4": (42, 0, 0, True, 32),
                       },
             "uclinux-uclibc": {
-                        "bfin":       (106,     0,    0,          True,         32),
+                        "bfin": (106, 0, 0, True, 32),
                       }, 
             "linux-gnueabi": {
-                        "arm":       (40,     0,    0,          True,          32),
-                        "armeb":     (40,     0,    0,          False,         32),
+                        "arm": (40, 0, 0, True, 32),
+                        "armeb": (40, 0, 0, False, 32),
                       },
             "linux-musleabi": {
-                        "arm":       (40,     0,    0,          True,          32),
-                        "armeb":     (40,     0,    0,          False,         32),
+                        "arm": (40, 0, 0, True, 32),
+                        "armeb": (40, 0, 0, False, 32),
                       },
             "linux-gnuspe": {
-                        "powerpc":    (20,     0,    0,          False,         32),
+                        "powerpc": (20, 0, 0, False, 32),
                       },
             "linux-muslspe": {
-                        "powerpc":    (20,     0,    0,          False,         32),
+                        "powerpc": (20, 0, 0, False, 32),
                       },
-            "linux-gnu":       {
-                        "powerpc":    (20,     0,    0,          False,         32),
-                        "sh4":        (42,     0,    0,          True,          32),
+            "linux-gnu": {
+                        "powerpc": (20, 0, 0, False, 32),
+                        "sh4": (42, 0, 0, True, 32),
                       },
-            "linux-gnu_ilp32":     {
-                        "aarch64":   (183,    0,    0,          True,          32),
+            "linux-gnu_ilp32": {
+                        "aarch64": (183, 0, 0, True, 32),
                       },
-            "linux-gnux32":       {
-                        "x86_64":     (62,     0,    0,          True,          32),
+            "linux-gnux32": {
+                        "x86_64": (62, 0, 0, True, 32),
                       },
-            "linux-muslx32":       {
-                        "x86_64":     (62,     0,    0,          True,          32),
+            "linux-muslx32": {
+                        "x86_64": (62, 0, 0, True, 32),
                       },
-            "linux-gnun32":       {
-                        "mips64":       (8,     0,    0,          False,         32),
-                        "mips64el":     (8,     0,    0,          True,          32),
-                        "mipsisa64r6":  (8,     0,    0,          False,         32),
-                        "mipsisa64r6el":(8,     0,    0,          True,          32),
+            "linux-gnun32": {
+                        "mips64": (8, 0, 0, False, 32),
+                        "mips64el": (8, 0, 0, True, 32),
+                        "mipsisa64r6": (8, 0, 0, False, 32),
+                        "mipsisa64r6el":(8, 0, 0, True, 32),
                       },
         }
 
diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index d9045ecd94..7686596ac8 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -56,7 +56,7 @@ class LocalSigner(object):
 
         # Sign in chunks
         for i in range(0, len(files), sign_chunk):
-            subprocess.check_output(shlex.split(cmd + ' '.join(files[i:i+sign_chunk])), stderr=subprocess.STDOUT)
+            subprocess.check_output(shlex.split(cmd + ' '.join(files[i:i + sign_chunk])), stderr=subprocess.STDOUT)
 
     def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, armor=True):
         """Create a detached signature of a file"""
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index 665d32ecbb..7aefeaaae0 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -45,7 +45,7 @@ class LicenseVisitor(ast.NodeVisitor):
         elements = list([x for x in license_operator.split(licensestr) if x.strip()])
         for pos, element in enumerate(elements):
             if license_pattern.match(element):
-                if pos > 0 and license_pattern.match(elements[pos-1]):
+                if pos > 0 and license_pattern.match(elements[pos - 1]):
                     new_elements.append('&')
                 element = '"' + element + '"'
             elif not license_operator.match(element):
diff --git a/meta/lib/oe/package_manager/__init__.py b/meta/lib/oe/package_manager/__init__.py
index 1a039edda4..5fac51aea7 100644
--- a/meta/lib/oe/package_manager/__init__.py
+++ b/meta/lib/oe/package_manager/__init__.py
@@ -42,7 +42,7 @@ def opkg_query(cmd_output):
     dep = []
     prov = []
     pkgarch = ""
-    for line in cmd_output.splitlines()+['']:
+    for line in cmd_output.splitlines() + ['']:
         line = line.rstrip()
         if ':' in line:
             if line.startswith("Package: "):
@@ -92,7 +92,7 @@ def failed_postinsts_abort(pkgs, log_path):
     bb.fatal("""Postinstall scriptlets of %s have failed. If the intention is to defer them to first boot,
 then please place them into pkg_postinst_ontarget_${PN} ().
 Deferring to first boot via 'exit 1' is no longer supported.
-Details of the failure are in %s.""" %(pkgs, log_path))
+Details of the failure are in %s.""" % (pkgs, log_path))
 
 def generate_locale_archive(d, rootfs, target_arch, localedir):
     # Pretty sure we don't need this for locale archive generation but
diff --git a/meta/lib/oe/package_manager/deb/__init__.py b/meta/lib/oe/package_manager/deb/__init__.py
index f877e6ea9a..457e936862 100644
--- a/meta/lib/oe/package_manager/deb/__init__.py
+++ b/meta/lib/oe/package_manager/deb/__init__.py
@@ -495,7 +495,7 @@ class DpkgPM(OpkgDpkgPM):
         pkg_info = self.package_info(pkg)
         if not pkg_info:
             bb.fatal("Unable to get information for package '%s' while "
-                     "trying to extract the package."  % pkg)
+                     "trying to extract the package." % pkg)
 
         tmp_dir = super(DpkgPM, self).extract(pkg, pkg_info)
         bb.utils.remove(os.path.join(tmp_dir, "data.tar.xz"))
diff --git a/meta/lib/oe/package_manager/ipk/__init__.py b/meta/lib/oe/package_manager/ipk/__init__.py
index 8e2086a6f3..965d542e08 100644
--- a/meta/lib/oe/package_manager/ipk/__init__.py
+++ b/meta/lib/oe/package_manager/ipk/__init__.py
@@ -495,7 +495,7 @@ class OpkgPM(OpkgDpkgPM):
         pkg_info = self.package_info(pkg)
         if not pkg_info:
             bb.fatal("Unable to get information for package '%s' while "
-                     "trying to extract the package."  % pkg)
+                     "trying to extract the package." % pkg)
 
         tmp_dir = super(OpkgPM, self).extract(pkg, pkg_info)
         bb.utils.remove(os.path.join(tmp_dir, "data.tar.xz"))
diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py
index 9acb2b2ea3..f7cf436f61 100644
--- a/meta/lib/oe/package_manager/rpm/__init__.py
+++ b/meta/lib/oe/package_manager/rpm/__init__.py
@@ -32,7 +32,7 @@ class RpmIndexer(Indexer):
 
 class RpmSubdirIndexer(RpmIndexer):
     def write_index(self):
-        bb.note("Generating package index for %s" %(self.deploy_dir))
+        bb.note("Generating package index for %s" % (self.deploy_dir))
         # Remove the existing repodata to ensure that we re-generate it no matter what
         bb.utils.remove(os.path.join(self.deploy_dir, "repodata"), recurse=True)
 
@@ -42,7 +42,7 @@ class RpmSubdirIndexer(RpmIndexer):
                 for dir in entry[1]:
                     if dir != 'repodata':
                         dir_path = oe.path.join(self.deploy_dir, dir)
-                        bb.note("Generating package index for %s" %(dir_path))
+                        bb.note("Generating package index for %s" % (dir_path))
                         self.do_write_index(dir_path)
 
 
@@ -94,7 +94,7 @@ class RpmPM(PackageManager):
             archs = archs + ["bogusarch"]
         # This architecture needs to be upfront so that packages using it are properly prioritized
         archs = ["sdk_provides_dummy_target"] + archs
-        confdir = "%s/%s" %(self.target_rootfs, "etc/dnf/vars/")
+        confdir = "%s/%s" % (self.target_rootfs, "etc/dnf/vars/")
         bb.utils.mkdirhier(confdir)
         open(confdir + "arch", 'w').write(":".join(archs))
         distro_codename = self.d.getVar('DISTRO_CODENAME')
@@ -107,8 +107,8 @@ class RpmPM(PackageManager):
         # We need to configure rpm to use our primary package architecture as the installation architecture,
         # and to make it compatible with other package architectures that we use.
         # Otherwise it will refuse to proceed with packages installation.
-        platformconfdir = "%s/%s" %(self.target_rootfs, "etc/rpm/")
-        rpmrcconfdir = "%s/%s" %(self.target_rootfs, "etc/")
+        platformconfdir = "%s/%s" % (self.target_rootfs, "etc/rpm/")
+        rpmrcconfdir = "%s/%s" % (self.target_rootfs, "etc/")
         bb.utils.mkdirhier(platformconfdir)
         open(platformconfdir + "platform", 'w').write("%s-pc-linux" % self.primary_arch)
         with open(rpmrcconfdir + "rpmrc", 'w') as f:
@@ -162,7 +162,7 @@ class RpmPM(PackageManager):
             if feed_archs is not None:
                 for arch in feed_archs.split():
                     repo_uri = uri + "/" + arch
-                    repo_id   = "oe-remote-repo"  + "-".join(urlparse(repo_uri).path.split("/"))
+                    repo_id = "oe-remote-repo" + "-".join(urlparse(repo_uri).path.split("/"))
                     repo_name = "OE Remote Repo:" + " ".join(urlparse(repo_uri).path.split("/"))
                     open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'a').write(
                              "[%s]\nname=%s\nbaseurl=%s\n%s\n" % (repo_id, repo_name, repo_uri, gpg_opts))
@@ -218,7 +218,7 @@ class RpmPM(PackageManager):
             self._invoke_dnf(["remove"] + pkgs)
         else:
             cmd = bb.utils.which(os.getenv('PATH'), "rpm")
-            args = ["-e", "-v", "--nodeps", "--root=%s" %self.target_rootfs]
+            args = ["-e", "-v", "--nodeps", "--root=%s" % self.target_rootfs]
 
             try:
                 bb.note("Running %s" % ' '.join([cmd] + args + pkgs))
@@ -306,7 +306,7 @@ class RpmPM(PackageManager):
         dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf")
         standard_dnf_args = ["-v", "--rpmverbosity=info", "-y",
                              "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"),
-                             "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")),
+                             "--setopt=reposdir=%s" % (oe.path.join(self.target_rootfs, "etc/yum.repos.d")),
                              "--installroot=%s" % (self.target_rootfs),
                              "--setopt=logdir=%s" % (self.d.getVar('T'))
                             ]
@@ -378,7 +378,7 @@ class RpmPM(PackageManager):
         output = self._invoke_dnf(["repoquery", "--queryformat", "%{location}", pkg])
         pkg_name = output.splitlines()[-1]
         if not pkg_name.endswith(".rpm"):
-            bb.fatal("dnf could not find package %s in repository: %s" %(pkg, output))
+            bb.fatal("dnf could not find package %s in repository: %s" % (pkg, output))
         pkg_path = oe.path.join(self.rpm_repo_dir, pkg_name)
 
         cpio_cmd = bb.utils.which(os.getenv("PATH"), "cpio")
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index a191a613bd..e0f767bf65 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -323,7 +323,7 @@ class GitApplyTree(PatchTree):
     def decodeAuthor(line):
         from email.header import decode_header
         authorval = line.split(':', 1)[1].strip().replace('"', '')
-        result =  decode_header(authorval)[0][0]
+        result = decode_header(authorval)[0][0]
         if hasattr(result, 'decode'):
             result = result.decode('utf-8')
         return result
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index c92a4f98cd..101ee2d029 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -314,7 +314,7 @@ def which_wild(pathname, path=None, mode=os.F_OK, *, reverse=False, candidates=F
                 if rel not in seen:
                     seen.add(rel)
                     if candidates:
-                        files.append((found_path, [os.path.join(p, rel) for p in paths[:index+1]]))
+                        files.append((found_path, [os.path.join(p, rel) for p in paths[:index + 1]]))
                     else:
                         files.append(found_path)
 
diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index 38c2e0cc1c..c6aaa0af06 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -12,26 +12,26 @@ class NotELFFileError(Exception):
 class ELFFile:
     EI_NIDENT = 16
 
-    EI_CLASS      = 4
-    EI_DATA       = 5
-    EI_VERSION    = 6
-    EI_OSABI      = 7
+    EI_CLASS = 4
+    EI_DATA = 5
+    EI_VERSION = 6
+    EI_OSABI = 7
     EI_ABIVERSION = 8
 
-    E_MACHINE    = 0x12
+    E_MACHINE = 0x12
 
     # possible values for EI_CLASS
     ELFCLASSNONE = 0
-    ELFCLASS32   = 1
-    ELFCLASS64   = 2
+    ELFCLASS32 = 1
+    ELFCLASS64 = 2
 
     # possible value for EI_VERSION
-    EV_CURRENT   = 1
+    EV_CURRENT = 1
 
     # possible values for EI_DATA
-    EI_DATA_NONE  = 0
-    EI_DATA_LSB  = 1
-    EI_DATA_MSB  = 2
+    EI_DATA_NONE = 0
+    EI_DATA_LSB = 1
+    EI_DATA_MSB = 2
 
     PT_INTERP = 3
 
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 407d168894..646cbdfa13 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -133,8 +133,8 @@ def split_var_value(value, assignment=True):
                 assigfound = True
             if assigfound:
                 if '"' in item or "'" in item:
-                    outlist = [' '.join(out[:idx+1])]
-                    outlist.extend(out[idx+1:])
+                    outlist = [' '.join(out[:idx + 1])]
+                    outlist.extend(out[idx + 1:])
                     break
     return outlist
 
@@ -224,7 +224,7 @@ def patch_recipe_lines(fromlines, values, trailing_newline=True):
             # (that we'd want to ensure remain leading the next value)
             for i, ln in reversed(list(enumerate(lines))):
                 if not ln.startswith('#'):
-                    lines[i+1:i+1] = addlines
+                    lines[i + 1:i + 1] = addlines
                     break
             else:
                 lines.extend(addlines)
@@ -1003,7 +1003,7 @@ def get_recipe_upstream_version(rd):
 
     # XXX: we suppose that the first entry points to the upstream sources
     src_uri = src_uris.split()[0]
-    uri_type, _, _, _, _, _ =  decodeurl(src_uri)
+    uri_type, _, _, _, _, _ = decodeurl(src_uri)
 
     (pv, pfx, sfx) = get_recipe_pv_without_srcpv(rd.getVar('PV'), uri_type)
     ru['current_version'] = pv
@@ -1023,7 +1023,7 @@ def get_recipe_upstream_version(rd):
 
     elif uri_type == "file":
         # files are always up-to-date
-        ru['version'] =  pv
+        ru['version'] = pv
         ru['type'] = 'A'
         ru['datetime'] = datetime.now()
     else:
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index 5e854b7c62..190010691b 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -64,17 +64,17 @@ class Sdk(object, metaclass=ABCMeta):
             # something goes wrong
             if (bb.utils.movefile(sourcefile, destdir) == None):
                 raise OSError("moving %s to %s failed"
-                        %(sourcefile, destdir))
+                        % (sourcefile, destdir))
         #FIXME: using umbrella exc catching because bb.utils method raises it
         except Exception as e:
-            bb.debug(1, "printing the stack trace\n %s" %traceback.format_exc())
+            bb.debug(1, "printing the stack trace\n %s" % traceback.format_exc())
             bb.error("unable to place %s in final SDK location" % sourcefile)
 
     def mkdirhier(self, dirpath):
         try:
             bb.utils.mkdirhier(dirpath)
         except OSError as e:
-            bb.debug(1, "printing the stack trace\n %s" %traceback.format_exc())
+            bb.debug(1, "printing the stack trace\n %s" % traceback.format_exc())
             bb.fatal("cannot make dir for SDK: %s" % dirpath)
 
     def remove(self, path, recurse=False):
@@ -82,7 +82,7 @@ class Sdk(object, metaclass=ABCMeta):
             bb.utils.remove(path, recurse)
         #FIXME: using umbrella exc catching because bb.utils method raises it
         except Exception as e:
-            bb.debug(1, "printing the stack trace\n %s" %traceback.format_exc())
+            bb.debug(1, "printing the stack trace\n %s" % traceback.format_exc())
             bb.warn("cannot remove SDK dir: %s" % path)
 
     def install_locales(self, pm):
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 04585afd42..2d6a4ac792 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -284,7 +284,7 @@ def check_tmux_pane_size(tmux):
         else:
             raise
 
-    return size/2 >= 19
+    return size / 2 >= 19
 
 def check_terminal_version(terminalName):
     import subprocess as sub
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 123ad07fe4..ea78b2b0e0 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -117,8 +117,8 @@ def features_backfill(var,d):
     # Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should
     # add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED
     features = (d.getVar(var) or "").split()
-    backfill = (d.getVar(var+"_BACKFILL") or "").split()
-    considered = (d.getVar(var+"_BACKFILL_CONSIDERED") or "").split()
+    backfill = (d.getVar(var + "_BACKFILL") or "").split()
+    considered = (d.getVar(var + "_BACKFILL_CONSIDERED") or "").split()
 
     addfeatures = []
     for feature in backfill:
@@ -526,7 +526,7 @@ class ImageQAFailed(Exception):
     def __init__(self, description, name=None, logfile=None):
         self.description = description
         self.name = name
-        self.logfile=logfile
+        self.logfile = logfile
 
     def __str__(self):
         msg = 'Function failed: %s' % self.name
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index cb460f7496..5e647d11c8 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -58,7 +58,7 @@ class OETestContext(object):
             if test.__class__ not in class_ids:
                 class_ids[test.__class__] = '.'.join(test.id().split('.')[:-1])
             for skip in skips:
-                if (test.id()+'.').startswith(skip+'.'):
+                if (test.id() + '.').startswith(skip + '.'):
                     setattr(test, 'setUp', skipfuncgen('Skip by the command line argument "%s"' % skip))
         for tclass in class_ids:
             cid = class_ids[tclass]
@@ -170,7 +170,7 @@ class OETestContextExecutor(object):
         self.tc_kwargs['init'] = {}
         self.tc_kwargs['load'] = {}
         self.tc_kwargs['list'] = {}
-        self.tc_kwargs['run']  = {}
+        self.tc_kwargs['run'] = {}
 
         self.tc_kwargs['init']['logger'] = self._setup_logger(logger, args)
         if args.test_data_file:
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 72078eb8bd..d2e7ab5462 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -284,7 +284,7 @@ class OETestRunner(_TestRunner):
                 curr['module'] = case.__module__
                 logger.info(curr['module'])
 
-            if not 'class' in curr  or curr['class'] != \
+            if not 'class' in curr or curr['class'] != \
                     case.__class__.__name__:
                 curr['class'] = case.__class__.__name__
                 logger.info(" -- %s" % curr['class'])
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 9493e186b3..67bbe639d9 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -91,7 +91,7 @@ class OESSHTarget(OETarget):
 
         if timeout:
             processTimeout = timeout
-        elif timeout==0:
+        elif timeout == 0:
             processTimeout = None
         else:
             processTimeout = self.timeout
diff --git a/meta/lib/oeqa/core/tests/test_decorators.py b/meta/lib/oeqa/core/tests/test_decorators.py
index 39e5e2164f..5853aa0027 100755
--- a/meta/lib/oeqa/core/tests/test_decorators.py
+++ b/meta/lib/oeqa/core/tests/test_decorators.py
@@ -71,7 +71,7 @@ class TestDependsDecorator(TestBase):
     modules = ['depends']
 
     def test_depends_order(self):
-        tests =  ['depends.DependsTest.testDependsFirst',
+        tests = ['depends.DependsTest.testDependsFirst',
                   'depends.DependsTest.testDependsSecond',
                   'depends.DependsTest.testDependsThird',
                   'depends.DependsTest.testDependsFourth',
@@ -88,7 +88,7 @@ class TestDependsDecorator(TestBase):
     def test_depends_fail_missing_dependency(self):
         expect = "TestCase depends.DependsTest.testDependsSecond depends on "\
                  "depends.DependsTest.testDependsFirst and isn't available"
-        tests =  ['depends.DependsTest.testDependsSecond']
+        tests = ['depends.DependsTest.testDependsSecond']
         try:
             # Must throw OEQADependency because missing 'testDependsFirst'
             tc = self._testLoader(modules=self.modules, tests=tests)
@@ -100,7 +100,7 @@ class TestDependsDecorator(TestBase):
 
     def test_depends_fail_circular_dependency(self):
         expect = 'have a circular dependency'
-        tests =  ['depends.DependsTest.testDependsCircular1',
+        tests = ['depends.DependsTest.testDependsCircular1',
                   'depends.DependsTest.testDependsCircular2',
                   'depends.DependsTest.testDependsCircular3']
         try:
diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py b/meta/lib/oeqa/core/utils/concurrencytest.py
index e82acbd368..98067c0e8c 100644
--- a/meta/lib/oeqa/core/utils/concurrencytest.py
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -71,7 +71,7 @@ class BBThreadsafeForwardingResult(ThreadsafeForwardingResult):
                     self.totalinprocess,
                     totalprogress,
                     self.totaltests,
-                    "{0:.2f}".format(time.time()-self._test_start.timestamp()),
+                    "{0:.2f}".format(time.time() - self._test_start.timestamp()),
                     test.id())
         finally:
             self.semaphore.release()
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index e1c74958bd..bd602637dc 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -118,7 +118,7 @@ class oeRuntimeTest(oeTest):
         # for QemuTarget only
         if (type(self.target).__name__ == "QemuTarget" and
                 (self.id() in res.getErrorList() or
-                self.id() in  res.getFailList())):
+                self.id() in res.getFailList())):
             self.tc.host_dumper.create_dir(self._testMethodName)
             self.tc.host_dumper.dump_host()
             self.target.target_dumper.dump_target(
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index 1e994bc655..d11171bf45 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -52,7 +52,7 @@ class FakeTarget(object):
         if os.path.lexists(sshloglink):
             os.remove(sshloglink)
         os.symlink(self.sshlog, sshloglink)
-        print("SSH log file: %s" %  self.sshlog)
+        print("SSH log file: %s" % self.sshlog)
         self.connection = SSHControl(self.ip, logfile=self.sshlog)
 
     def run(self, cmd, timeout=None):
diff --git a/meta/lib/oeqa/runtime/cases/df.py b/meta/lib/oeqa/runtime/cases/df.py
index bb155c9cf9..26752fb4bc 100644
--- a/meta/lib/oeqa/runtime/cases/df.py
+++ b/meta/lib/oeqa/runtime/cases/df.py
@@ -16,4 +16,4 @@ class DfTest(OERuntimeTestCase):
         cmd = "df -P / | sed -n '2p' | awk '{print $4}'"
         (status,output) = self.target.run(cmd)
         msg = 'Not enough space on image. Current size is %s' % output
-        self.assertTrue(int(output)>5120, msg=msg)
+        self.assertTrue(int(output) > 5120, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
index 51f46cc4ba..777dbe6bf1 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -63,8 +63,8 @@ class DnfRepoTest(DnfTest):
 
     def dnf_with_repo(self, command):
         pkgarchs = os.listdir(os.path.join(self.tc.td['WORKDIR'], 'oe-testimage-repo'))
-        deploy_url = 'http://%s:%s/' %(self.target.server_ip, self.repo_server.port)
-        cmdlinerepoopts = ["--repofrompath=oe-testimage-repo-%s,%s%s" %(arch, deploy_url, arch) for arch in pkgarchs]
+        deploy_url = 'http://%s:%s/' % (self.target.server_ip, self.repo_server.port)
+        cmdlinerepoopts = ["--repofrompath=oe-testimage-repo-%s,%s%s" % (arch, deploy_url, arch) for arch in pkgarchs]
 
         output = self.dnf(" ".join(cmdlinerepoopts) + " --nogpgcheck " + command)
         return output
@@ -108,7 +108,7 @@ class DnfRepoTest(DnfTest):
         output = subprocess.check_output('%s %s -name run-postinsts-dev*' % (bb.utils.which(os.getenv('PATH'), "find"),
                                                                            os.path.join(self.tc.td['WORKDIR'], 'oe-testimage-repo')), shell=True).decode("utf-8")
         rpm_path = output.split("/")[-2] + "/" + output.split("/")[-1]
-        url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, rpm_path)
+        url = 'http://%s:%s/%s' % (self.target.server_ip, self.repo_server.port, rpm_path)
         self.dnf_with_repo('remove -y run-postinsts-dev')
         self.dnf_with_repo('install -y %s' % url)
 
@@ -152,8 +152,8 @@ class DnfRepoTest(DnfTest):
         #installroot directory.
         self.target.run('mkdir -p %s/etc' % rootpath, 1500)
         self.target.run('mkdir -p %s/usr/bin %s/usr/sbin' % (rootpath, rootpath), 1500)
-        self.target.run('ln -sf -r %s/usr/bin %s/bin'  % (rootpath, rootpath), 1500)
-        self.target.run('ln -sf -r %s/usr/sbin %s/sbin'  % (rootpath, rootpath), 1500)
+        self.target.run('ln -sf -r %s/usr/bin %s/bin' % (rootpath, rootpath), 1500)
+        self.target.run('ln -sf -r %s/usr/sbin %s/sbin' % (rootpath, rootpath), 1500)
         self.target.run('mkdir -p %s/dev' % rootpath, 1500)
         #Handle different architectures lib dirs
         self.target.run('mkdir -p %s/usr/lib' % rootpath, 1500)
@@ -183,9 +183,9 @@ class DnfRepoTest(DnfTest):
         #Avoid remove dependencies to skip some errors on different archs and images
         self.dnf_with_repo('remove --setopt=clean_requirements_on_remove=0 -y curl*')
         #check curl-dev is not installed adter removing all curl occurrences
-        status, output = self.target.run('dnf list --installed | grep %s'% excludepkg, 1500)
-        self.assertEqual(1, status, "%s was not removed,  is listed as installed"%excludepkg)
+        status, output = self.target.run('dnf list --installed | grep %s' % excludepkg, 1500)
+        self.assertEqual(1, status, "%s was not removed,  is listed as installed" % excludepkg)
         self.dnf_with_repo('install -y --exclude=%s --exclude=curl-staticdev curl*' % excludepkg)
         #check curl-dev is not installed after being excluded
-        status, output = self.target.run('dnf list --installed | grep %s'% excludepkg, 1500)
-        self.assertEqual(1, status, "%s was not excluded, is listed as installed"%excludepkg)
+        status, output = self.target.run('dnf list --installed | grep %s' % excludepkg, 1500)
+        self.assertEqual(1, status, "%s was not excluded, is listed as installed" % excludepkg)
diff --git a/meta/lib/oeqa/runtime/cases/ksample.py b/meta/lib/oeqa/runtime/cases/ksample.py
index a9a1620ebd..1ad6ba8fc8 100644
--- a/meta/lib/oeqa/runtime/cases/ksample.py
+++ b/meta/lib/oeqa/runtime/cases/ksample.py
@@ -60,7 +60,7 @@ class KSample(OERuntimeTestCase):
         # check result
         self.cmd_and_check("dmesg | grep \"test passed\" ", "test passed")
         # rmmod
-        self.cmd_and_check("rmmod %s" %  module_prename)
+        self.cmd_and_check("rmmod %s" % module_prename)
 
     def kprobe_func(self, name=''):
         # check config
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py
index a1d59c39d2..16fde55ccf 100644
--- a/meta/lib/oeqa/runtime/cases/ltp.py
+++ b/meta/lib/oeqa/runtime/cases/ltp.py
@@ -45,7 +45,7 @@ class LtpTestBase(OERuntimeTestCase):
  
     @classmethod
     def ltp_finishup(cls):
-        cls.extras['ltpresult.sections'] =  cls.sections
+        cls.extras['ltpresult.sections'] = cls.sections
 
         # update symlink to ltp_log
         if os.path.exists(cls.ltptest_log_dir_link):
@@ -76,7 +76,7 @@ class LtpTest(LtpTestBase):
             self.extras['ltpresult.rawlogs']['log'] = self.extras['ltpresult.rawlogs']['log'] + output
 
             # copy nice log from DUT
-            dst = os.path.join(self.ltptest_log_dir, "%s" %  ltp_group)
+            dst = os.path.join(self.ltptest_log_dir, "%s" % ltp_group)
             remote_src = "/opt/ltp/results/%s" % ltp_group 
             (status, output) = self.target.copyFrom(remote_src, dst, True)
             msg = 'File could not be copied. Output: %s' % output
@@ -84,11 +84,11 @@ class LtpTest(LtpTestBase):
                 self.target.logger.warning(msg)
 
             parser = LtpParser()
-            results, sections  = parser.parse(dst)
+            results, sections = parser.parse(dst)
 
-            runtime = int(endtime-starttime)
+            runtime = int(endtime - starttime)
             sections['duration'] = runtime
-            self.sections[ltp_group] =  sections
+            self.sections[ltp_group] = sections
 
             failed_tests = {}
             for test in results:
diff --git a/meta/lib/oeqa/runtime/cases/ltp_compliance.py b/meta/lib/oeqa/runtime/cases/ltp_compliance.py
index ba47c78fd4..c56c3e6fcf 100644
--- a/meta/lib/oeqa/runtime/cases/ltp_compliance.py
+++ b/meta/lib/oeqa/runtime/cases/ltp_compliance.py
@@ -45,7 +45,7 @@ class LtpPosixBase(OERuntimeTestCase):
  
     @classmethod
     def ltp_finishup(cls):
-        cls.extras['ltpposixresult.sections'] =  cls.sections
+        cls.extras['ltpposixresult.sections'] = cls.sections
 
         # update symlink to ltp_log
         if os.path.exists(cls.ltptest_log_dir_link):
@@ -57,7 +57,7 @@ class LtpPosixBase(OERuntimeTestCase):
             cls.fail(cls.failmsg)
 
 class LtpPosixTest(LtpPosixBase):
-    posix_groups = ["AIO", "MEM", "MSG", "SEM", "SIG",  "THR", "TMR", "TPS"]
+    posix_groups = ["AIO", "MEM", "MSG", "SEM", "SIG", "THR", "TMR", "TPS"]
 
     def runltp(self, posix_group):
             cmd = "/opt/ltp/bin/run-posix-option-group-test.sh %s 2>@1 | tee /opt/ltp/results/%s" % (posix_group, posix_group)
@@ -71,11 +71,11 @@ class LtpPosixTest(LtpPosixBase):
             self.extras['ltpposixresult.rawlogs']['log'] = self.extras['ltpposixresult.rawlogs']['log'] + output
 
             parser = LtpComplianceParser()
-            results, sections  = parser.parse(os.path.join(self.ltptest_log_dir, "%s" % posix_group))
+            results, sections = parser.parse(os.path.join(self.ltptest_log_dir, "%s" % posix_group))
 
-            runtime = int(endtime-starttime)
+            runtime = int(endtime - starttime)
             sections['duration'] = runtime
-            self.sections[posix_group] =  sections
+            self.sections[posix_group] = sections
  
             failed_tests = {}
             for test in results:
diff --git a/meta/lib/oeqa/runtime/cases/ltp_stress.py b/meta/lib/oeqa/runtime/cases/ltp_stress.py
index 2445ffbc93..d97595e94e 100644
--- a/meta/lib/oeqa/runtime/cases/ltp_stress.py
+++ b/meta/lib/oeqa/runtime/cases/ltp_stress.py
@@ -46,7 +46,7 @@ class LtpStressBase(OERuntimeTestCase):
  
     @classmethod
     def ltp_finishup(cls):
-        cls.extras['ltpstressresult.sections'] =  cls.sections
+        cls.extras['ltpstressresult.sections'] = cls.sections
 
         # update symlink to ltp_log
         if os.path.exists(cls.ltptest_log_dir_link):
@@ -70,11 +70,11 @@ class LtpStressTest(LtpStressBase):
             self.extras['ltpstressresult.rawlogs']['log'] = self.extras['ltpstressresult.rawlogs']['log'] + output
 
             parser = LtpParser()
-            results, sections  = parser.parse(os.path.join(self.ltptest_log_dir, "%s" % stress_group))
+            results, sections = parser.parse(os.path.join(self.ltptest_log_dir, "%s" % stress_group))
 
-            runtime = int(endtime-starttime)
+            runtime = int(endtime - starttime)
             sections['duration'] = runtime
-            self.sections[stress_group] =  sections
+            self.sections[stress_group] = sections
  
             failed_tests = {}
             for test in results:
diff --git a/meta/lib/oeqa/runtime/cases/oe_syslog.py b/meta/lib/oeqa/runtime/cases/oe_syslog.py
index f3c2bedbaf..dbb49b6895 100644
--- a/meta/lib/oeqa/runtime/cases/oe_syslog.py
+++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -24,17 +24,17 @@ class SyslogTestConfig(OERuntimeTestCase):
 
     def verif_not_running(self, pids):
         for pid in pids:
-            status, err_output = self.target.run('kill -0 %s' %pid)
+            status, err_output = self.target.run('kill -0 %s' % pid)
             if not status:
-                self.logger.debug("previous %s is still running" %pid)
+                self.logger.debug("previous %s is still running" % pid)
                 return 1
 
     def verify_running(self, names):
         pids = []
         for name in names:
-            status, pid = self.target.run('pidof %s' %name)
+            status, pid = self.target.run('pidof %s' % name)
             if status:
-                self.logger.debug("%s is not running" %name)
+                self.logger.debug("%s is not running" % name)
                 return 1, pids
             pids.append(pid)
         return 0, pids
diff --git a/meta/lib/oeqa/runtime/cases/parselogs.py b/meta/lib/oeqa/runtime/cases/parselogs.py
index 3638ed529f..345901d00d 100644
--- a/meta/lib/oeqa/runtime/cases/parselogs.py
+++ b/meta/lib/oeqa/runtime/cases/parselogs.py
@@ -249,7 +249,7 @@ class ParseLogsTest(OERuntimeTestCase):
         hwi += '*******************************\n'
         hwi += 'Machine name: ' + self.getMachine() + '\n'
         hwi += 'CPU: ' + str(cpu_name) + '\n'
-        hwi += 'Arch: ' + str(cpu_arch)+ '\n'
+        hwi += 'Arch: ' + str(cpu_arch) + '\n'
         hwi += 'Physical cores: ' + str(cpu_physical_cores) + '\n'
         hwi += 'Logical cores: ' + str(cpu_logical_cores) + '\n'
         hwi += '*******************************\n'
@@ -353,7 +353,7 @@ class ParseLogsTest(OERuntimeTestCase):
                         grep_output = check_output(cmd).decode('utf-8')
                     except:
                         pass
-                    results[log][xrez]=grep_output
+                    results[log][xrez] = grep_output
 
         return results
 
@@ -375,8 +375,8 @@ class ParseLogsTest(OERuntimeTestCase):
             for error in result[log]:
                 errcount += 1
                 self.msg += 'Central error: ' + str(error) + '\n'
-                self.msg +=  '***********************\n'
-                self.msg +=  result[str(log)][str(error)] + '\n'
-                self.msg +=  '***********************\n'
+                self.msg += '***********************\n'
+                self.msg += result[str(log)][str(error)] + '\n'
+                self.msg += '***********************\n'
         self.msg += '%s errors found in logs.' % errcount
         self.assertEqual(errcount, 0, msg=self.msg)
diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py
index 7a9d62c003..cfaa729f30 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -121,7 +121,7 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
 
         # Make sure that some database files are under /var/lib/rpm as '__db.xxx'
         status, output = self.target.run(db_files_cmd)
-        msg =  'Failed to find database files under /var/lib/rpm/ as __db.xxx'
+        msg = 'Failed to find database files under /var/lib/rpm/ as __db.xxx'
         self.assertEqual(0, status, msg=msg)
 
         self.tc.target.copyTo(self.test_file, self.dst)
diff --git a/meta/lib/oeqa/runtime/cases/runlevel.py b/meta/lib/oeqa/runtime/cases/runlevel.py
index 3a4df8ace1..aa31adf0b7 100644
--- a/meta/lib/oeqa/runtime/cases/runlevel.py
+++ b/meta/lib/oeqa/runtime/cases/runlevel.py
@@ -8,7 +8,7 @@ class RunLevel_Test(OERuntimeTestCase):
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     def test_runlevel_3(self):
         (status, output) = self.target.run("init 3 && sleep 5 && runlevel")
-        runlevel= '5 3'
+        runlevel = '5 3'
         self.assertEqual(output, runlevel, msg='Failed to set current runlevel to runlevel 3, current runlevel : %s' % output[-1])
         (status, output) = self.target.run("uname -a")
         self.assertEqual(status, 0, msg='Failed to run uname command, output: %s' % output)
diff --git a/meta/lib/oeqa/runtime/cases/scp.py b/meta/lib/oeqa/runtime/cases/scp.py
index aca9bd673a..fdf058d948 100644
--- a/meta/lib/oeqa/runtime/cases/scp.py
+++ b/meta/lib/oeqa/runtime/cases/scp.py
@@ -15,7 +15,7 @@ class ScpTest(OERuntimeTestCase):
     def setUpClass(cls):
         cls.tmp_fd, cls.tmp_path = mkstemp()
         with os.fdopen(cls.tmp_fd, 'w') as f:
-            f.seek(2 ** 22 -1)
+            f.seek(2 ** 22 - 1)
             f.write(os.linesep)
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/skeletoninit.py b/meta/lib/oeqa/runtime/cases/skeletoninit.py
index 4779cd6bb4..5f3b6b353a 100644
--- a/meta/lib/oeqa/runtime/cases/skeletoninit.py
+++ b/meta/lib/oeqa/runtime/cases/skeletoninit.py
@@ -21,7 +21,7 @@ class SkeletonBasicTest(OERuntimeTestCase):
         msg = 'skeleton init script not found. Output:\n%s' % output
         self.assertEqual(status, 0, msg=msg)
 
-        status, output =  self.target.run('ls /usr/sbin/skeleton-test')
+        status, output = self.target.run('ls /usr/sbin/skeleton-test')
         msg = 'skeleton-test not found. Output:\n%s' % output
         self.assertEqual(status, 0, msg=msg)
 
diff --git a/meta/lib/oeqa/runtime/cases/storage.py b/meta/lib/oeqa/runtime/cases/storage.py
index 1d037ef2e0..f6f9130d20 100644
--- a/meta/lib/oeqa/runtime/cases/storage.py
+++ b/meta/lib/oeqa/runtime/cases/storage.py
@@ -52,14 +52,14 @@ class StorageBase(OERuntimeTestCase):
 
         match = re.search('%s' % cls.test_msg, output)
         msg = ('Test message %s not in file %s.' % (cls.test_msg, cls.test_file))
-        cls.assertEqual(status, 0,  msg=msg)
+        cls.assertEqual(status, 0, msg=msg)
 
     def storage_write(cls):
         # create test message in file on device
         (status, output) = cls.target.run('echo "%s" >  %s/%s' % 
                 (cls.test_msg, cls.test_dir, cls.test_file))
         msg = ('File %s not create test message on %s' % (cls.test_file, cls.device))
-        cls.assertEqual(status, 0,  msg=msg)
+        cls.assertEqual(status, 0, msg=msg)
 
     def storage_umount(cls, tmo=1):
         time.sleep(tmo)
@@ -70,7 +70,7 @@ class StorageBase(OERuntimeTestCase):
             return
         else:
             msg = ('Device not unmount %s' % cls.mount_point)
-            cls.assertEqual(status, 0,  msg=msg)
+            cls.assertEqual(status, 0, msg=msg)
 
         (status, output) = cls.target.run('cat /proc/mounts')
         match = re.search('%s' % cls.device, output)
diff --git a/meta/lib/oeqa/runtime/cases/suspend.py b/meta/lib/oeqa/runtime/cases/suspend.py
index 9aa1cf6f5d..708e6ac7e5 100644
--- a/meta/lib/oeqa/runtime/cases/suspend.py
+++ b/meta/lib/oeqa/runtime/cases/suspend.py
@@ -8,7 +8,7 @@ class Suspend_Test(OERuntimeTestCase):
 
     def test_date(self): 
         (status, output) = self.target.run('date')
-        self.assertEqual(status, 0,  msg='Failed to run date command, output : %s' % output)
+        self.assertEqual(status, 0, msg='Failed to run date command, output : %s' % output)
         
     def test_ping(self):
         t_thread = threading.Thread(target=self.target.run, args=("ping 8.8.8.8",))
@@ -21,7 +21,7 @@ class Suspend_Test(OERuntimeTestCase):
         
     def set_suspend(self): 
         (status, output) = self.target.run('sudo rtcwake -m mem -s 10')
-        self.assertEqual(status, 0,  msg='Failed to suspends your system to RAM, output : %s' % output)
+        self.assertEqual(status, 0, msg='Failed to suspends your system to RAM, output : %s' % output)
     
     @skipIfQemu('qemuall', 'Test only runs on real hardware')
     @OETestDepends(['ssh.SSHTest.test_ssh'])
diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py
index 7c44abe8ed..668fc2a70e 100644
--- a/meta/lib/oeqa/runtime/cases/systemd.py
+++ b/meta/lib/oeqa/runtime/cases/systemd.py
@@ -39,11 +39,11 @@ class SystemdTest(OERuntimeTestCase):
         returned no entries
         """
 
-        query_units=''
+        query_units = ''
         if l_match_units:
-            query_units = ['_SYSTEMD_UNIT='+unit for unit in l_match_units]
+            query_units = ['_SYSTEMD_UNIT=' + unit for unit in l_match_units]
             query_units = ' '.join(query_units)
-        command = 'journalctl %s %s' %(args, query_units)
+        command = 'journalctl %s %s' % (args, query_units)
         status, output = self.target.run(command)
         if status:
             raise AssertionError("Command '%s' returned non-zero exit "
@@ -152,7 +152,7 @@ class SystemdJournalTests(SystemdTest):
         """
 
         # The expression chain that uniquely identifies the time boot message.
-        expr_items=['Startup finished', 'kernel', 'userspace','\.$']
+        expr_items = ['Startup finished', 'kernel', 'userspace','\.$']
         try:
             output = self.journalctl(args='-o cat --reverse')
         except AssertionError:
diff --git a/meta/lib/oeqa/runtime/cases/usb_hid.py b/meta/lib/oeqa/runtime/cases/usb_hid.py
index dbc8eada74..a42c856f6a 100644
--- a/meta/lib/oeqa/runtime/cases/usb_hid.py
+++ b/meta/lib/oeqa/runtime/cases/usb_hid.py
@@ -7,11 +7,11 @@ class USB_HID_Test(OERuntimeTestCase):
 
     def keyboard_mouse_simulation(self): 
         (status, output) = self.target.run('export DISPLAY=:0 && xdotool key F2 && xdotool mousemove 100 100')
-        return self.assertEqual(status, 0,  msg='Failed to simulate keyboard/mouse input event, output : %s' % output)
+        return self.assertEqual(status, 0, msg='Failed to simulate keyboard/mouse input event, output : %s' % output)
              
     def set_suspend(self): 
         (status, output) = self.target.run('sudo rtcwake -m mem -s 10')
-        return self.assertEqual(status, 0,  msg='Failed to suspends your system to RAM, output : %s' % output)
+        return self.assertEqual(status, 0, msg='Failed to suspends your system to RAM, output : %s' % output)
     
     @OEHasPackage(['xdotool'])
     @skipIfQemu('qemuall', 'Test only runs on real hardware')
diff --git a/meta/lib/oeqa/runtime/cases/weston.py b/meta/lib/oeqa/runtime/cases/weston.py
index b3a7c2776d..3456803adb 100644
--- a/meta/lib/oeqa/runtime/cases/weston.py
+++ b/meta/lib/oeqa/runtime/cases/weston.py
@@ -19,7 +19,7 @@ class WestonTest(OERuntimeTestCase):
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     @OEHasPackage(['weston'])
     def test_weston_running(self):
-        cmd ='%s | grep [w]eston-desktop-shell' % self.tc.target_cmds['ps']
+        cmd = '%s | grep [w]eston-desktop-shell' % self.tc.target_cmds['ps']
         status, output = self.target.run(cmd)
         msg = ('Weston does not appear to be running %s' %
               self.target.run(self.tc.target_cmds['ps'])[1])
@@ -42,7 +42,7 @@ class WestonTest(OERuntimeTestCase):
     def get_new_wayland_processes(self, existing_wl_processes):
         try_cnt = 0
         while try_cnt < 5:
-            time.sleep(5 + 5*try_cnt)
+            time.sleep(5 + 5 * try_cnt)
             try_cnt += 1
             wl_processes = self.get_processes_of('weston-desktop-shell', 'existing and new')
             new_wl_processes = [x for x in wl_processes if x not in existing_wl_processes]
diff --git a/meta/lib/oeqa/runtime/cases/xorg.py b/meta/lib/oeqa/runtime/cases/xorg.py
index d6845587c2..0bbef023d9 100644
--- a/meta/lib/oeqa/runtime/cases/xorg.py
+++ b/meta/lib/oeqa/runtime/cases/xorg.py
@@ -14,7 +14,7 @@ class XorgTest(OERuntimeTestCase):
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     @OEHasPackage(['xserver-nodm-init'])
     def test_xorg_running(self):
-        cmd ='%s | grep -v xinit | grep [X]org' % self.tc.target_cmds['ps']
+        cmd = '%s | grep -v xinit | grep [X]org' % self.tc.target_cmds['ps']
         status, output = self.target.run(cmd)
         msg = ('Xorg does not appear to be running %s' %
               self.target.run(self.tc.target_cmds['ps'])[1])
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py
index b1a705c776..b3cd7d0a5b 100644
--- a/meta/lib/oeqa/sdk/context.py
+++ b/meta/lib/oeqa/sdk/context.py
@@ -44,7 +44,7 @@ class OESDKTestContext(OETestContext):
             # match multilib according to sdk_env
             mls = self.td.get('MULTILIB_VARIANTS', '').split()
             for ml in mls:
-                if ('ml'+ml) in self.sdk_env:
+                if ('ml' + ml) in self.sdk_env:
                     pkg = ml + '-' + pkg
         return self._hasPackage(self.target_pkg_manifest, pkg, regex=regex)
 
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py
index 8c07d5e3b3..4567795027 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -93,7 +93,7 @@ class DevtoolTest(OESDKExtTestCase):
         try:
             self._run('devtool build %s ' % package_nodejs)
         finally:
-            self._run('devtool reset %s '% package_nodejs)
+            self._run('devtool reset %s ' % package_nodejs)
 
 class SdkUpdateTest(OESDKExtTestCase):
     @classmethod
diff --git a/meta/lib/oeqa/sdkext/testsdk.py b/meta/lib/oeqa/sdkext/testsdk.py
index ae4f55970c..963531dfc6 100644
--- a/meta/lib/oeqa/sdkext/testsdk.py
+++ b/meta/lib/oeqa/sdkext/testsdk.py
@@ -100,7 +100,7 @@ class TestSDKExt(TestSDKBase):
                 fail = True
 
             # Clean the workspace/sources to avoid `devtool add' failure because of non-empty source directory
-            bb.utils.remove(sdk_dir+'workspace/sources', True)
+            bb.utils.remove(sdk_dir + 'workspace/sources', True)
 
         if fail:
             bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index 4ff187ff8c..3d30618b97 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -134,7 +134,7 @@ class OESelftestTestCase(OETestCase):
             failed_extra_commands = []
             for command in self._extra_tear_down_commands:
                 result = runCmd(command, ignore_status=True)
-                if not result.status ==  0:
+                if not result.status == 0:
                     failed_extra_commands.append(command)
             if failed_extra_commands:
                 self.logger.warning("tearDown commands have failed: %s" % ', '.join(map(str, failed_extra_commands)))
diff --git a/meta/lib/oeqa/selftest/cases/archiver.py b/meta/lib/oeqa/selftest/cases/archiver.py
index 35b3ddb5fb..dce77281c9 100644
--- a/meta/lib/oeqa/selftest/cases/archiver.py
+++ b/meta/lib/oeqa/selftest/cases/archiver.py
@@ -135,7 +135,7 @@ class Archiver(OESelftestTestCase):
         target = 'selftest-ed-native'
 
         features = 'INHERIT += "archiver"\n'
-        features +=  'ARCHIVER_MODE[src] = "%s"\n' % (mode)
+        features += 'ARCHIVER_MODE[src] = "%s"\n' % (mode)
         if extra_config:
             features += extra_config
         self.write_config(features)
@@ -212,7 +212,7 @@ class Archiver(OESelftestTestCase):
         `ARCHIVER_MIRROR_EXCLUDE`.
         """
 
-        target='selftest-ed'
+        target = 'selftest-ed'
         target_file_name = 'ed-1.14.1.tar.lz'
 
         features = 'INHERIT += "archiver"\n'
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index 524d7b6828..30afc962c9 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -42,7 +42,7 @@ class BitbakeTests(OESelftestTestCase):
         result = bitbake('m4-native')
         find_build_started = re.search(r"NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Executing.*Tasks", result.output)
         find_build_completed = re.search(r"Tasks Summary:.*(\n.*)*NOTE: Test for bb\.event\.BuildCompleted", result.output)
-        self.assertTrue(find_build_started, msg="Match failed in:\n%s"  % result.output)
+        self.assertTrue(find_build_started, msg="Match failed in:\n%s" % result.output)
         self.assertTrue(find_build_completed, msg="Match failed in:\n%s" % result.output)
         self.assertNotIn('Test for bb.event.InvalidEvent', result.output)
 
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py
index 6621287696..dcc95e38ff 100644
--- a/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -68,7 +68,7 @@ class DiskMonTest(OESelftestTestCase):
         self.assertEqual(res.status, 1, msg="bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
         self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"\nBB_HEARTBEAT_EVENT = "1"')
         res = bitbake("delay -c delay")
-        self.assertTrue('WARNING: The free space' in res.output, msg="A warning should have been displayed for disk monitor is set to WARN: %s" %res.output)
+        self.assertTrue('WARNING: The free space' in res.output, msg="A warning should have been displayed for disk monitor is set to WARN: %s" % res.output)
 
 class SanityOptionsTest(OESelftestTestCase):
     def getline(self, res, line):
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 95142aeaa7..6c3b3cbb3e 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -88,7 +88,7 @@ class DevtoolBase(OESelftestTestCase):
         bb_vars = get_bb_vars(['TOPDIR', 'SSTATE_DIR'])
         cls.original_sstate = bb_vars['SSTATE_DIR']
         cls.devtool_sstate = os.path.join(bb_vars['TOPDIR'], 'sstate_devtool')
-        cls.sstate_conf  = 'SSTATE_DIR = "%s"\n' % cls.devtool_sstate
+        cls.sstate_conf = 'SSTATE_DIR = "%s"\n' % cls.devtool_sstate
         cls.sstate_conf += ('SSTATE_MIRRORS += "file://.* file:///%s/PATH"\n'
                             % cls.original_sstate)
 
@@ -667,7 +667,7 @@ class DevtoolModifyTests(DevtoolBase):
             self.assertIn('ERROR: ', result.output, 'devtool extract on %s should have given an ERROR' % testrecipe)
             # devtool modify should fail
             result = runCmd('devtool modify %s -x %s' % (testrecipe, os.path.join(tempdir, testrecipe)), ignore_status=True)
-            self.assertNotEqual(result.status, 0, 'devtool modify on %s should have failed. devtool output: %s' %  (testrecipe, result.output))
+            self.assertNotEqual(result.status, 0, 'devtool modify on %s should have failed. devtool output: %s' % (testrecipe, result.output))
             self.assertIn('ERROR: ', result.output, 'devtool modify on %s should have given an ERROR' % testrecipe)
 
     def test_devtool_modify_native(self):
diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py b/meta/lib/oeqa/selftest/cases/eSDK.py
index 862849af35..1d185935e4 100644
--- a/meta/lib/oeqa/selftest/cases/eSDK.py
+++ b/meta/lib/oeqa/selftest/cases/eSDK.py
@@ -62,7 +62,7 @@ class oeSDKExtSelfTest(OESelftestTestCase):
 
         cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', cls.tmpdir_eSDKQA)
 
-        sstate_config="""
+        sstate_config = """
 SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
 SSTATE_MIRRORS =  "file://.* file://%s/PATH"
 CORE_IMAGE_EXTRA_INSTALL = "perl"
@@ -90,7 +90,7 @@ CORE_IMAGE_EXTRA_INSTALL = "perl"
         cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', cls.tmpdir_eSDKQA)
 
         # Configure eSDK to use sstate mirror from poky
-        sstate_config="""
+        sstate_config = """
 SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
 SSTATE_MIRRORS =  "file://.* file://%s/PATH"
             """ % bb_vars["SSTATE_DIR"]
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py
index 67cae977d9..f485593f1d 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -80,7 +80,7 @@ FIT_DESC = "A model description"
                 if field_index == len(its_field_check):
                     break
                 if its_field_check[field_index] in line:
-                    field_index +=1
+                    field_index += 1
 
         if field_index != len(its_field_check): # if its equal, the test passed
             self.assertTrue(field_index == len(its_field_check),
@@ -307,7 +307,7 @@ FIT_SIGN_INDIVIDUAL = "1"
                 if field_index == len(its_field_check):
                     break
                 if its_field_check[field_index] in line:
-                    field_index +=1
+                    field_index += 1
 
         if field_index != len(its_field_check): # if its equal, the test passed
             self.assertTrue(field_index == len(its_field_check),
@@ -390,7 +390,7 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart U-Boot comment'"
                 if field_index == len(its_field_check):
                     break
                 if its_field_check[field_index] in line:
-                    field_index +=1
+                    field_index += 1
 
         if field_index != len(its_field_check): # if its equal, the test passed
             self.assertTrue(field_index == len(its_field_check),
@@ -776,7 +776,7 @@ FIT_HASH_ALG = "sha256"
             'load = <' + kernel_load + '>;',
             'entry = <' + kernel_entry + '>;',
             'hash-1 {',
-            'algo = "' + fit_hash_alg +'";',
+            'algo = "' + fit_hash_alg + '";',
             '};',
             '};'
         ]
@@ -803,7 +803,7 @@ FIT_HASH_ALG = "sha256"
             line_idx = cfg_start_idx + 2
             node_end = False
             while node_end == False:
-                if its_lines[line_idx] == "};" and its_lines[line_idx-1] == "};":
+                if its_lines[line_idx] == "};" and its_lines[line_idx - 1] == "};":
                     node_end = True
                 line_idx = line_idx + 1
 
diff --git a/meta/lib/oeqa/selftest/cases/gotoolchain.py b/meta/lib/oeqa/selftest/cases/gotoolchain.py
index 4fc3605f42..388363bfb8 100644
--- a/meta/lib/oeqa/selftest/cases/gotoolchain.py
+++ b/meta/lib/oeqa/selftest/cases/gotoolchain.py
@@ -61,7 +61,7 @@ class oeGoToolchainSelfTest(OESelftestTestCase):
         url = "https://%s/%s/archive/%s%s" % (proj, name, ver, archive)
 
         runCmd("cd %s; wget %s" % (self.tmpdir_SDKQA, url))
-        runCmd("cd %s; tar -xf %s" % (self.tmpdir_SDKQA, ver+archive))
+        runCmd("cd %s; tar -xf %s" % (self.tmpdir_SDKQA, ver + archive))
         runCmd("mkdir -p %s/src/%s" % (self.go_path, proj))
         runCmd("mv %s/direnv-2.27.0 %s/src/%s/%s"
                % (self.tmpdir_SDKQA, self.go_path, proj, name))
diff --git a/meta/lib/oeqa/selftest/cases/image_typedep.py b/meta/lib/oeqa/selftest/cases/image_typedep.py
index 52e1080f13..269fd556b7 100644
--- a/meta/lib/oeqa/selftest/cases/image_typedep.py
+++ b/meta/lib/oeqa/selftest/cases/image_typedep.py
@@ -44,7 +44,7 @@ inherit image
         bitbake('-g emptytest')
 
         taskdependsfile = os.path.join(self.builddir, 'task-depends.dot')
-        dep =  dep + ".do_populate_sysroot"
+        dep = dep + ".do_populate_sysroot"
         depfound = False
         expectedline = '"emptytest.do_rootfs" -> "{}"'.format(dep)
 
diff --git a/meta/lib/oeqa/selftest/cases/manifest.py b/meta/lib/oeqa/selftest/cases/manifest.py
index b5505fa60e..56c8129a06 100644
--- a/meta/lib/oeqa/selftest/cases/manifest.py
+++ b/meta/lib/oeqa/selftest/cases/manifest.py
@@ -81,7 +81,7 @@ class VerifyManifest(OESelftestTestCase):
         pkgdata_dir = reverse_dir = {}
         mfilename = mpath = m_entry = {}
         # get manifest location based on target to query about
-        d_target= dict(target=self.buildtarget,
+        d_target = dict(target=self.buildtarget,
                          host='nativesdk-packagegroup-sdk-host')
         try:
             mdir = self.get_dir_from_bb_var('SDK_DEPLOY', self.buildtarget)
@@ -120,7 +120,7 @@ class VerifyManifest(OESelftestTestCase):
             if m_entry[k].missing:
                 msg = '{}: {} Error has the following missing entries'\
                         .format(self.classname, m_entry[k].file)
-                logmsg = msg+':\n'+'\n'.join(m_entry[k].missing)
+                logmsg = msg + ':\n' + '\n'.join(m_entry[k].missing)
                 self.logger.debug(logmsg)
                 self.logger.info(msg)
                 self.fail(logmsg)
@@ -160,7 +160,7 @@ class VerifyManifest(OESelftestTestCase):
         if m_entry.missing:
             msg = '{}: {} Error has the following missing entries'\
                     .format(self.classname, m_entry.file)
-            logmsg = msg+':\n'+'\n'.join(m_entry.missing)
+            logmsg = msg + ':\n' + '\n'.join(m_entry.missing)
             self.logger.debug(logmsg)
             self.logger.info(msg)
             self.fail(logmsg)
diff --git a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
index e0bfd44f4e..05c3268f3e 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
@@ -81,7 +81,7 @@ class TestBlobParsing(OESelftestTestCase):
         Test default values for comparisson of git blob dictionaries
         """
         from oe.buildhistory_analysis import compare_dict_blobs
-        defaultmap = {x: ("default", "1")  for x in ["PKG", "PKGE", "PKGV", "PKGR"]}
+        defaultmap = {x: ("default", "1") for x in ["PKG", "PKGE", "PKGV", "PKGR"]}
 
         self.commit_vars(to_add={"foo": "1"})
         blob1 = self.repo.heads.master.commit.tree.blobs[0]
diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py b/meta/lib/oeqa/selftest/cases/oelib/path.py
index e5d36513fb..5cfacfbd35 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/path.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
@@ -14,32 +14,32 @@ class TestRealPath(TestCase):
     DIRS = ["a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX", "usr/sbin", "usr/include", "usr/include/gdbm"]
     FILES = ["etc/passwd", "b/file"]
     LINKS = [
-        ("bin",             "/usr/bin",             "/usr/bin"),
-        ("binX",            "usr/binX",             "/usr/binX"),
-        ("c",               "broken",               "/broken"),
-        ("etc/passwd-1",    "passwd",               "/etc/passwd"),
-        ("etc/passwd-2",    "passwd-1",             "/etc/passwd"),
-        ("etc/passwd-3",    "/etc/passwd-1",        "/etc/passwd"),
-        ("etc/shadow-1",    "/etc/shadow",          "/etc/shadow"),
-        ("etc/shadow-2",    "/etc/shadow-1",        "/etc/shadow"),
-        ("prog-A",          "bin/prog-A",           "/usr/bin/prog-A"),
-        ("prog-B",          "/bin/prog-B",          "/usr/bin/prog-B"),
-        ("usr/bin/prog-C",  "../../sbin/prog-C",    "/sbin/prog-C"),
-        ("usr/bin/prog-D",  "/sbin/prog-D",         "/sbin/prog-D"),
-        ("usr/binX/prog-E", "../sbin/prog-E",       None),
-        ("usr/bin/prog-F",  "../../../sbin/prog-F", "/sbin/prog-F"),
-        ("loop",            "a/loop",               None),
-        ("a/loop",          "../loop",              None),
-        ("b/test",          "file/foo",             "/b/file/foo"),
+        ("bin", "/usr/bin", "/usr/bin"),
+        ("binX", "usr/binX", "/usr/binX"),
+        ("c", "broken", "/broken"),
+        ("etc/passwd-1", "passwd", "/etc/passwd"),
+        ("etc/passwd-2", "passwd-1", "/etc/passwd"),
+        ("etc/passwd-3", "/etc/passwd-1", "/etc/passwd"),
+        ("etc/shadow-1", "/etc/shadow", "/etc/shadow"),
+        ("etc/shadow-2", "/etc/shadow-1", "/etc/shadow"),
+        ("prog-A", "bin/prog-A", "/usr/bin/prog-A"),
+        ("prog-B", "/bin/prog-B", "/usr/bin/prog-B"),
+        ("usr/bin/prog-C", "../../sbin/prog-C", "/sbin/prog-C"),
+        ("usr/bin/prog-D", "/sbin/prog-D", "/sbin/prog-D"),
+        ("usr/binX/prog-E", "../sbin/prog-E", None),
+        ("usr/bin/prog-F", "../../../sbin/prog-F", "/sbin/prog-F"),
+        ("loop", "a/loop", None),
+        ("a/loop", "../loop", None),
+        ("b/test", "file/foo", "/b/file/foo"),
     ]
 
     LINKS_PHYS = [
-        ("./",          "/",                ""),
+        ("./", "/", ""),
         ("binX/prog-E", "/usr/sbin/prog-E", "/sbin/prog-E"),
     ]
 
     EXCEPTIONS = [
-        ("loop",   errno.ELOOP),
+        ("loop", errno.ELOOP),
         ("b/test", errno.ENOENT),
     ]
 
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
index 8a10ff357b..59784bbc67 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -130,7 +130,7 @@ class OeRunNativeTest(OESelftestTestCase):
 
 class OEListPackageconfigTests(OEScriptTests):
     #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags
-    def check_endlines(self, results,  expected_endlines): 
+    def check_endlines(self, results, expected_endlines): 
         for line in results.output.splitlines():
             for el in expected_endlines:
                 if line.split() == el.split():
diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
index e837daf8b1..fb8b412848 100644
--- a/meta/lib/oeqa/selftest/cases/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -128,15 +128,15 @@ class OePkgdataUtilTests(OESelftestTestCase):
         # Test recipe-space package name
         result = runCmd('oe-pkgdata-util list-pkg-files zlib-dev zlib-doc')
         files = splitoutput(result.output)
-        self.assertIn('zlib-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('zlib-doc', list(files.keys()), "listed pkgs. files: %s" %result.output)
+        self.assertIn('zlib-dev', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('zlib-doc', list(files.keys()), "listed pkgs. files: %s" % result.output)
         self.assertIn(os.path.join(includedir, 'zlib.h'), files['zlib-dev'])
         self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['zlib-doc'])
         # Test runtime package name
         result = runCmd('oe-pkgdata-util list-pkg-files -r libz1 libz-dev')
         files = splitoutput(result.output)
-        self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
+        self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" % result.output)
         self.assertGreater(len(files['libz1']), 1)
         libspec = os.path.join(base_libdir, 'libz.so.1.*')
         found = False
@@ -149,12 +149,12 @@ class OePkgdataUtilTests(OESelftestTestCase):
         # Test recipe
         result = runCmd('oe-pkgdata-util list-pkg-files -p zlib')
         files = splitoutput(result.output)
-        self.assertIn('zlib-dbg', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('zlib-doc', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('zlib-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('zlib-staticdev', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('zlib', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertNotIn('zlib-locale', list(files.keys()), "listed pkgs. files: %s" %result.output)
+        self.assertIn('zlib-dbg', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('zlib-doc', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('zlib-dev', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('zlib-staticdev', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('zlib', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertNotIn('zlib-locale', list(files.keys()), "listed pkgs. files: %s" % result.output)
         # (ignore ptest, might not be there depending on config)
         self.assertIn(os.path.join(includedir, 'zlib.h'), files['zlib-dev'])
         self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['zlib-doc'])
@@ -162,36 +162,36 @@ class OePkgdataUtilTests(OESelftestTestCase):
         # Test recipe, runtime
         result = runCmd('oe-pkgdata-util list-pkg-files -p zlib -r')
         files = splitoutput(result.output)
-        self.assertIn('libz-dbg', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('libz-doc', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('libz-staticdev', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertNotIn('libz-locale', list(files.keys()), "listed pkgs. files: %s" %result.output)
+        self.assertIn('libz-dbg', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('libz-doc', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('libz-staticdev', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertNotIn('libz-locale', list(files.keys()), "listed pkgs. files: %s" % result.output)
         self.assertIn(os.path.join(includedir, 'zlib.h'), files['libz-dev'])
         self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['libz-doc'])
         self.assertIn(os.path.join(libdir, 'libz.a'), files['libz-staticdev'])
         # Test recipe, unpackaged
         result = runCmd('oe-pkgdata-util list-pkg-files -p zlib -u')
         files = splitoutput(result.output)
-        self.assertIn('zlib-dbg', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('zlib-doc', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('zlib-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('zlib-staticdev', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('zlib', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('zlib-locale', list(files.keys()), "listed pkgs. files: %s" %result.output) # this is the key one
+        self.assertIn('zlib-dbg', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('zlib-doc', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('zlib-dev', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('zlib-staticdev', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('zlib', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('zlib-locale', list(files.keys()), "listed pkgs. files: %s" % result.output) # this is the key one
         self.assertIn(os.path.join(includedir, 'zlib.h'), files['zlib-dev'])
         self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['zlib-doc'])
         self.assertIn(os.path.join(libdir, 'libz.a'), files['zlib-staticdev'])
         # Test recipe, runtime, unpackaged
         result = runCmd('oe-pkgdata-util list-pkg-files -p zlib -r -u')
         files = splitoutput(result.output)
-        self.assertIn('libz-dbg', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('libz-doc', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('libz-staticdev', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" %result.output)
-        self.assertIn('libz-locale', list(files.keys()), "listed pkgs. files: %s" %result.output) # this is the key one
+        self.assertIn('libz-dbg', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('libz-doc', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('libz-staticdev', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" % result.output)
+        self.assertIn('libz-locale', list(files.keys()), "listed pkgs. files: %s" % result.output) # this is the key one
         self.assertIn(os.path.join(includedir, 'zlib.h'), files['libz-dev'])
         self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['libz-doc'])
         self.assertIn(os.path.join(libdir, 'libz.a'), files['libz-staticdev'])
diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py
index da22f77b27..b7656296f2 100644
--- a/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -21,7 +21,7 @@ class RunqemuTests(OESelftestTestCase):
     def setUpLocal(self):
         super(RunqemuTests, self).setUpLocal()
         self.recipe = 'core-image-minimal'
-        self.machine =  'qemux86-64'
+        self.machine = 'qemux86-64'
         self.fstypes = "ext4 iso hddimg wic.vmdk wic.qcow2 wic.vdi"
         self.cmd_common = "runqemu nographic"
 
@@ -155,8 +155,8 @@ class QemuTest(OESelftestTestCase):
     def setUpClass(cls):
         super(QemuTest, cls).setUpClass()
         cls.recipe = 'core-image-minimal'
-        cls.machine =  get_bb_var('MACHINE')
-        cls.deploy_dir_image =  get_bb_var('DEPLOY_DIR_IMAGE')
+        cls.machine = get_bb_var('MACHINE')
+        cls.deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
         cls.cmd_common = "runqemu nographic"
         cls.qemuboot_conf = "%s-%s.qemuboot.conf" % (cls.recipe, cls.machine)
         cls.qemuboot_conf = os.path.join(cls.deploy_dir_image, cls.qemuboot_conf)
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 54a80dfdc0..332e0de41f 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -216,7 +216,7 @@ class TestImage(OESelftestTestCase):
         try:
             content = os.listdir("/dev/dri")
             if len([i for i in content if i.startswith('render')]) == 0:
-                self.skipTest("No render nodes found in /dev/dri: %s" %(content))
+                self.skipTest("No render nodes found in /dev/dri: %s" % (content))
         except FileNotFoundError:
             self.skipTest("/dev/dri directory does not exist; no render nodes available on this machine.")
         try:
@@ -345,7 +345,7 @@ class Postinst(OESelftestTestCase):
                 self.write_config(features)
                 bb_result = bitbake('core-image-minimal', ignore_status=True)
                 self.assertGreaterEqual(bb_result.output.find("Postinstall scriptlets of ['postinst-rootfs-failing'] have failed."), 0,
-                    "Warning about a failed scriptlet not found in bitbake output: %s" %(bb_result.output))
+                    "Warning about a failed scriptlet not found in bitbake output: %s" % (bb_result.output))
 
                 self.assertTrue(os.path.isfile(os.path.join(hosttestdir, "rootfs-before-failure")),
                                     "rootfs-before-failure file was not created")
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 3159eb3a3c..d428462e9c 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -58,7 +58,7 @@ class SStateTests(SStateBase):
     def run_test_sstate_creation(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True, should_pass=True):
         self.config_sstate(temp_sstate_location, [self.sstate_path])
 
-        if  self.temp_sstate_location:
+        if self.temp_sstate_location:
             bitbake(['-cclean'] + targets)
         else:
             bitbake(['-ccleansstate'] + targets)
@@ -80,10 +80,10 @@ class SStateTests(SStateBase):
             self.assertTrue(not file_tracker, msg="Found sstate files in the wrong place for: %s (found %s)" % (', '.join(map(str, targets)), str(file_tracker)))
 
     def test_sstate_creation_distro_specific_pass(self):
-        self.run_test_sstate_creation(['binutils-cross-'+ self.tune_arch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
+        self.run_test_sstate_creation(['binutils-cross-' + self.tune_arch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
 
     def test_sstate_creation_distro_specific_fail(self):
-        self.run_test_sstate_creation(['binutils-cross-'+ self.tune_arch, 'binutils-native'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True, should_pass=False)
+        self.run_test_sstate_creation(['binutils-cross-' + self.tune_arch, 'binutils-native'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True, should_pass=False)
 
     def test_sstate_creation_distro_nonspecific_pass(self):
         self.run_test_sstate_creation(['linux-libc-headers'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
@@ -109,7 +109,7 @@ class SStateTests(SStateBase):
         self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_removed)))
 
     def test_cleansstate_task_distro_specific_nonspecific(self):
-        targets = ['binutils-cross-'+ self.tune_arch, 'binutils-native']
+        targets = ['binutils-cross-' + self.tune_arch, 'binutils-native']
         targets.append('linux-libc-headers')
         self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
 
@@ -117,7 +117,7 @@ class SStateTests(SStateBase):
         self.run_test_cleansstate_task(['linux-libc-headers'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
 
     def test_cleansstate_task_distro_specific(self):
-        targets = ['binutils-cross-'+ self.tune_arch, 'binutils-native']
+        targets = ['binutils-cross-' + self.tune_arch, 'binutils-native']
         targets.append('linux-libc-headers')
         self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
 
@@ -211,7 +211,7 @@ class SStateTests(SStateBase):
         target_config = []
         global_config.append('')
         target_config.append('PR = "0"')
-        self.run_test_sstate_cache_management_script('m4', global_config,  target_config, ignore_patterns=['populate_lic'])
+        self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
 
     def test_sstate_cache_management_script_using_pr_2(self):
         global_config = []
@@ -220,7 +220,7 @@ class SStateTests(SStateBase):
         target_config.append('PR = "0"')
         global_config.append('')
         target_config.append('PR = "1"')
-        self.run_test_sstate_cache_management_script('m4', global_config,  target_config, ignore_patterns=['populate_lic'])
+        self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
 
     def test_sstate_cache_management_script_using_pr_3(self):
         global_config = []
@@ -231,7 +231,7 @@ class SStateTests(SStateBase):
         target_config.append('PR = "1"')
         global_config.append('MACHINE = "qemux86"')
         target_config.append('PR = "1"')
-        self.run_test_sstate_cache_management_script('m4', global_config,  target_config, ignore_patterns=['populate_lic'])
+        self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
 
     def test_sstate_cache_management_script_using_machine(self):
         global_config = []
@@ -240,7 +240,7 @@ class SStateTests(SStateBase):
         target_config.append('')
         global_config.append('MACHINE = "qemux86"')
         target_config.append('')
-        self.run_test_sstate_cache_management_script('m4', global_config,  target_config, ignore_patterns=['populate_lic'])
+        self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
 
     def test_sstate_32_64_same_hash(self):
         """
diff --git a/meta/lib/oeqa/selftest/cases/sysroot.py b/meta/lib/oeqa/selftest/cases/sysroot.py
index 6e34927c90..c884488025 100644
--- a/meta/lib/oeqa/selftest/cases/sysroot.py
+++ b/meta/lib/oeqa/selftest/cases/sysroot.py
@@ -5,7 +5,7 @@
 import uuid
 
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import  bitbake
+from oeqa.utils.commands import bitbake
 
 class SysrootTests(OESelftestTestCase):
     def test_sysroot_cleanup(self):
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 9be2d2c39c..72c25c634f 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -424,7 +424,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
 
             for part in [1, 2, 3]:
                 part_file = os.path.join(self.resultdir, "selftest_img.part%d" % part)
-                partln = partlns[part-1].split(":")
+                partln = partlns[part - 1].split(":")
                 self.assertEqual(7, len(partln))
                 start = int(partln[1].rstrip("B")) / 512
                 length = int(partln[3].rstrip("B")) / 512
@@ -1133,7 +1133,7 @@ class Wic2(WicTestCase):
         """Test sparse_copy with FIEMAP and SEEK_HOLE filemap APIs"""
         libpath = os.path.join(get_bb_var('COREBASE'), 'scripts', 'lib', 'wic')
         sys.path.insert(0, libpath)
-        from  filemap import FilemapFiemap, FilemapSeek, sparse_copy, ErrorNotSupp
+        from filemap import FilemapFiemap, FilemapSeek, sparse_copy, ErrorNotSupp
         with NamedTemporaryFile("w", suffix=".wic-sparse") as sparse:
             src_name = sparse.name
             src_size = 1024 * 10
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index 1b5546d273..21c5004ad7 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -279,7 +279,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
                 meta_selftestdir = os.path.join(
                     self.tc.td["BBLAYERS_FETCH_DIR"], 'meta-selftest')
                 if os.path.isdir(meta_selftestdir):
-                    runCmd("bitbake-layers add-layer %s" %meta_selftestdir)
+                    runCmd("bitbake-layers add-layer %s" % meta_selftestdir)
                     # reload data is needed because a meta-selftest layer was add
                     self.tc.td = get_bb_vars()
                     self.tc.config_paths['testlayer_path'] = get_test_layer()
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 047f5d16c7..49c9f5ad92 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -42,7 +42,7 @@ class BaseTarget(object, metaclass=ABCMeta):
         if os.path.islink(sshloglink):
             os.unlink(sshloglink)
         os.symlink(self.sshlog, sshloglink)
-        self.logger.info("SSH log file: %s" %  self.sshlog)
+        self.logger.info("SSH log file: %s" % self.sshlog)
 
     @abstractmethod
     def start(self, params=None, ssh=True, extra_bootparams=None):
@@ -104,7 +104,7 @@ class QemuTarget(BaseTarget):
 
         if d.getVar('FIND_ROOTFS') == '1':
             self.image_fstype = image_fstype or self.get_image_fstype(d)
-            self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"),  d.getVar("IMAGE_LINK_NAME") + '.' + self.image_fstype)
+            self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("IMAGE_LINK_NAME") + '.' + self.image_fstype)
             self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
         self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime)
         dump_target_cmds = d.getVar("testimage_dump_target")
@@ -161,7 +161,7 @@ class QemuTarget(BaseTarget):
             os.unlink(qemuloglink)
         os.symlink(self.qemulog, qemuloglink)
 
-        self.logger.info("rootfs file: %s" %  self.rootfs)
+        self.logger.info("rootfs file: %s" % self.rootfs)
         self.logger.info("Qemu log file: %s" % self.qemulog)
         super(QemuTarget, self).deploy()
 
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index aabf4110cb..d97faefcab 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -125,8 +125,8 @@ def LogResults(original_class):
     from time import strftime, gmtime
     caller = os.path.basename(sys.argv[0])
     timestamp = strftime('%Y%m%d%H%M%S',gmtime())
-    logfile = os.path.join(os.getcwd(),'results-'+caller+'.'+timestamp+'.log')
-    linkfile = os.path.join(os.getcwd(),'results-'+caller+'.log')
+    logfile = os.path.join(os.getcwd(),'results-' + caller + '.' + timestamp + '.log')
+    linkfile = os.path.join(os.getcwd(),'results-' + caller + '.log')
 
     def get_class_that_defined_method(meth):
         if inspect.ismethod(meth):
@@ -177,20 +177,20 @@ def LogResults(original_class):
         tcid = self.id()
         for (name, msg) in result.errors:
             if tcid == name.id():
-                local_log.results("Testcase "+str(test_case)+": ERROR")
-                local_log.results("Testcase "+str(test_case)+":\n"+msg)
+                local_log.results("Testcase " + str(test_case) + ": ERROR")
+                local_log.results("Testcase " + str(test_case) + ":\n" + msg)
                 passed = False
         for (name, msg) in result.failures:
             if tcid == name.id():
-                local_log.results("Testcase "+str(test_case)+": FAILED")
-                local_log.results("Testcase "+str(test_case)+":\n"+msg)
+                local_log.results("Testcase " + str(test_case) + ": FAILED")
+                local_log.results("Testcase " + str(test_case) + ":\n" + msg)
                 passed = False
         for (name, msg) in result.skipped:
             if tcid == name.id():
-                local_log.results("Testcase "+str(test_case)+": SKIPPED")
+                local_log.results("Testcase " + str(test_case) + ": SKIPPED")
                 passed = False
         if passed:
-            local_log.results("Testcase "+str(test_case)+": PASSED")
+            local_log.results("Testcase " + str(test_case) + ": PASSED")
 
         # XXX: In order to avoid race condition when test if exists the linkfile
         # use bb.utils.lock, the best solution is to create a unique name for the
diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py
index 6e8040eb5c..271f42770c 100644
--- a/meta/lib/oeqa/utils/gitarchive.py
+++ b/meta/lib/oeqa/utils/gitarchive.py
@@ -123,7 +123,7 @@ def expand_tag_strings(repo, name_pattern, msg_subj_pattern, msg_body_pattern,
                 keyws['tag_number'] = int(match.group('tag_number')) + 1
 
     tag_name = format_str(name_pattern, keyws)
-    msg_subj= format_str(msg_subj_pattern.strip(), keyws)
+    msg_subj = format_str(msg_subj_pattern.strip(), keyws)
     msg_body = format_str(msg_body_pattern, keyws)
     return tag_name, msg_subj + '\n\n' + msg_body
 
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 96355fbfc3..2d7b1122d4 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -26,7 +26,7 @@ from collections import defaultdict
 import importlib
 
 # Get Unicode non printable control chars
-control_range = list(range(0,32))+list(range(127,160))
+control_range = list(range(0,32)) + list(range(127,160))
 control_chars = [chr(x) for x in control_range
                 if chr(x) not in string.printable]
 re_control_char = re.compile('[%s]' % re.escape("".join(control_chars)))
@@ -228,7 +228,7 @@ class QemuRunner:
         self.origchldhandler = signal.getsignal(signal.SIGCHLD)
         signal.signal(signal.SIGCHLD, self.handleSIGCHLD)
 
-        self.logger.debug('launchcmd=%s'%(launch_cmd))
+        self.logger.debug('launchcmd=%s' % (launch_cmd))
 
         # FIXME: We pass in stdin=subprocess.PIPE here to work around stty
         # blocking at the end of the runqemu script when using this within
@@ -402,7 +402,7 @@ class QemuRunner:
             except (IndexError, ValueError):
                 # Try to get network configuration from runqemu output
                 match = re.match(r'.*Network configuration: (?:ip=)*([0-9.]+)::([0-9.]+):([0-9.]+)$.*',
-                                 out, re.MULTILINE|re.DOTALL)
+                                 out, re.MULTILINE | re.DOTALL)
                 if match:
                     self.ip, self.server_ip, self.netmask = match.groups()
                     # network configuration is required as we couldn't get it
@@ -641,13 +641,13 @@ class QemuRunner:
                 status = 1
             else:
                 # Remove first line (command line) and last line (prompt)
-                data = data[data.find('$?\r\n')+4:data.rfind('\r\n')]
+                data = data[data.find('$?\r\n') + 4:data.rfind('\r\n')]
                 index = data.rfind('\r\n')
                 if index == -1:
                     status_cmd = data
                     data = ""
                 else:
-                    status_cmd = data[index+2:]
+                    status_cmd = data[index + 2:]
                     data = data[:index]
                 if (status_cmd == "0"):
                     status = 1
diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py
index be82a7947a..1807f92320 100644
--- a/meta/lib/oeqa/utils/qemutinyrunner.py
+++ b/meta/lib/oeqa/utils/qemutinyrunner.py
@@ -115,12 +115,12 @@ class QemuTinyRunner(QemuRunner):
         return self.is_alive()
 
     def run_serial(self, command, timeout=60):
-        self.server_socket.sendall(command+'\n')
+        self.server_socket.sendall(command + '\n')
         data = ''
         status = 0
         stopread = False
-        endtime = time.time()+timeout
-        while time.time()<endtime and not stopread:
+        endtime = time.time() + timeout
+        while time.time() < endtime and not stopread:
                 try:
                         sread, _, _ = select.select([self.server_socket],[],[],1)
                 except InterruptedError:
diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py
index 8fc6748e23..0221bbee67 100644
--- a/meta/lib/oeqa/utils/testexport.py
+++ b/meta/lib/oeqa/utils/testexport.py
@@ -104,7 +104,7 @@ def process_binaries(d, params):
             else: # nothing to do here; running tests under bitbake, so we asume native binaries are in sysroots dir.
                 if param_list[1] or param_list[4]:
                     bb.warn("Native binary %s %s%s. Running tests under bitbake environment. Version can't be checked except when the test itself does it"
-                            " and binary can't be removed."%(param_list[0],"has assigned ver. " + param_list[1] if param_list[1] else "",
+                            " and binary can't be removed." % (param_list[0],"has assigned ver. " + param_list[1] if param_list[1] else "",
                             ", is marked for removal" if param_list[4] else ""))
         else:# the package is target aka DUT intended and it is either required to be delivered in an extracted form or in a packaged version
             target_rpm_file_list = [item for item in os.listdir(arch_rpm_dir) if re.search(param_list[0] + "-([0-9]+\.*)", item)]
@@ -237,7 +237,7 @@ def send_bin_to_DUT(d,params):
     def send_rpm(remote_path): # if it is not required to have an extracted binary, but to send an .rpm file
         rpm_to_send = ""
         for item in os.listdir(arch_rpms_dir):
-            if param_list[1] and re.match("%s-%s-.*rpm"%(param_list[0], param_list[1]), item):
+            if param_list[1] and re.match("%s-%s-.*rpm" % (param_list[0], param_list[1]), item):
                 rpm_to_send = item
                 break
             elif re.match("%s-[0-9]+\.[0-9]+-.*rpm" % param_list[0], item):
@@ -249,7 +249,7 @@ def send_bin_to_DUT(d,params):
             return
         (status, output) = oeRuntimeTest.tc.target.copy_to(os.path.join(arch_rpms_dir, rpm_to_send), remote_path)
         if status != 0:
-                bb.warn("Failed to copy %s on the remote target: %s" %(param_list[0], d.getVar("MACHINE")))
+                bb.warn("Failed to copy %s on the remote target: %s" % (param_list[0], d.getVar("MACHINE")))
                 return
         if param_list[4] == "rm":
             cleanup_list.append(os.path.join(remote_path, rpm_to_send))
diff --git a/meta/recipes-core/glibc/glibc/check-test-wrapper b/meta/recipes-core/glibc/glibc/check-test-wrapper
index 820d4732da..d1c328d318 100644
--- a/meta/recipes-core/glibc/glibc/check-test-wrapper
+++ b/meta/recipes-core/glibc/glibc/check-test-wrapper
@@ -50,7 +50,7 @@ if targettype == "user":
     # tests e.g. nptl/tst-pthread-timedlock-lockloop
     # Cap at 8GB since no test should need more than that
     # (5GB adds 7 failures for qemuarm glibc test run)
-    limit = 8*1024*1024*1024
+    limit = 8 * 1024 * 1024 * 1024
     resource.setrlimit(resource.RLIMIT_AS, (limit, limit))
 
 elif targettype == "ssh":
diff --git a/meta/recipes-devtools/python/python3/check_build_completeness.py b/meta/recipes-devtools/python/python3/check_build_completeness.py
index a1eace3f57..0f7da37d25 100755
--- a/meta/recipes-devtools/python/python3/check_build_completeness.py
+++ b/meta/recipes-devtools/python/python3/check_build_completeness.py
@@ -5,12 +5,12 @@ logfile = open(sys.argv[1]).read()
 necessary_bits = logfile.find("The necessary bits to build these optional modules were not found")
 to_find_bits = logfile.find("To find the necessary bits, look in setup.py in detect_modules() for the module's name.")
 if necessary_bits != -1:
-    print("%s" %(logfile[necessary_bits:to_find_bits]))
+    print("%s" % (logfile[necessary_bits:to_find_bits]))
 
 failed_to_build = logfile.find("Failed to build these modules:")
 if failed_to_build != -1:
     failed_to_build_end = logfile.find("\n\n", failed_to_build)
-    print("%s" %(logfile[failed_to_build:failed_to_build_end]))
+    print("%s" % (logfile[failed_to_build:failed_to_build_end]))
 
 if necessary_bits != -1 or failed_to_build != -1:
     sys.exit(1)
diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py
index 3dee1f71b7..f172555504 100644
--- a/meta/recipes-devtools/python/python3/create_manifest3.py
+++ b/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -57,7 +57,7 @@ pyversion = str(sys.argv[1])
 pivot = 'recipe-sysroot-native'
 for p in sys.path:
     if pivot in p:
-        nativelibfolder = p[:p.find(pivot)+len(pivot)]
+        nativelibfolder = p[:p.find(pivot) + len(pivot)]
 
 # Empty dict to hold the whole manifest
 new_manifest = collections.OrderedDict()
@@ -72,7 +72,7 @@ allfolders = []
 
 def isFolder(value):
     value = value.replace('${PYTHON_MAJMIN}',pyversion)
-    if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
+    if os.path.isdir(value.replace('${libdir}',nativelibfolder + '/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder + '/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder + '/usr/lib32')):
         return True
     else:
         return False
@@ -98,7 +98,7 @@ def print_indent(msg, offset):
 # Read existing JSON manifest
 with open('python3-manifest.json') as manifest:
     # The JSON format doesn't allow comments so we hack the call to keep the comments using a marker
-    manifest_str =  manifest.read()
+    manifest_str = manifest.read()
     json_start = manifest_str.find('# EOC') + 6 # EOC + \n
     manifest.seek(0)
     comments = manifest.read(json_start)
diff --git a/meta/recipes-devtools/python/python3/get_module_deps3.py b/meta/recipes-devtools/python/python3/get_module_deps3.py
index 53acc8cd71..2a6e7f7bd9 100644
--- a/meta/recipes-devtools/python/python3/get_module_deps3.py
+++ b/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -29,7 +29,7 @@ def fix_path(dep_path):
     import os
     # We DONT want the path on our HOST system
     pivot = 'recipe-sysroot-native'
-    dep_path = dep_path[dep_path.find(pivot)+len(pivot):]
+    dep_path = dep_path[dep_path.find(pivot) + len(pivot):]
 
     if '/usr/bin' in dep_path:
         dep_path = dep_path.replace('/usr/bin''${bindir}')
@@ -44,12 +44,12 @@ def fix_path(dep_path):
     if '/usr/include' in dep_path:
         dep_path = dep_path.replace('/usr/include','${includedir}')
     if '__init__.' in dep_path:
-        dep_path =  os.path.split(dep_path)[0]
+        dep_path = os.path.split(dep_path)[0]
     return dep_path
 
 
 # Module to import was passed as an argument
-current_module =  str(sys.argv[1]).rstrip()
+current_module = str(sys.argv[1]).rstrip()
 if debug == True:
     log = open('temp/log_%s' % current_module.strip('.*'),'w')
     log.write('Module %s generated the following dependencies:\n' % current_module)
@@ -80,7 +80,7 @@ if current_module == 'python-core-package':
     dif = core_deps
 else:
     # We know this is not the core package, so there must be a difference.
-    dif = module_deps-core_deps
+    dif = module_deps - core_deps
 
 
 # Check where each dependency came from
@@ -105,7 +105,7 @@ for item in dif:
         # Deals with NameError: name 'dep_path' is not defined
         # because module is not found (wasn't compiled?), e.g. bddsm
         if debug == True:
-            log.write(item+' ') 
+            log.write(item + ' ') 
             log.write(str(e))                                              
         pass
 
@@ -136,7 +136,7 @@ for item in dif:
         dep_path = dep_path.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*")
 
     if debug == True:
-        log.write(dep_path+'\n')
+        log.write(dep_path + '\n')
     # Prints out result, which is what will be used by create_manifest
     print(dep_path)
 
@@ -158,7 +158,7 @@ for item in dif:
     except NameError as e:
         # Deals with NameError: name 'cached' is not defined
         if debug == True:
-            log.write(item+' ') 
+            log.write(item + ' ') 
             log.write(str(e))                                              
         pass
     if cached is not None:
diff --git a/meta/recipes-kernel/perf/perf/sort-pmuevents.py b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
index c4d25e7f9f..be25d4982d 100755
--- a/meta/recipes-kernel/perf/perf/sort-pmuevents.py
+++ b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
@@ -37,7 +37,7 @@ preamble_regex = re.compile('^(.*?)^struct', re.MULTILINE | re.DOTALL)
 
 preamble = re.search(preamble_regex, data)
 struct_block_regex = re.compile('^struct.*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL)
-field_regex =  re.compile('{.*?},', re.MULTILINE | re.DOTALL)
+field_regex = re.compile('{.*?},', re.MULTILINE | re.DOTALL)
 cpuid_regex = re.compile('\.cpuid = (.*?),', re.MULTILINE | re.DOTALL)
 name_regex = re.compile('\.name = (.*?),', re.MULTILINE | re.DOTALL)
 
diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py
index b29a48dca7..65d7e3fd86 100755
--- a/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -130,10 +130,10 @@ def log_test_header(seq_no, nr_of_tests, name):
 #-------------------------------------------------------------------------------
 
 def start_stress(*args):
-        stress_cmd         = ["stress-ng"]
+        stress_cmd = ["stress-ng"]
         added_stress_types = []
-        req_stress_types   = set(args)
-        cpu_cnt            = str(multiprocessing.cpu_count())
+        req_stress_types = set(args)
+        cpu_cnt = str(multiprocessing.cpu_count())
 
         # The function cond_add_stress appends the options to the stress
         # command if the stress type is in the set of requested stress types
@@ -146,10 +146,10 @@ def start_stress(*args):
 
         #----------
 
-        cond_add_stress("io",  ["-i", cpu_cnt])
+        cond_add_stress("io", ["-i", cpu_cnt])
         cond_add_stress("cpu", ["-c", cpu_cnt])
         cond_add_stress("hdd", ["-d", cpu_cnt, "--hdd-bytes", "20M"])
-        cond_add_stress("vm",  ["-m", cpu_cnt, "--vm-bytes", "10M"])
+        cond_add_stress("vm", ["-m", cpu_cnt, "--vm-bytes", "10M"])
 
         unknown = ", ".join(req_stress_types)
         if unknown != "":
@@ -159,7 +159,7 @@ def start_stress(*args):
                 log("No stress requested")
                 return None
 
-        added          = "+".join(added_stress_types)
+        added = "+".join(added_stress_types)
         stress_cmd_str = " ".join(stress_cmd)
 
         log("Starting stress(", added, ")")
@@ -191,11 +191,11 @@ def end_stress(p):
 #-------------------------------------------------------------------------------
 
 def us2hms_str(us):
-        s = (us+500000) // 1000000 # Round microseconds to s
-        m = s//60
-        s -= 60*m
-        h = m//60
-        m -= 60*h
+        s = (us + 500000) // 1000000 # Round microseconds to s
+        m = s // 60
+        s -= 60 * m
+        h = m // 60
+        m -= 60 * h
 
         return "%d:%02d:%02d" % (h, m, s)
 
@@ -254,8 +254,8 @@ def gen_minmax_list(max_list):
 #         of cpus
 
 interval_core_0 = 100     # Timer interval on core 0 [us]
-interval_delta  = 20      # Interval increment for each core [us]
-loop_count      = 30000   # Number of loops (on core 0).
+interval_delta = 20      # Interval increment for each core [us]
+loop_count = 30000   # Number of loops (on core 0).
 
 cmd = ("cyclictest",
        "-S",             # Standard SMP testing. See below
@@ -298,16 +298,16 @@ def run_cyclictest_once():
 # A precondition for the tracking of min-max values is that
 # the suite size os a power of 2.
 
-N          = 5
+N = 5
 suite_size = 2**N
 
-est_exec_time_once  = interval_core_0 * loop_count
+est_exec_time_once = interval_core_0 * loop_count
 est_exec_time_suite = suite_size * est_exec_time_once
 
 def run_cyclictest_suite():
         log("Starting cyclictest")
         log("  Command          : ", " ".join(cmd))
-        log("  Number of cycles : ", loop_count*suite_size,
+        log("  Number of cycles : ", loop_count * suite_size,
             " (", suite_size, " sets of ", loop_count, " cycles)")
         log("  Exec. time (est) : ", us2hms_str(est_exec_time_suite))
         log()
@@ -327,9 +327,9 @@ def run_cyclictest_suite():
         for i in range(0, suite_size):
                 tmp_min, tmp_avg, tmp_max = run_cyclictest_once()
 
-                msg = "%2d/%2d:" % (i+1, suite_size)
+                msg = "%2d/%2d:" % (i + 1, suite_size)
                 msg += " min: %4d" % tmp_min
-                msg += " avg: %5.1f" % (float(tmp_avg[0])/tmp_avg[1])
+                msg += " avg: %5.1f" % (float(tmp_avg[0]) / tmp_avg[1])
                 msg += " max: %4d" % tmp_max
                 log_ts(msg)
 
@@ -343,13 +343,13 @@ def run_cyclictest_suite():
                 ack_avg[0] += tmp_avg[0]
                 ack_avg[1] += tmp_avg[1]
 
-        t = time.time()-t
+        t = time.time() - t
         log_ts("Cyclictest completed. Actual execution time:",
-               us2hms_str(t*1000000))
+               us2hms_str(t * 1000000))
         log()
         set_hung_tmo(orig_tmo)
 
-        return ack_min, float(ack_avg[0])/ack_avg[1], gen_minmax_list(max_list)
+        return ack_min, float(ack_avg[0]) / ack_avg[1], gen_minmax_list(max_list)
 
 #-------------------------------------------------------------------------------
 
@@ -400,10 +400,10 @@ class cyclictest_runner:
 runner = cyclictest_runner()
 
 tests = (("no_stress", []),
-         ("cpu",  ["cpu"]),
-         ("hdd",  ["hdd"]),
-         ("io",   ["io"]),
-         ("vm",   ["vm"]),
+         ("cpu", ["cpu"]),
+         ("hdd", ["hdd"]),
+         ("io", ["io"]),
+         ("vm", ["vm"]),
          ("full", ["io", "cpu", "hdd", "vm"]),
          )
 
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff
index f176857fdd..025243ea6e 100755
--- a/scripts/buildhistory-diff
+++ b/scripts/buildhistory-diff
@@ -104,7 +104,7 @@ def main():
         sys.exit(1)
 
     if len(args.revisions) == 1:
-        if '..'  in args.revisions[0]:
+        if '..' in args.revisions[0]:
             fromrev, torev = args.revisions[0].split('..')
         else:
             fromrev, torev = args.revisions[0], 'HEAD'
diff --git a/scripts/buildstats-diff b/scripts/buildstats-diff
index aed4f49923..bef1cf9cd7 100755
--- a/scripts/buildstats-diff
+++ b/scripts/buildstats-diff
@@ -203,14 +203,14 @@ def print_task_diff(bs1, bs2, val_type, min_val=0, min_absdiff=0, sort_by=('absd
     total2 = sum_vals(bs2)
     print("\nCumulative {}:".format(val_type))
     print("  {}    {:+.1f}%    {} ({}) -> {} ({})".format(
-                val_to_str(total2 - total1), 100 * (total2-total1) / total1,
+                val_to_str(total2 - total1), 100 * (total2 - total1) / total1,
                 val_to_str(total1, True), val_to_str(total1),
                 val_to_str(total2, True), val_to_str(total2)))
 
 
 def parse_args(argv):
     """Parse cmdline arguments"""
-    description="""
+    description = """
 Script for comparing buildstats of two separate builds."""
     parser = argparse.ArgumentParser(
             formatter_class=argparse.ArgumentDefaultsHelpFormatter,
diff --git a/scripts/combo-layer b/scripts/combo-layer
index e42f428cc3..2c2568fc19 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -142,7 +142,7 @@ class Configuration(object):
         self.repos[repo][option] = value
 
     def sanity_check(self, initmode=False):
-        required_options=["src_uri", "local_repo_dir", "dest_dir", "last_revision"]
+        required_options = ["src_uri", "local_repo_dir", "dest_dir", "last_revision"]
         if initmode:
             required_options.remove("last_revision")
         msg = ""
@@ -150,7 +150,7 @@ class Configuration(object):
         for name in self.repos:
             for option in required_options:
                 if option not in self.repos[name]:
-                    msg = "%s\nOption %s is not defined for component %s" %(msg, option, name)
+                    msg = "%s\nOption %s is not defined for component %s" % (msg, option, name)
                     missing_options.append(option)
             # Sanitize dest_dir so that we do not have to deal with edge cases
             # (unset, empty string, double slashes) in the rest of the code.
@@ -201,7 +201,7 @@ def action_init(conf, args):
     for name in conf.repos:
         ldir = conf.repos[name]['local_repo_dir']
         if not os.path.exists(ldir):
-            logger.info("cloning %s to %s" %(conf.repos[name]['src_uri'], ldir))
+            logger.info("cloning %s to %s" % (conf.repos[name]['src_uri'], ldir))
             subprocess.check_call("git clone %s %s" % (conf.repos[name]['src_uri'], ldir), shell=True)
     if not os.path.exists(".git"):
         runcmd("git init")
@@ -269,7 +269,7 @@ def action_init(conf, args):
                 # directory and optionally tell tar to strip the path
                 # prefix when the files were already moved.
                 subdir_components = len(subdir.split(os.path.sep)) if subdir else 0
-                strip=('--strip-components=%d' % subdir_components) if subdir else ''
+                strip = ('--strip-components=%d' % subdir_components) if subdir else ''
                 # TODO: file_filter wild cards do not work (and haven't worked before either), because
                 # a) GNU tar requires a --wildcards parameter before turning on wild card matching.
                 # b) The semantic is not as intendend (src/*.c also matches src/foo/bar.c,
@@ -467,7 +467,7 @@ def check_repo_clean(repodir):
         check if the repo is clean
         exit if repo is dirty
     """
-    output=runcmd("git status --porcelain", repodir)
+    output = runcmd("git status --porcelain", repodir)
     r = re.compile('\?\? patch-.*/')
     dirtyout = [item for item in output.splitlines() if not r.match(item)]
     if dirtyout:
@@ -591,15 +591,15 @@ def action_pull(conf, args):
             try:
                 runcmd("git checkout %s" % branch, ldir, printerr=False)
             except subprocess.CalledProcessError:
-                output=runcmd("git fetch", ldir)
+                output = runcmd("git fetch", ldir)
                 logger.info(output)
                 runcmd("git checkout %s" % branch, ldir)
                 runcmd("git pull --ff-only", ldir)
             else:
-                output=runcmd("git pull --ff-only", ldir)
+                output = runcmd("git pull --ff-only", ldir)
                 logger.info(output)
         else:
-            output=runcmd("git fetch", ldir)
+            output = runcmd("git fetch", ldir)
             logger.info(output)
             runcmd("git checkout %s" % branch, ldir)
             runcmd("git reset --hard FETCH_HEAD", ldir)
@@ -707,20 +707,20 @@ def update_with_patches(conf, components, revisions, repos):
         # Step 3: Call repo specific hook to adjust patch
         if 'hook' in repo:
             # hook parameter is: ./hook patchpath revision reponame
-            count=len(revlist)-1
+            count = len(revlist) - 1
             for patch in patchlist:
                 runcmd("%s %s %s %s" % (repo['hook'], patch, revlist[count], name))
-                count=count-1
+                count = count - 1
 
         # Step 4: write patch list and revision list to file, for user to edit later
         patchlist_file = os.path.join(os.getcwd(), patch_dir, "patchlist-%s" % name)
         repo['patchlist'] = patchlist_file
         f = open(patchlist_file, 'w')
-        count=len(revlist)-1
+        count = len(revlist) - 1
         for patch in patchlist:
             f.write("%s %s\n" % (patch, revlist[count]))
             check_patch(os.path.join(patch_dir, patch))
-            count=count-1
+            count = count - 1
         f.close()
 
     # Step 5: invoke bash for user to edit patch and patch list
@@ -1206,7 +1206,7 @@ def find_revs(old2new, head):
     num_known = len(old2new)
     log = runcmd("git log --grep='From .* rev: [a-fA-F0-9][a-fA-F0-9]*' --pretty=format:%H%x00%B%x00 " + head).split(chr(0))
     regex = re.compile(r'From .* rev: ([a-fA-F0-9]+)')
-    for new_rev, body in zip(*[iter(log)]* 2):
+    for new_rev, body in zip(*[iter(log)] * 2):
         # Use the last one, in the unlikely case there are more than one.
         rev = regex.findall(body)[-1]
         if rev not in old2new:
@@ -1232,7 +1232,7 @@ def apply_commit(parent, rev, largs, wargs, dest_dir, file_filter=None):
     if parent:
         # Apply delta.
         changes = runcmd("git diff-tree --no-commit-id --no-renames --name-status -r --raw -z %s %s" % (parent, rev), **largs).split(chr(0))
-        for status, name in zip(*[iter(changes)]*2):
+        for status, name in zip(*[iter(changes)] * 2):
             if status[0] in "ACMRT":
                 update.append(name)
             elif status[0] in "D":
diff --git a/scripts/contrib/image-manifest b/scripts/contrib/image-manifest
index 3c07a73a4e..ebca44a365 100755
--- a/scripts/contrib/image-manifest
+++ b/scripts/contrib/image-manifest
@@ -320,7 +320,7 @@ def export_manifest_info(args):
         json.dump(config, sys.stdout, indent=2)
         print('')
 
-    tmpoutdir = tempfile.mkdtemp(prefix=os.path.basename(__file__)+'-')
+    tmpoutdir = tempfile.mkdtemp(prefix=os.path.basename(__file__) + '-')
     logger.debug('tmp dir: %s' % tmpoutdir)
 
     # export manifest
diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
index 744dcfb49e..b987374d57 100755
--- a/scripts/contrib/patchreview.py
+++ b/scripts/contrib/patchreview.py
@@ -129,7 +129,7 @@ def analyse(results, want_blame=False, verbose=True):
         if r.malformed_upstream_status or r.unknown_upstream_status:
             malformed_status += 1
             # Count patches with no status as pending
-            pending_patches +=1
+            pending_patches += 1
         if r.missing_cve:
             missing_cve += 1
         if r.upstream_status == "pending":
diff --git a/scripts/contrib/verify-homepage.py b/scripts/contrib/verify-homepage.py
index 9991b35395..84503b84d1 100755
--- a/scripts/contrib/verify-homepage.py
+++ b/scripts/contrib/verify-homepage.py
@@ -55,7 +55,7 @@ def verifyHomepage(bbhandler):
             checked.append(realfn)
     return count
 
-if __name__=='__main__':
+if __name__ == '__main__':
     with bb.tinfoil.Tinfoil() as bbhandler:
         bbhandler.prepare()
         logger.info("Start verifying HOMEPAGE:")
diff --git a/scripts/crosstap b/scripts/crosstap
index 40856bc208..b8c3923793 100755
--- a/scripts/crosstap
+++ b/scripts/crosstap
@@ -116,7 +116,7 @@ class BitbakeEnvInvocationException(Exception):
         self.message = message
 
 class BitbakeEnv(object):
-    BITBAKE="bitbake"
+    BITBAKE = "bitbake"
 
     def __init__(self, package):
         self.package = package
@@ -292,7 +292,7 @@ with --sysroot option.
     def __map_systemtap_arch(self):
         a = self.target_arch
         ret = a
-        if   re.match('(athlon|x86.64)$', a):
+        if re.match('(athlon|x86.64)$', a):
             ret = 'x86_64'
         elif re.match('i.86$', a):
             ret = 'i386'
diff --git a/scripts/lib/build_perf/report.py b/scripts/lib/build_perf/report.py
index 4e8e2a8a93..dde4616974 100644
--- a/scripts/lib/build_perf/report.py
+++ b/scripts/lib/build_perf/report.py
@@ -268,7 +268,7 @@ class TimeVal(MeasurementVal):
         if self != self:
             return "null"
         hh, mm, ss = self.hms()
-        return [hh, mm, int(ss), int(ss*1000) % 1000]
+        return [hh, mm, int(ss), int(ss * 1000) % 1000]
 
 
 class SizeVal(MeasurementVal):
diff --git a/scripts/lib/buildstats.py b/scripts/lib/buildstats.py
index c69b5bf4d7..56f5bb24d2 100644
--- a/scripts/lib/buildstats.py
+++ b/scripts/lib/buildstats.py
@@ -303,10 +303,10 @@ def diff_buildstats(bs1, bs2, stat_attr, min_val=None, min_absdiff=None, only_ta
                 continue
             if min_absdiff and abs(val2 - val1) < min_absdiff:
                 log.debug("Filtering out %s:%s (difference of %s)", pkg, task,
-                          val2-val1)
+                          val2 - val1)
                 continue
             tasks_diff.append(TaskDiff(pkg, pkg_op, task, task_op, val1, val2,
-                                       val2-val1, reldiff))
+                                       val2 - val1, reldiff))
     return tasks_diff
 
 
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index e5af2c95ae..31b029eaf8 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -188,7 +188,7 @@ def deploy(args, config, basepath, workspace):
                 if fstat.st_ino in inodes:
                     fsize = 0
                 else:
-                    fsize = int(math.ceil(float(fstat.st_size)/1024))
+                    fsize = int(math.ceil(float(fstat.st_size) / 1024))
                 inodes.add(fstat.st_ino)
                 ftotalsize += fsize
                 # The path as it would appear on the target
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 5eba2191d9..2bf65ad072 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -751,7 +751,7 @@ def _check_preserve(config, recipename):
 def get_staging_kver(srcdir):
     # Kernel version from work-shared
     kerver = []
-    staging_kerVer=""
+    staging_kerVer = ""
     if os.path.exists(srcdir) and os.listdir(srcdir):
         with open(os.path.join(srcdir,"Makefile")) as f:
             version = [next(f) for x in range(5)][1:4]
@@ -846,7 +846,7 @@ def modify(args, config, basepath, workspace):
 
                 # Ignore local files with subdir={BP}
                 srcabspath = os.path.abspath(srcsubdir)
-                local_files = [fname for fname in local_files if os.path.exists(os.path.join(workdir, fname)) and  (srcabspath == workdir or not  os.path.join(workdir, fname).startswith(srcabspath + os.sep))]
+                local_files = [fname for fname in local_files if os.path.exists(os.path.join(workdir, fname)) and (srcabspath == workdir or not os.path.join(workdir, fname).startswith(srcabspath + os.sep))]
                 if local_files:
                     for fname in local_files:
                         _move_file(os.path.join(workdir, fname), os.path.join(srctree, 'oe-local-files', fname))
@@ -1079,7 +1079,7 @@ def rename(args, config, basepath, workspace):
 
     if newver:
         newappend = '%s_%s.bbappend' % (newname, newver)
-        newfile =  '%s_%s.bb' % (newname, newver)
+        newfile = '%s_%s.bb' % (newname, newver)
     else:
         newappend = '%s.bbappend' % newname
         newfile = '%s.bb' % newname
@@ -1555,7 +1555,7 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi
                           key, val in list(upd_f.items()) + list(new_f.items()))
             removevalues = {}
             if update_srcuri:
-                removevalues  = {'SRC_URI': removedentries}
+                removevalues = {'SRC_URI': removedentries}
                 patchfields['SRC_URI'] = '\\\n    '.join(srcuri)
             if dry_run_outdir:
                 logger.info('Creating bbappend (dry-run)')
@@ -1575,7 +1575,7 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi
                 else:
                     _move_file(os.path.join(local_files_dir, basepath), path,
                                dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
-                update_srcuri= True
+                update_srcuri = True
             for basepath, path in new_f.items():
                 logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
                 _move_file(os.path.join(local_files_dir, basepath),
@@ -1960,7 +1960,7 @@ def _reset(recipes, no_clean, remove_work, config, basepath, workspace):
             if os.listdir(srctreebase):
                     if remove_work:
                         logger.info('-r argument used on %s, removing source tree.'
-                                    ' You will lose any unsaved work' %pn)
+                                    ' You will lose any unsaved work' % pn)
                         shutil.rmtree(srctreebase)
                     else:
                         # We don't want to risk wiping out any work in progress
@@ -2046,7 +2046,7 @@ def finish(args, config, basepath, workspace):
             raise DevtoolError('Source tree is not clean:\n\n%s\nEnsure you have committed your changes or use -f/--force if you are sure there\'s nothing that needs to be committed' % dirty)
 
     no_clean = args.no_clean
-    remove_work=args.remove_work
+    remove_work = args.remove_work
     tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     try:
         rd = parse_recipe(config, tinfoil, args.recipename, True)
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index 0c85d8c13f..1a75252321 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -242,7 +242,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
         pbar.start()
         batchsize = 100
         for i in range(0, len(filelist), batchsize):
-            batch = filelist[i:i+batchsize]
+            batch = filelist[i:i + batchsize]
             __run('git add -f -A %s' % ' '.join(['"%s"' % item for item in batch]))
             pbar.update(i)
         pbar.finish()
@@ -610,7 +610,7 @@ def check_upgrade_status(args, config, basepath, workspace):
                                                                result[1] if result[1] != 'UPDATE' else (result[3] if not result[3].endswith("new-commits-available") else "new commits"),
                                                                result[4],
                                                                result[5] if result[5] != 'N/A' else "",
-                                                               "cannot be updated due to: %s" %(result[6]) if result[6] else ""))
+                                                               "cannot be updated due to: %s" % (result[6]) if result[6] else ""))
 
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
@@ -621,7 +621,7 @@ def register_commands(subparsers, context):
                                            description='Upgrades an existing recipe to a new upstream version. Puts the upgraded recipe file into the workspace along with any associated files, and extracts the source tree to a specified location (in case patches need rebasing or adding to as a result of the upgrade).',
                                            group='starting')
     parser_upgrade.add_argument('recipename', help='Name of recipe to upgrade (just name - no version, path or extension)')
-    parser_upgrade.add_argument('srctree',  nargs='?', help='Path to where to extract the source tree. If not specified, a subdirectory of %s will be used.' % defsrctree)
+    parser_upgrade.add_argument('srctree', nargs='?', help='Path to where to extract the source tree. If not specified, a subdirectory of %s will be used.' % defsrctree)
     parser_upgrade.add_argument('--version', '-V', help='Version to upgrade to (PV). If omitted, latest upstream version will be determined and used, if possible.')
     parser_upgrade.add_argument('--srcrev', '-S', help='Source revision to upgrade to (useful when fetching from an SCM such as git)')
     parser_upgrade.add_argument('--srcbranch', '-B', help='Branch in source repository containing the revision to use (if fetching from an SCM such as git)')
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 566c75369a..67f3f4980a 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -997,7 +997,7 @@ def handle_license_vars(srctree, lines_before, handled, extravalues, d):
     if pos == -1:
         lines_before.extend(lines)
     else:
-        lines_before[pos:pos+1] = lines
+        lines_before[pos:pos + 1] = lines
 
     handled.append(('license', licvalues))
     return licvalues
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py
index 35a97c9345..b9bfa936fa 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -446,7 +446,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
         def process_value(value):
             value = value.replace('[', '').replace(']', '')
             if value.startswith('m4_esyscmd(') or value.startswith('m4_esyscmd_s('):
-                cmd = subst_defines(value[value.index('(')+1:-1])
+                cmd = subst_defines(value[value.index('(') + 1:-1])
                 try:
                     if '|' in cmd:
                         cmd = 'set -o pipefail; ' + cmd
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index adfa377956..382a9a50cf 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -607,7 +607,7 @@ def gather_setup_info(fileobj):
         if key == 'ext_modules':
             if isinstance(value, list):
                 for ext in value:
-                    if  (isinstance(ext, ast.Call) and
+                    if (isinstance(ext, ast.Call) and
                          isinstance(ext.func, ast.Name) and
                          ext.func.id == 'Extension' and
                          not has_non_literals(ext.args)):
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py
index 2bcae91dfa..4f24d621a7 100644
--- a/scripts/lib/recipetool/create_npm.py
+++ b/scripts/lib/recipetool/create_npm.py
@@ -217,7 +217,7 @@ class NpmRecipeHandler(RecipeHandler):
         extravalues["extrafiles"]["npm-shrinkwrap.json"] = shrinkwrap_copy
 
         url_local = "npmsw://%s" % shrinkwrap_file
-        url_recipe= "npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json"
+        url_recipe = "npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json"
 
         if dev:
             url_local += ";dev=1"
diff --git a/scripts/lib/resulttool/manualexecution.py b/scripts/lib/resulttool/manualexecution.py
index c5283c514e..a847dd9caf 100755
--- a/scripts/lib/resulttool/manualexecution.py
+++ b/scripts/lib/resulttool/manualexecution.py
@@ -182,7 +182,7 @@ class ManualTestRunner(object):
         logger.info('Configuration option file created at %s' % config_options_file)
 
     def make_testcase_config_file(self, logger, case_file, testcase_config_file):
-        if  testcase_config_file:
+        if testcase_config_file:
             if os.path.exists(testcase_config_file):
                 print('\nTest configuration file with name %s already exists. Please provide a unique file name' % (testcase_config_file))
                 return 0
diff --git a/scripts/lib/resulttool/report.py b/scripts/lib/resulttool/report.py
index 7aa2b5aefe..0c56b64cb2 100644
--- a/scripts/lib/resulttool/report.py
+++ b/scripts/lib/resulttool/report.py
@@ -271,7 +271,7 @@ class ResultsTextReport(object):
                     testtype = str(key).split('.')[0]
                     if ((machine in self.ltptests and testtype == "ltpiresult" and self.ltptests[machine]) or
                         (machine in self.ltpposixtests and testtype == "ltpposixresult" and self.ltpposixtests[machine])):
-                        print("Already have test results for %s on %s, skipping %s" %(str(key).split('.')[0], machine, resultid))
+                        print("Already have test results for %s on %s, skipping %s" % (str(key).split('.')[0], machine, resultid))
                         skip = True
                         break
                 if skip:
diff --git a/scripts/lib/resulttool/store.py b/scripts/lib/resulttool/store.py
index e0951f0a8f..baec9e27f9 100644
--- a/scripts/lib/resulttool/store.py
+++ b/scripts/lib/resulttool/store.py
@@ -31,7 +31,7 @@ def store(args, logger):
         if resultutils.is_url(args.source) or os.path.isfile(args.source):
             resultutils.append_resultsdata(results, args.source, configvars=configvars)
         else:
-            for root, dirs,  files in os.walk(args.source):
+            for root, dirs, files in os.walk(args.source):
                 for name in files:
                     f = os.path.join(root, name)
                     if name == "testresults.json":
@@ -78,7 +78,7 @@ def store(args, logger):
                                   [], [], False, keywords, logger)
 
     finally:
-        subprocess.check_call(["rm", "-rf",  tempdir])
+        subprocess.check_call(["rm", "-rf", tempdir])
 
     return 0
 
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 46e4d0f028..174bd27f2f 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -263,7 +263,7 @@ class Disk:
             splitted = out.splitlines()
             # skip over possible errors in exec_cmd output
             try:
-                idx =splitted.index("BYT;")
+                idx = splitted.index("BYT;")
             except ValueError:
                 raise WicError("Error getting partition information from %s" % (self.parted))
             lsector_size, psector_size, self._ptable_format = splitted[idx + 1].split(":")[3:6]
@@ -328,7 +328,7 @@ class Disk:
 
     def copy(self, src, dest):
         """Copy partition image into wic image."""
-        pnum =  dest.part if isinstance(src, str) else src.part
+        pnum = dest.part if isinstance(src, str) else src.part
 
         if self.partitions[pnum].fstype.startswith('ext'):
             if isinstance(src, str):
@@ -543,7 +543,7 @@ class Disk:
                         label = part.get("name")
                         label_str = "-L {}".format(label) if label else ''
                         out = exec_cmd("{} --probe {}".format(self.blkid, self._get_part_image(pnum)))
-                        uuid = out[out.index("UUID=\"")+6:out.index("UUID=\"")+42]
+                        uuid = out[out.index("UUID=\"") + 6:out.index("UUID=\"") + 42]
                         uuid_str = "-U {}".format(uuid) if uuid else ''
                         with open(partfname, 'w') as sparse:
                             os.ftruncate(sparse.fileno(), part['size'] * self._lsector_size)
diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index b7de950c7c..6f733d5365 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -490,7 +490,7 @@ class FilemapNobmap(_FilemapBase):
         """Refer the '_FilemapBase' class for the documentation."""
         self._log.debug("FilemapNobmap: get_mapped_ranges(%d,  %d(%d))"
                         % (start, count, start + count - 1))
-        yield (start, start + count -1)
+        yield (start, start + count - 1)
 
 def filemap(image, log=None):
     """
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 03c3d71594..b644e68da3 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -132,7 +132,7 @@ def systemidtype(arg):
 class KickStart():
     """Kickstart parser implementation."""
 
-    DEFAULT_EXTRA_SPACE = 10*1024
+    DEFAULT_EXTRA_SPACE = 10 * 1024
     DEFAULT_OVERHEAD_FACTOR = 1.3
 
     def __init__(self, confpath):
diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py
index bb362b64a8..92d289fbf6 100644
--- a/scripts/lib/wic/misc.py
+++ b/scripts/lib/wic/misc.py
@@ -117,7 +117,7 @@ def exec_cmd(cmd_and_args, as_shell=False):
 def find_executable(cmd, paths):
     recipe = cmd
     if recipe in NATIVE_RECIPES:
-        recipe =  NATIVE_RECIPES[recipe]
+        recipe = NATIVE_RECIPES[recipe]
     provided = get_bitbake_var("ASSUME_PROVIDED")
     if provided and "%s-native" % recipe in provided:
         return True
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 54ca5f87b3..5f9a1f64bf 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -133,7 +133,7 @@ class DirectPlugin(ImagerPlugin):
                 device_name = "LABEL=%s" % part.label
             else:
                 # mmc device partitions are named mmcblk0p1, mmcblk0p2..
-                prefix = 'p' if  part.disk.startswith('mmcblk') else ''
+                prefix = 'p' if part.disk.startswith('mmcblk') else ''
                 device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
 
             opts = part.fsopts if part.fsopts else "defaults"
diff --git a/scripts/oe-depends-dot b/scripts/oe-depends-dot
index 14ad54008b..15620240c4 100755
--- a/scripts/oe-depends-dot
+++ b/scripts/oe-depends-dot
@@ -51,9 +51,9 @@ class Dot(object):
             if rdep in chain:
                 continue
             else:
-                for i in range(0, len(chain)-1):
-                    if chain[i] in alldeps[rdep] and rdep in alldeps[chain[i+1]]:
-                        chain.insert(i+1, rdep)
+                for i in range(0, len(chain) - 1):
+                    if chain[i] in alldeps[rdep] and rdep in alldeps[chain[i + 1]]:
+                        chain.insert(i + 1, rdep)
                         inserted_elements.append(rdep)
                         break
                 if chain[-1] in alldeps[rdep] and rdep not in chain:
@@ -120,7 +120,7 @@ class Dot(object):
                         child_deps |= depends[dep]
 
                 reduced_depends[k] = deps - child_deps
-                outfile= '%s-reduced%s' % (self.args.dotfile[0][:-4], self.args.dotfile[0][-4:])
+                outfile = '%s-reduced%s' % (self.args.dotfile[0][:-4], self.args.dotfile[0][-4:])
             with open(outfile, 'w') as f:
                 print('Saving reduced dot file to %s' % outfile)
                 f.write('digraph depends {\n')
diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
index 3715282262..dc6178beb4 100755
--- a/scripts/oe-pkgdata-browser
+++ b/scripts/oe-pkgdata-browser
@@ -32,7 +32,7 @@ def timeit(f):
         result = f(*args, **kw)
         te = time.time()
         print('func:%r args:[%r, %r] took: %2.4f sec' %
-          (f.__name__, args, kw, te-ts))
+          (f.__name__, args, kw, te - ts))
         return result
     return timed
 
diff --git a/scripts/oepydevshell-internal.py b/scripts/oepydevshell-internal.py
index 51e425eff8..7fcc4043d2 100755
--- a/scripts/oepydevshell-internal.py
+++ b/scripts/oepydevshell-internal.py
@@ -22,7 +22,7 @@ def echonocbreak(fd):
 
 def cbreaknoecho(fd):
     old = termios.tcgetattr(fd)
-    old[3] = old[3] &~ termios.ECHO &~ termios.ICANON
+    old[3] = old[3] & ~ termios.ECHO & ~ termios.ICANON
     termios.tcsetattr(fd, termios.TCSADRAIN, old)
 
 if len(sys.argv) != 3 or sys.argv[1] in ('-h', '--help'):
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index e6198e1c79..b6e49567f1 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -146,11 +146,11 @@ VOLUME_COLORS = [
 
 # Process states
 STATE_UNDEFINED = 0
-STATE_RUNNING   = 1
-STATE_SLEEPING  = 2
-STATE_WAITING   = 3
-STATE_STOPPED   = 4
-STATE_ZOMBIE    = 5
+STATE_RUNNING = 1
+STATE_SLEEPING = 2
+STATE_WAITING = 3
+STATE_STOPPED = 4
+STATE_ZOMBIE = 5
 
 STATE_COLORS = [(0, 0, 0, 0), PROC_COLOR_R, PROC_COLOR_S, PROC_COLOR_D,
         PROC_COLOR_T, PROC_COLOR_Z, PROC_COLOR_X, PROC_COLOR_W]
@@ -184,8 +184,8 @@ def draw_legend_box(ctx, label, fill_color, x, y, s):
     draw_text(ctx, label, TEXT_COLOR, x + s + 5, y)
 
 def draw_legend_line(ctx, label, fill_color, x, y, s):
-    draw_fill_rect(ctx, fill_color, (x, y - s/2, s + 1, 3))
-    ctx.arc(x + (s + 1)/2.0, y - (s - 3)/2.0, 2.5, 0, 2.0 * math.pi)
+    draw_fill_rect(ctx, fill_color, (x, y - s / 2, s + 1, 3))
+    ctx.arc(x + (s + 1) / 2.0, y - (s - 3) / 2.0, 2.5, 0, 2.0 * math.pi)
     ctx.fill()
     draw_text(ctx, label, TEXT_COLOR, x + s + 5, y)
 
@@ -208,7 +208,7 @@ def draw_sec_labels(ctx, options, rect, sec_w, nsecs):
             else:
                 label = "%d" % (i / sec_w)
             label_w = ctx.text_extents(label)[2]
-            x = rect[0] + i - label_w/2
+            x = rect[0] + i - label_w / 2
             if x >= prev_x:
                 draw_text(ctx, label, TEXT_COLOR, x, rect[1] - 2)
                 prev_x = x + label_w
@@ -280,7 +280,7 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
 
     first = transform_point_coords(data[0], x_shift, ybase, xscale, yscale,
                         chart_bounds[0], chart_bounds[1])
-    last =  transform_point_coords(data[-1], x_shift, ybase, xscale, yscale,
+    last = transform_point_coords(data[-1], x_shift, ybase, xscale, yscale,
                         chart_bounds[0], chart_bounds[1])
 
     ctx.set_source_rgba(*color)
@@ -291,8 +291,8 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
         ctx.line_to(x, y)
     if fill:
         ctx.stroke_preserve()
-        ctx.line_to(last[0], chart_bounds[1]+chart_bounds[3])
-        ctx.line_to(first[0], chart_bounds[1]+chart_bounds[3])
+        ctx.line_to(last[0], chart_bounds[1] + chart_bounds[3])
+        ctx.line_to(first[0], chart_bounds[1] + chart_bounds[3])
         ctx.line_to(first[0], first[1])
         ctx.fill()
     else:
@@ -362,11 +362,11 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
     if trace.cpu_stats:
         ctx.set_font_size(LEGEND_FONT_SIZE)
 
-        draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y+20, leg_s)
-        draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y+20, leg_s)
+        draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y + 20, leg_s)
+        draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y + 20, leg_s)
 
         # render I/O wait
-        chart_rect = (off_x, curr_y+30, w, bar_h)
+        chart_rect = (off_x, curr_y + 30, w, bar_h)
         if clip_visible(clip, chart_rect):
             draw_box_ticks(ctx, chart_rect, sec_w)
             draw_annotations(ctx, proc_tree, trace.times, chart_rect)
@@ -382,11 +382,11 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
 
     # render second chart
     if trace.disk_stats:
-        draw_legend_line(ctx, "Disk throughput", DISK_TPUT_COLOR, off_x, curr_y+20, leg_s)
-        draw_legend_box(ctx, "Disk utilization", IO_COLOR, off_x + 120, curr_y+20, leg_s)
+        draw_legend_line(ctx, "Disk throughput", DISK_TPUT_COLOR, off_x, curr_y + 20, leg_s)
+        draw_legend_box(ctx, "Disk utilization", IO_COLOR, off_x + 120, curr_y + 20, leg_s)
 
         # render I/O utilization
-        chart_rect = (off_x, curr_y+30, w, bar_h)
+        chart_rect = (off_x, curr_y + 30, w, bar_h)
         if clip_visible(clip, chart_rect):
             draw_box_ticks(ctx, chart_rect, sec_w)
             draw_annotations(ctx, proc_tree, trace.times, chart_rect)
@@ -441,11 +441,11 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
             # works okay in practice.
             draw_legend_box(ctx, '%s (max: %u MiB)' % (volume, volume_scale / 1024 / 1024),
                             VOLUME_COLORS[i % len(VOLUME_COLORS)],
-                            off_x + i * 250, curr_y+20, leg_s)
+                            off_x + i * 250, curr_y + 20, leg_s)
             disk_scale += volume_scale
 
         # render used amount of disk space
-        chart_rect = (off_x, curr_y+30, w, bar_h)
+        chart_rect = (off_x, curr_y + 30, w, bar_h)
         if clip_visible(clip, chart_rect):
             draw_box_ticks(ctx, chart_rect, sec_w)
             draw_annotations(ctx, proc_tree, trace.times, chart_rect)
@@ -454,7 +454,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
                             [(sample.time,
                               # Sum up used space of all volumes including the current one
                               # so that the graphs appear as stacked on top of each other.
-                              functools.reduce(lambda x,y: x+y,
+                              functools.reduce(lambda x,y: x + y,
                                      [sample.records[volume] - min_used[volume]
                                       for volume in volumes[0:i]
                                       if volume in sample.records],
@@ -465,15 +465,15 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
         curr_y = curr_y + 30 + bar_h
 
     # render mem usage
-    chart_rect = (off_x, curr_y+30, w, meminfo_bar_h)
+    chart_rect = (off_x, curr_y + 30, w, meminfo_bar_h)
     mem_stats = trace.mem_stats
     if mem_stats and clip_visible(clip, chart_rect):
         mem_scale = max(sample.buffers for sample in mem_stats)
-        draw_legend_box(ctx, "Mem cached (scale: %u MiB)" % (float(mem_scale) / 1024), MEM_CACHED_COLOR, off_x, curr_y+20, leg_s)
-        draw_legend_box(ctx, "Used", MEM_USED_COLOR, off_x + 240, curr_y+20, leg_s)
-        draw_legend_box(ctx, "Buffers", MEM_BUFFERS_COLOR, off_x + 360, curr_y+20, leg_s)
-        draw_legend_line(ctx, "Swap (scale: %u MiB)" % max([(sample.swap)/1024 for sample in mem_stats]),
-                 MEM_SWAP_COLOR, off_x + 480, curr_y+20, leg_s)
+        draw_legend_box(ctx, "Mem cached (scale: %u MiB)" % (float(mem_scale) / 1024), MEM_CACHED_COLOR, off_x, curr_y + 20, leg_s)
+        draw_legend_box(ctx, "Used", MEM_USED_COLOR, off_x + 240, curr_y + 20, leg_s)
+        draw_legend_box(ctx, "Buffers", MEM_BUFFERS_COLOR, off_x + 360, curr_y + 20, leg_s)
+        draw_legend_line(ctx, "Swap (scale: %u MiB)" % max([(sample.swap) / 1024 for sample in mem_stats]),
+                 MEM_SWAP_COLOR, off_x + 480, curr_y + 20, leg_s)
         draw_box_ticks(ctx, chart_rect, sec_w)
         draw_annotations(ctx, proc_tree, trace.times, chart_rect)
         draw_chart(ctx, MEM_BUFFERS_COLOR, True, chart_rect,
@@ -494,27 +494,27 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
     return curr_y
 
 def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
-    chart_rect = [off_x, curr_y+header_h, w, h - curr_y - 1 * off_y - header_h]
+    chart_rect = [off_x, curr_y + header_h, w, h - curr_y - 1 * off_y - header_h]
 
     draw_legend_box(ctx, "Configure",
              TASK_COLOR_CONFIGURE, off_x, curr_y + 45, leg_s)
     draw_legend_box(ctx, "Compile",
-             TASK_COLOR_COMPILE, off_x+120, curr_y + 45, leg_s)
+             TASK_COLOR_COMPILE, off_x + 120, curr_y + 45, leg_s)
     draw_legend_box(ctx, "Install",
-             TASK_COLOR_INSTALL, off_x+240, curr_y + 45, leg_s)
+             TASK_COLOR_INSTALL, off_x + 240, curr_y + 45, leg_s)
     draw_legend_box(ctx, "Populate Sysroot",
-             TASK_COLOR_SYSROOT, off_x+360, curr_y + 45, leg_s)
+             TASK_COLOR_SYSROOT, off_x + 360, curr_y + 45, leg_s)
     draw_legend_box(ctx, "Package",
-             TASK_COLOR_PACKAGE, off_x+480, curr_y + 45, leg_s)
+             TASK_COLOR_PACKAGE, off_x + 480, curr_y + 45, leg_s)
     draw_legend_box(ctx, "Package Write",
-             TASK_COLOR_PACKAGE_WRITE, off_x+600, curr_y + 45, leg_s)
+             TASK_COLOR_PACKAGE_WRITE, off_x + 600, curr_y + 45, leg_s)
 
     ctx.set_font_size(PROC_TEXT_FONT_SIZE)
 
     draw_box_ticks(ctx, chart_rect, sec_w)
     draw_sec_labels(ctx, options, chart_rect, sec_w, 30)
 
-    y = curr_y+header_h
+    y = curr_y + header_h
 
     offset = trace.min or min(trace.start.keys())
     for start in sorted(trace.start.keys()):
@@ -574,7 +574,7 @@ def render(ctx, options, xscale, trace):
     ctx.set_line_width(1.0)
     ctx.select_font_face(FONT_NAME)
     draw_fill_rect(ctx, WHITE, (0, 0, max(w, MIN_IMG_W), h))
-    w -= 2*off_x
+    w -= 2 * off_x
     curr_y = off_y
 
     if options.charts:
@@ -611,13 +611,13 @@ def render(ctx, options, xscale, trace):
 
     # draw a cumulative CPU-time-per-process graph
     if proc_tree.taskstats and options.cumulative:
-        cuml_rect = (off_x, curr_y + off_y, w, CUML_HEIGHT/2 - off_y * 2)
+        cuml_rect = (off_x, curr_y + off_y, w, CUML_HEIGHT / 2 - off_y * 2)
         if clip_visible(clip, cuml_rect):
             draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_CPU)
 
     # draw a cumulative I/O-time-per-process graph
     if proc_tree.taskstats and options.cumulative:
-        cuml_rect = (off_x, curr_y + off_y * 100, w, CUML_HEIGHT/2 - off_y * 2)
+        cuml_rect = (off_x, curr_y + off_y * 100, w, CUML_HEIGHT / 2 - off_y * 2)
         if clip_visible(clip, cuml_rect):
             draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_IO)
 
@@ -627,11 +627,11 @@ def draw_process_bar_chart(ctx, clip, options, proc_tree, times, curr_y, w, h, s
         draw_legend_box(ctx, "Running (%cpu)",
                  PROC_COLOR_R, off_x, curr_y + 45, leg_s)
         draw_legend_box(ctx, "Unint.sleep (I/O)",
-                 PROC_COLOR_D, off_x+120, curr_y + 45, leg_s)
+                 PROC_COLOR_D, off_x + 120, curr_y + 45, leg_s)
         draw_legend_box(ctx, "Sleeping",
-                 PROC_COLOR_S, off_x+240, curr_y + 45, leg_s)
+                 PROC_COLOR_S, off_x + 240, curr_y + 45, leg_s)
         draw_legend_box(ctx, "Zombie",
-                 PROC_COLOR_Z, off_x+360, curr_y + 45, leg_s)
+                 PROC_COLOR_Z, off_x + 360, curr_y + 45, leg_s)
         header_size = 45
 
     chart_rect = [off_x, curr_y + header_size + 15,
@@ -675,7 +675,7 @@ def draw_header(ctx, headers, duration):
         draw_text(ctx, txt, TEXT_COLOR, off_x, header_y)
 
     dur = duration / 100.0
-    txt = 'time : %02d:%05.2f' % (math.floor(dur/60), dur - 60 * math.floor(dur/60))
+    txt = 'time : %02d:%05.2f' % (math.floor(dur / 60), dur - 60 * math.floor(dur / 60))
     if headers.get('system.maxpid') is not None:
         txt = txt + '      max pid: %s' % (headers.get('system.maxpid'))
 
@@ -685,7 +685,7 @@ def draw_header(ctx, headers, duration):
     return header_y
 
 def draw_processes_recursively(ctx, proc, proc_tree, y, proc_h, rect, clip):
-    x = rect[0] +  ((proc.start_time - proc_tree.start_time) * rect[2] / proc_tree.duration)
+    x = rect[0] + ((proc.start_time - proc_tree.start_time) * rect[2] / proc_tree.duration)
     w = ((proc.duration) * rect[2] / proc_tree.duration)
 
     draw_process_activity_colors(ctx, proc, proc_tree, x, y, w, proc_h, rect, clip)
@@ -966,9 +966,9 @@ def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w, stat_type):
     for t in legends:
         cs = t[0]
         time = t[1]
-        x = chart_bounds[0] + off_x + int(i/LEGENDS_PER_COL) * label_width
+        x = chart_bounds[0] + off_x + int(i / LEGENDS_PER_COL) * label_width
         y = chart_bounds[1] + font_height * ((i % LEGENDS_PER_COL) + 2)
-        str = "%s - %.0f(ms) (%2.2f%%)" % (cs.cmd, time/1000000, (time/total_time) * 100.0)
+        str = "%s - %.0f(ms) (%2.2f%%)" % (cs.cmd, time / 1000000, (time / total_time) * 100.0)
         draw_legend_box(ctx, str, cs.color, x, y, leg_s)
         i = i + 1
         if i >= LEGENDS_TOTAL:
diff --git a/scripts/pybootchartgui/pybootchartgui/gui.py b/scripts/pybootchartgui/pybootchartgui/gui.py
index 99e5914405..b1a399240a 100644
--- a/scripts/pybootchartgui/pybootchartgui/gui.py
+++ b/scripts/pybootchartgui/pybootchartgui/gui.py
@@ -107,7 +107,7 @@ class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
         self.queue_draw()
 
     def zoom_to_rect(self, rect):
-        zoom_ratio = float(rect.width)/float(self.chart_width)
+        zoom_ratio = float(rect.width) / float(self.chart_width)
         self.zoom_image(zoom_ratio)
         self.x = 0
         self.position_changed()
@@ -148,13 +148,13 @@ class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
 
     def on_key_press_event(self, widget, event):
         if event.keyval == Gdk.keyval_from_name("Left"):
-            self.x -= self.POS_INCREMENT/self.zoom_ratio
+            self.x -= self.POS_INCREMENT / self.zoom_ratio
         elif event.keyval == Gdk.keyval_from_name("Right"):
-            self.x += self.POS_INCREMENT/self.zoom_ratio
+            self.x += self.POS_INCREMENT / self.zoom_ratio
         elif event.keyval == Gdk.keyval_from_name("Up"):
-            self.y -= self.POS_INCREMENT/self.zoom_ratio
+            self.y -= self.POS_INCREMENT / self.zoom_ratio
         elif event.keyval == Gdk.keyval_from_name("Down"):
-            self.y += self.POS_INCREMENT/self.zoom_ratio
+            self.y += self.POS_INCREMENT / self.zoom_ratio
         else:
             return False
         self.bound_vals()
@@ -196,8 +196,8 @@ class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
         if state & Gdk.ModifierType.BUTTON2_MASK or state & Gdk.ModifierType.BUTTON1_MASK:
             x, y = int(event.x), int(event.y)
             # pan the image
-            self.x += (self.prevmousex - x)/self.zoom_ratio
-            self.y += (self.prevmousey - y)/self.zoom_ratio
+            self.x += (self.prevmousex - x) / self.zoom_ratio
+            self.y += (self.prevmousey - y) / self.zoom_ratio
             self.bound_vals()
             self.queue_draw()
             self.prevmousex = x
diff --git a/scripts/pybootchartgui/pybootchartgui/main.py.in b/scripts/pybootchartgui/pybootchartgui/main.py.in
index cd64a716c7..c905205c8e 100644
--- a/scripts/pybootchartgui/pybootchartgui/main.py.in
+++ b/scripts/pybootchartgui/pybootchartgui/main.py.in
@@ -139,7 +139,7 @@ def main(argv=None):
 			else:
 			    duration = proc_tree.duration
 			dur = duration / 100.0
-			print('%02d:%05.2f' % (math.floor(dur/60), dur - 60 * math.floor(dur/60)))
+			print('%02d:%05.2f' % (math.floor(dur / 60), dur - 60 * math.floor(dur / 60)))
 		else:
 			if options.annotate_file:
 				f = open(options.annotate_file, "w")
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index 43c8cf65ad..3dc5da081b 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -38,7 +38,7 @@ class Trace:
         self.min = None
         self.max = None
         self.headers = None
-        self.disk_stats =  []
+        self.disk_stats = []
         self.ps_stats = None
         self.taskstats = None
         self.cpu_stats = []
@@ -177,12 +177,12 @@ class Trace:
             k = j + 1
             while k < len(util) and util[k][0] < start + 300:
                 k += 1
-            k = min(k, len(util)-1)
+            k = min(k, len(util) - 1)
 
             if util[j][1] >= 0.25:
                 return False
 
-            avgload = sum(u[1] for u in util[j:k+1]) / (k-j+1)
+            avgload = sum(u[1] for u in util[j:k + 1]) / (k - j + 1)
             if avgload < 0.25:
                 return True
             else:
@@ -304,8 +304,8 @@ def _parse_proc_ps_log(writer, file):
                 continue
 
             offset = [index for index, token in enumerate(tokens[1:]) if token[-1] == ')'][0]
-            pid, cmd, state, ppid = int(tokens[0]), ' '.join(tokens[1:2+offset]), tokens[2+offset], int(tokens[3+offset])
-            userCpu, sysCpu, stime = int(tokens[13+offset]), int(tokens[14+offset]), int(tokens[21+offset])
+            pid, cmd, state, ppid = int(tokens[0]), ' '.join(tokens[1:2 + offset]), tokens[2 + offset], int(tokens[3 + offset])
+            userCpu, sysCpu, stime = int(tokens[13 + offset]), int(tokens[14 + offset]), int(tokens[21 + offset])
 
             # magic fixed point-ness ...
             pid *= 1000
@@ -330,7 +330,7 @@ def _parse_proc_ps_log(writer, file):
         return None
 
     startTime = timed_blocks[0][0]
-    avgSampleLength = (ltime - startTime)/(len(timed_blocks) - 1)
+    avgSampleLength = (ltime - startTime) / (len(timed_blocks) - 1)
 
     return ProcessStats(writer, processMap, len(timed_blocks), avgSampleLength, startTime, ltime)
 
@@ -417,7 +417,7 @@ def _parse_taskstats_log(writer, file):
         return None
 
     startTime = timed_blocks[0][0]
-    avgSampleLength = (ltime - startTime)/(len(timed_blocks)-1)
+    avgSampleLength = (ltime - startTime) / (len(timed_blocks) - 1)
 
     return ProcessStats(writer, processMap, len(timed_blocks), avgSampleLength, startTime, ltime)
 
@@ -438,7 +438,7 @@ def _parse_proc_stat_log(file):
             iowait = float(times[4] - ltimes[4])
 
             aSum = max(user + system + idle + iowait, 1)
-            samples.append(CPUSample(time, user/aSum, system/aSum, iowait/aSum))
+            samples.append(CPUSample(time, user / aSum, system / aSum, iowait / aSum))
 
         ltimes = times
         # skip the rest of statistics lines
@@ -644,7 +644,7 @@ def _parse_pacct(writer, file):
     # read LE int32
     def _read_le_int32(file):
         byts = file.read(4)
-        return (ord(byts[0]))       | (ord(byts[1]) << 8) | \
+        return (ord(byts[0])) | (ord(byts[1]) << 8) | \
                (ord(byts[2]) << 16) | (ord(byts[3]) << 24)
 
     parent_map = {}
@@ -746,7 +746,7 @@ def _do_parse(writer, state, filename, file):
     elif not filename.endswith('.log'):
         _parse_bitbake_buildstats(writer, state, filename, file)
     t2 = time.process_time()
-    writer.info("  %s seconds" % str(t2-t1))
+    writer.info("  %s seconds" % str(t2 - t1))
     return state
 
 def parse_file(writer, state, filename):
diff --git a/scripts/pybootchartgui/pybootchartgui/process_tree.py b/scripts/pybootchartgui/pybootchartgui/process_tree.py
index b429e4b9ba..3e94db3f3a 100644
--- a/scripts/pybootchartgui/pybootchartgui/process_tree.py
+++ b/scripts/pybootchartgui/pybootchartgui/process_tree.py
@@ -246,11 +246,11 @@ class ProcessTree:
         """
         num_removed = 0
         idx = 0
-        while idx < len(process_subtree)-1:
+        while idx < len(process_subtree) - 1:
             p = process_subtree[idx]
-            nextp = process_subtree[idx+1]
+            nextp = process_subtree[idx + 1]
             if nextp.cmd == p.cmd:
-                process_subtree.pop(idx+1)
+                process_subtree.pop(idx + 1)
                 idx -= 1
                 num_removed += 1
                 p.child_list.extend(nextp.child_list)
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py
index 0b46c1491c..4a55427655 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -143,7 +143,7 @@ class Process:
 
         activeCount = sum([1 for sample in self.samples if sample.cpu_sample and sample.cpu_sample.sys + sample.cpu_sample.user + sample.cpu_sample.io > 0.0])
         activeCount = activeCount + sum([1 for sample in self.samples if sample.state == 'D'])
-        self.active = (activeCount>2)
+        self.active = (activeCount > 2)
 
     def calc_load(self, userCpu, sysCpu, interval):
         userCpuLoad = float(userCpu - self.last_user_cpu_time) / interval
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
index 18943f3037..1f66027a6e 100644
--- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
+++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
@@ -15,7 +15,7 @@ import pybootchartgui.main as main
 debug = False
 
 def floatEq(f1, f2):
-	return math.fabs(f1-f2) < 0.00001
+	return math.fabs(f1 - f2) < 0.00001
 
 bootchart_dir = os.path.join(os.path.dirname(sys.argv[0]), '../../examples/1/')
 parser = main._mk_options_parser()
diff --git a/scripts/pythondeps b/scripts/pythondeps
index be21dd84eb..7b41c336a1 100755
--- a/scripts/pythondeps
+++ b/scripts/pythondeps
@@ -80,7 +80,7 @@ def get_provides(path):
     else:
         libdir = ''
 
-    package_relpath = pkg_path[len(libdir)+1:]
+    package_relpath = pkg_path[len(libdir) + 1:]
     package = '.'.join(package_relpath.split(os.sep))
     if not isdir:
         yield package, path
@@ -89,7 +89,7 @@ def get_provides(path):
             yield package, path
 
         for dirpath, dirnames, filenames in os.walk(path):
-            relpath = dirpath[len(path)+1:]
+            relpath = dirpath[len(path) + 1:]
             if relpath:
                 if '__init__.py' not in filenames:
                     dirnames[:] = []
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index 692a9d5ed6..b919e0167d 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -31,7 +31,7 @@ old_prefix = re.compile(b("##DEFAULT_INSTALL_DIR##"))
 
 def get_arch():
     f.seek(0)
-    e_ident =f.read(16)
+    e_ident = f.read(16)
     ei_mag0,ei_mag1_3,ei_class = struct.unpack("<B3sB11x", e_ident)
 
     if (ei_mag0 != 0x7f and ei_mag1_3 != "ELF") or ei_class == 0:
@@ -217,10 +217,10 @@ executables_list = sys.argv[3:]
 
 for e in executables_list:
     perms = os.stat(e)[stat.ST_MODE]
-    if os.access(e, os.W_OK|os.R_OK):
+    if os.access(e, os.W_OK | os.R_OK):
         perms = None
     else:
-        os.chmod(e, perms|stat.S_IRWXU)
+        os.chmod(e, perms | stat.S_IRWXU)
 
     try:
         f = open(e, "r+b")
diff --git a/scripts/runqemu b/scripts/runqemu
index 2f2ef17fa1..fceebfce4c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -217,7 +217,7 @@ class BaseConfig(object):
         logger.debug("Acquiring lockfile %s..." % self.taplock)
         try:
             self.taplock_descriptor = open(self.taplock, 'w')
-            fcntl.flock(self.taplock_descriptor, fcntl.LOCK_EX|fcntl.LOCK_NB)
+            fcntl.flock(self.taplock_descriptor, fcntl.LOCK_EX | fcntl.LOCK_NB)
         except Exception as e:
             msg = "Acquiring lockfile %s failed: %s" % (self.taplock, e)
             if error:
@@ -261,7 +261,7 @@ class BaseConfig(object):
         try:
             portlock_descriptor = open(lockfile, 'w')
             self.portlocks.update({lockfile: portlock_descriptor})
-            fcntl.flock(self.portlocks[lockfile], fcntl.LOCK_EX|fcntl.LOCK_NB)
+            fcntl.flock(self.portlocks[lockfile], fcntl.LOCK_EX | fcntl.LOCK_NB)
         except Exception as e:
             msg = "Acquiring lockfile %s failed: %s" % (lockfile, e)
             logger.info(msg)
@@ -352,7 +352,7 @@ class BaseConfig(object):
         elif re.search('\.bin$', p) or re.search('bzImage', p) or \
              re.search('zImage', p) or re.search('vmlinux', p) or \
              re.search('fitImage', p) or re.search('uImage', p):
-            self.kernel =  p
+            self.kernel = p
         elif os.path.exists(p) and (not os.path.isdir(p)) and '-image-' in os.path.basename(p):
             self.rootfs = p
             # Check filename against self.fstypes can hanlde <file>.cpio.gz,
@@ -365,7 +365,7 @@ class BaseConfig(object):
             if not fst:
                 m = re.search('.*\.(.*)$', self.rootfs)
                 if m:
-                    fst =  m.group(1)
+                    fst = m.group(1)
             if fst:
                 self.check_arg_fstype(fst)
                 qb = re.sub('\.' + fst + "$", '', self.rootfs)
@@ -565,7 +565,7 @@ class BaseConfig(object):
             logger.error("For further help see:")
             raise RunQemuError(yocto_kvm_wiki)
 
-        if os.access(dev_kvm, os.W_OK|os.R_OK):
+        if os.access(dev_kvm, os.W_OK | os.R_OK):
             self.qemu_opt_script += ' -enable-kvm'
             if self.get('MACHINE') == "qemux86":
                 # Workaround for broken APIC window on pre 4.15 host kernels which causes boot hangs
@@ -583,7 +583,7 @@ class BaseConfig(object):
                 logger.error("For further help see:")
                 raise RunQemuError(yocto_paravirt_kvm_wiki)
 
-            if not os.access(dev_vhost, os.W_OK|os.R_OK):
+            if not os.access(dev_vhost, os.W_OK | os.R_OK):
                 logger.error("You have no read or write permission on /dev/vhost-net.")
                 logger.error("Please change the ownership of this file as described at:")
                 raise RunQemuError(yocto_paravirt_kvm_wiki)
@@ -856,7 +856,7 @@ class BaseConfig(object):
                 self.qemuboot = "%s/%s-%s.qemuboot.conf" % (deploy_dir_image,
                         self.rootfs, machine)
             else:
-                cmd = 'ls -t %s/*.qemuboot.conf' %  deploy_dir_image
+                cmd = 'ls -t %s/*.qemuboot.conf' % deploy_dir_image
                 logger.debug('Running %s...' % cmd)
                 try:
                     qbs = subprocess.check_output(cmd, shell=True).decode('utf-8')
@@ -958,7 +958,7 @@ class BaseConfig(object):
         except KeyError:
             fstype_flags = ''
         logoutput.append('FSTYPE: [%s%s]' % (self.fstype, fstype_flags))
-        if self.fstype  == 'nfs':
+        if self.fstype == 'nfs':
             logoutput.append('NFS_DIR: [%s]' % self.rootfs)
         else:
             logoutput.append('ROOTFS: [%s]' % self.rootfs)
@@ -998,7 +998,7 @@ class BaseConfig(object):
             # Use '%s' since they are integers
             os.putenv(k, '%s' % v)
 
-        self.unfs_opts="nfsvers=3,port=%s,tcp,mountport=%s" % (nfsd_port, mountd_port)
+        self.unfs_opts = "nfsvers=3,port=%s,tcp,mountport=%s" % (nfsd_port, mountd_port)
 
         # Extract .tar.bz2 or .tar.bz if no nfs dir
         if not (self.rootfs and os.path.isdir(self.rootfs)):
@@ -1127,7 +1127,7 @@ class BaseConfig(object):
             if self.acquire_taplock(error=False):
                 tap = p
                 logger.info("Using preconfigured tap device %s" % tap)
-                logger.info("If this is not intended, touch %s.skip to make runqemu skip %s." %(lockfile, tap))
+                logger.info("If this is not intended, touch %s.skip to make runqemu skip %s." % (lockfile, tap))
                 break
 
         if not tap:
@@ -1354,13 +1354,13 @@ class BaseConfig(object):
                     self.qemu_opt += 'gl=es,'
             self.qemu_opt += 'show-cursor=on'
 
-        self.qemu_opt += ' %s' %self.get('QB_GRAPHICS')
+        self.qemu_opt += ' %s' % self.get('QB_GRAPHICS')
 
     def setup_serial(self):
         # Setup correct kernel command line for serial
         if self.serialstdio == True or self.serialconsole == True or self.nographic == True or self.tcpserial_portnum:
             for entry in self.get('SERIAL_CONSOLES').split(' '):
-                self.kernel_cmdline_script += ' console=%s' %entry.split(';')[1]
+                self.kernel_cmdline_script += ' console=%s' % entry.split(';')[1]
 
         if self.serialstdio == True or self.nographic == True:
             self.qemu_opt += " -serial mon:stdio"
diff --git a/scripts/send-error-report b/scripts/send-error-report
index ffa0a199b1..3fa03af2cf 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -66,7 +66,7 @@ def edit_content(json_file_path):
 
 def prepare_data(args):
     # attempt to get the max_log_size from the server's settings
-    max_log_size = getPayloadLimit(args.protocol+args.server+"/ClientPost/JSON")
+    max_log_size = getPayloadLimit(args.protocol + args.server + "/ClientPost/JSON")
 
     if not os.path.isfile(args.error_file):
         log.error("No data file found.")
@@ -89,7 +89,7 @@ def prepare_data(args):
         pass
 
     if args.assume_yes == True and len(args.name) == 0:
-        log.error("Name needs to be provided either via "+userfile+" or as an argument (-n).")
+        log.error("Name needs to be provided either via " + userfile + " or as an argument (-n).")
         sys.exit(1)
 
     while len(args.name) <= 0 or len(args.name) > 50:
@@ -133,12 +133,12 @@ def prepare_data(args):
 
 
 def send_data(data, args):
-    headers={'Content-type': 'application/json', 'User-Agent': "send-error-report/"+version}
+    headers = {'Content-type': 'application/json', 'User-Agent': "send-error-report/" + version}
 
     if args.json:
-        url = args.protocol+args.server+"/ClientPost/JSON/"
+        url = args.protocol + args.server + "/ClientPost/JSON/"
     else:
-        url = args.protocol+args.server+"/ClientPost/"
+        url = args.protocol + args.server + "/ClientPost/"
 
     req = urllib.request.Request(url, data=data, headers=headers)
     try:
@@ -201,7 +201,7 @@ if __name__ == '__main__':
     args = arg_parse.parse_args()
 
     if (args.json == False):
-        print("Preparing to send errors to: "+args.server)
+        print("Preparing to send errors to: " + args.server)
 
     data = prepare_data(args)
     send_data(data, args)
diff --git a/scripts/sysroot-relativelinks.py b/scripts/sysroot-relativelinks.py
index 56e36f3ad5..667d95404b 100755
--- a/scripts/sysroot-relativelinks.py
+++ b/scripts/sysroot-relativelinks.py
@@ -23,9 +23,9 @@ def handlelink(filep, subdir):
     if link.startswith(topdir):
         return
     #print("Replacing %s with %s for %s" % (link, topdir+link, filep))
-    print("Replacing %s with %s for %s" % (link, os.path.relpath(topdir+link, subdir), filep))
+    print("Replacing %s with %s for %s" % (link, os.path.relpath(topdir + link, subdir), filep))
     os.unlink(filep)
-    os.symlink(os.path.relpath(topdir+link, subdir), filep)
+    os.symlink(os.path.relpath(topdir + link, subdir), filep)
 
 for subdir, dirs, files in os.walk(topdir):
     for f in dirs + files:
diff --git a/scripts/task-time b/scripts/task-time
index bcd1e25817..a008a0ea3d 100755
--- a/scripts/task-time
+++ b/scripts/task-time
@@ -41,11 +41,11 @@ sorted in descending order from the highest value.
 args = arg_parser.parse_args()
 
 # Field names and regexes for parsing out their values from buildstat files
-field_regexes = (("elapsed",    ".*Elapsed time: ([0-9.]+)"),
-                 ("user",       "rusage ru_utime: ([0-9.]+)"),
-                 ("sys",        "rusage ru_stime: ([0-9.]+)"),
+field_regexes = (("elapsed", ".*Elapsed time: ([0-9.]+)"),
+                 ("user", "rusage ru_utime: ([0-9.]+)"),
+                 ("sys", "rusage ru_stime: ([0-9.]+)"),
                  ("child user", "Child rusage ru_utime: ([0-9.]+)"),
-                 ("child sys",  "Child rusage ru_stime: ([0-9.]+)"))
+                 ("child sys", "Child rusage ru_stime: ([0-9.]+)"))
 
 # A list of (<path>, <dict>) tuples, where <path> is the path of a do_* task
 # buildstat file and <dict> maps fields from the file to their values
@@ -127,9 +127,9 @@ try:
               "user\t{}m{:.3f}s\n"
               "sys\t{}m{:.3f}s"
               .format(task_info[0],
-                      int(real//60), real%60,
-                      int(user//60), user%60,
-                      int(sys//60), sys%60))
+                      int(real // 60), real % 60,
+                      int(user // 60), user % 60,
+                      int(sys // 60), sys % 60))
 
 except BrokenPipeError:
     pass
diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
index 01c561b9a9..b9c1c42f41 100755
--- a/scripts/tiny/ksize.py
+++ b/scripts/tiny/ksize.py
@@ -40,7 +40,7 @@ class Sizes:
 
     def show(self, indent=""):
         print("%-32s %10d | %10d %10d %10d" %
-              (indent+self.title, self.total, self.text, self.data, self.bss))
+              (indent + self.title, self.total, self.text, self.data, self.bss))
 
 
 class Report:
@@ -86,7 +86,7 @@ class Report:
     def show(self, indent=""):
         rule = str.ljust(indent, 80, '-')
         print("%-32s %10s | %10s %10s %10s" %
-              (indent+self.title, "total", "text", "data", "bss"))
+              (indent + self.title, "total", "text", "data", "bss"))
         print(rule)
         self.sizes.show(indent)
         print(rule)
@@ -95,10 +95,10 @@ class Report:
                 p.sizes.show(indent)
         print(rule)
         print("%-32s %10d | %10d %10d %10d" %
-              (indent+"sum", self.totals["total"], self.totals["text"],
+              (indent + "sum", self.totals["total"], self.totals["text"],
                self.totals["data"], self.totals["bss"]))
         print("%-32s %10d | %10d %10d %10d" %
-              (indent+"delta", self.deltas["total"], self.deltas["text"],
+              (indent + "delta", self.deltas["total"], self.deltas["text"],
                self.deltas["data"], self.deltas["bss"]))
         print("\n")
 
@@ -140,7 +140,7 @@ def main():
             assert False, "unhandled option"
 
     glob = "arch/*/built-in.[o,a] */built-in.[o,a]"
-    vmlinux = Report.create("vmlinux",  "Linux Kernel", glob)
+    vmlinux = Report.create("vmlinux", "Linux Kernel", glob)
 
     vmlinux.show()
     for b in vmlinux.parts:
diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
index a63f6c8115..7e44af3410 100755
--- a/scripts/verify-bashisms
+++ b/scripts/verify-bashisms
@@ -95,7 +95,7 @@ def get_tinfoil():
     # tinfoil.logger.setLevel(logging.WARNING)
     return tinfoil
 
-if __name__=='__main__':
+if __name__ == '__main__':
     import argparse
     import shutil
 
diff --git a/scripts/wic b/scripts/wic
index 9fd2551b6f..17ed688bf4 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -277,31 +277,31 @@ wic_help_topic_usage = """
 """
 
 helptopics = {
-    "plugins":   [wic_help_topic_subcommand,
+    "plugins": [wic_help_topic_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_plugins_help],
-    "overview":  [wic_help_topic_subcommand,
+    "overview": [wic_help_topic_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_overview_help],
     "kickstart": [wic_help_topic_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_kickstart_help],
-    "create":    [wic_help_topic_subcommand,
+    "create": [wic_help_topic_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_create_help],
-    "ls":        [wic_help_topic_subcommand,
+    "ls": [wic_help_topic_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_ls_help],
-    "cp":        [wic_help_topic_subcommand,
+    "cp": [wic_help_topic_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_cp_help],
-    "rm":        [wic_help_topic_subcommand,
+    "rm": [wic_help_topic_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_rm_help],
-    "write":     [wic_help_topic_subcommand,
+    "write": [wic_help_topic_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_write_help],
-    "list":      [wic_help_topic_subcommand,
+    "list": [wic_help_topic_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_list_help]
 }
@@ -458,31 +458,31 @@ def wic_init_parser_help(subparser):
 
 
 subcommands = {
-    "create":    [wic_create_subcommand,
+    "create": [wic_create_subcommand,
                   hlp.wic_create_usage,
                   hlp.wic_create_help,
                   wic_init_parser_create],
-    "list":      [wic_list_subcommand,
+    "list": [wic_list_subcommand,
                   hlp.wic_list_usage,
                   hlp.wic_list_help,
                   wic_init_parser_list],
-    "ls":        [wic_ls_subcommand,
+    "ls": [wic_ls_subcommand,
                   hlp.wic_ls_usage,
                   hlp.wic_ls_help,
                   wic_init_parser_ls],
-    "cp":        [wic_cp_subcommand,
+    "cp": [wic_cp_subcommand,
                   hlp.wic_cp_usage,
                   hlp.wic_cp_help,
                   wic_init_parser_cp],
-    "rm":        [wic_rm_subcommand,
+    "rm": [wic_rm_subcommand,
                   hlp.wic_rm_usage,
                   hlp.wic_rm_help,
                   wic_init_parser_rm],
-    "write":     [wic_write_subcommand,
+    "write": [wic_write_subcommand,
                   hlp.wic_write_usage,
                   hlp.wic_write_help,
                   wic_init_parser_write],
-    "help":      [wic_help_subcommand,
+    "help": [wic_help_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_help_help,
                   wic_init_parser_help]
diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer
index c345ca5674..58f180e889 100755
--- a/scripts/yocto-check-layer
+++ b/scripts/yocto-check-layer
@@ -219,7 +219,7 @@ def main():
 
 if __name__ == '__main__':
     try:
-        ret =  main()
+        ret = main()
     except Exception:
         ret = 1
         import traceback
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 6/8] PEP8 double aggressive E225 ~ E228 and E231
  2021-06-28  5:59 [PATCH 1/8] PEP8 double aggressive E401 Khem Raj
                   ` (3 preceding siblings ...)
  2021-06-28  5:59 ` [PATCH 5/8] PEP8 double aggressive E22, E224, E241, E242 and E27 Khem Raj
@ 2021-06-28  5:59 ` Khem Raj
  2021-06-28  5:59 ` [PATCH 7/8] PEP8 double aggressive E301 ~ E306 Khem Raj
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Khem Raj @ 2021-06-28  5:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: persianpros, Khem Raj

From: persianpros <persianpros@yahoo.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-selftest/lib/devtool/bbpath.py           |  2 +-
 meta-selftest/lib/recipetool/bbpath.py        |  2 +-
 meta/lib/oe/buildhistory_analysis.py          | 18 +++++++-------
 meta/lib/oe/cve_check.py                      |  2 +-
 meta/lib/oe/data.py                           |  4 ++--
 meta/lib/oe/distro_check.py                   |  4 ++--
 meta/lib/oe/elf.py                            | 14 +++++------
 meta/lib/oe/gpg_sign.py                       |  4 ++--
 meta/lib/oe/lsb.py                            |  2 +-
 meta/lib/oe/package.py                        |  2 +-
 meta/lib/oe/package_manager/__init__.py       |  4 ++--
 meta/lib/oe/package_manager/ipk/__init__.py   |  2 +-
 meta/lib/oe/package_manager/rpm/__init__.py   | 10 ++++----
 meta/lib/oe/patch.py                          |  2 +-
 meta/lib/oe/prservice.py                      | 12 +++++-----
 meta/lib/oe/recipeutils.py                    |  6 ++---
 meta/lib/oe/sdk.py                            |  2 +-
 meta/lib/oe/terminal.py                       |  4 ++--
 meta/lib/oe/utils.py                          |  2 +-
 meta/lib/oeqa/core/loader.py                  |  2 +-
 meta/lib/oeqa/core/tests/cases/data.py        |  2 +-
 meta/lib/oeqa/oetest.py                       |  6 ++---
 meta/lib/oeqa/runexported.py                  |  2 +-
 meta/lib/oeqa/runtime/cases/boot.py           |  2 +-
 meta/lib/oeqa/runtime/cases/df.py             |  2 +-
 meta/lib/oeqa/runtime/cases/dnf.py            |  6 ++---
 .../oeqa/runtime/cases/ethernet_ip_connman.py |  6 ++---
 meta/lib/oeqa/runtime/cases/ltp.py            |  2 +-
 meta/lib/oeqa/runtime/cases/oe_syslog.py      |  2 +-
 meta/lib/oeqa/runtime/cases/parselogs.py      |  2 +-
 meta/lib/oeqa/runtime/cases/ping.py           |  2 +-
 meta/lib/oeqa/runtime/cases/rpm.py            |  2 +-
 meta/lib/oeqa/runtime/cases/systemd.py        |  6 ++---
 meta/lib/oeqa/selftest/cases/bbtests.py       |  6 ++---
 meta/lib/oeqa/selftest/cases/cve_check.py     | 24 +++++++++----------
 meta/lib/oeqa/selftest/cases/devtool.py       | 24 +++++++++----------
 meta/lib/oeqa/selftest/cases/fitimage.py      | 12 +++++-----
 meta/lib/oeqa/selftest/cases/imagefeatures.py |  4 ++--
 meta/lib/oeqa/selftest/cases/manifest.py      |  2 +-
 meta/lib/oeqa/selftest/cases/meta_ide.py      |  2 +-
 .../oeqa/selftest/cases/oelib/buildhistory.py |  4 ++--
 meta/lib/oeqa/selftest/cases/oescripts.py     |  2 +-
 meta/lib/oeqa/selftest/cases/runtime_test.py  |  8 +++----
 meta/lib/oeqa/selftest/cases/sstatetests.py   |  2 +-
 meta/lib/oeqa/selftest/cases/wic.py           |  8 +++----
 meta/lib/oeqa/utils/decorators.py             | 22 ++++++++---------
 meta/lib/oeqa/utils/package_manager.py        |  4 ++--
 meta/lib/oeqa/utils/qemurunner.py             |  6 ++---
 meta/lib/oeqa/utils/qemutinyrunner.py         |  8 +++----
 meta/lib/oeqa/utils/testexport.py             | 18 +++++++-------
 .../python/python3/create_manifest3.py        | 18 +++++++-------
 .../python/python3/get_module_deps3.py        | 14 +++++------
 .../perf/perf/sort-pmuevents.py               |  2 +-
 meta/recipes-rt/rt-tests/files/rt_bmark.py    |  2 +-
 scripts/combo-layer                           | 10 ++++----
 scripts/contrib/image-manifest                | 12 +++++-----
 scripts/contrib/list-packageconfig-flags.py   |  2 +-
 scripts/install-buildtools                    |  2 +-
 scripts/lib/buildstats.py                     |  2 +-
 scripts/lib/devtool/export.py                 |  2 +-
 scripts/lib/devtool/menuconfig.py             | 16 ++++++-------
 scripts/lib/devtool/standard.py               | 22 ++++++++---------
 scripts/lib/devtool/upgrade.py                |  6 ++---
 scripts/lib/recipetool/append.py              |  4 ++--
 scripts/lib/recipetool/create.py              |  2 +-
 scripts/lib/recipetool/create_buildsys.py     |  2 +-
 scripts/lib/resulttool/manualexecution.py     |  8 +++----
 scripts/lib/resulttool/report.py              |  2 +-
 scripts/lib/wic/engine.py                     |  2 +-
 scripts/lib/wic/plugins/imager/direct.py      |  4 ++--
 scripts/oe-pkgdata-util                       |  2 +-
 scripts/opkg-query-helper.py                  |  8 +++----
 scripts/pybootchartgui/pybootchartgui/draw.py |  2 +-
 .../pybootchartgui/pybootchartgui/parsing.py  |  4 ++--
 .../pybootchartgui/pybootchartgui/samples.py  |  2 +-
 .../pybootchartgui/tests/parser_test.py       |  2 +-
 .../pybootchartgui/tests/process_tree_test.py |  2 +-
 scripts/relocate_sdk.py                       |  6 ++---
 scripts/runqemu                               |  4 ++--
 scripts/tiny/ksize.py                         |  4 ++--
 scripts/wic                                   |  2 +-
 81 files changed, 235 insertions(+), 235 deletions(-)

diff --git a/meta-selftest/lib/devtool/bbpath.py b/meta-selftest/lib/devtool/bbpath.py
index 0204f13dd1..973ed779af 100644
--- a/meta-selftest/lib/devtool/bbpath.py
+++ b/meta-selftest/lib/devtool/bbpath.py
@@ -14,7 +14,7 @@ def print_name(args, config, basepath, workspace):
     print(__file__)
 
 def print_bbdir(args, config, basepath, workspace):
-    print(__file__.replace('/lib/devtool/bbpath.py',''))
+    print(__file__.replace('/lib/devtool/bbpath.py', ''))
 
 def print_registered(args, config, basepath, workspace):
     global kept_context
diff --git a/meta-selftest/lib/recipetool/bbpath.py b/meta-selftest/lib/recipetool/bbpath.py
index 23e6fa1b06..d0df800c3d 100644
--- a/meta-selftest/lib/recipetool/bbpath.py
+++ b/meta-selftest/lib/recipetool/bbpath.py
@@ -14,7 +14,7 @@ def print_name(opts):
     print(__file__)
 
 def print_bbdir(opts):
-    print(__file__.replace('/lib/recipetool/bbpath.py',''))
+    print(__file__.replace('/lib/recipetool/bbpath.py', ''))
 
 def print_registered(opts):
     #global kept_context
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index a54c09ca56..44b02c1ae0 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -79,9 +79,9 @@ class ChangeRecord:
 
         def pkglist_combine(depver):
             pkglist = []
-            for k,v in depver.items():
+            for k, v in depver.items():
                 if v:
-                    pkglist.append("%s (%s)" % (k,v))
+                    pkglist.append("%s (%s)" % (k, v))
                 else:
                     pkglist.append(k)
             return pkglist
@@ -98,9 +98,9 @@ class ChangeRecord:
                 rename = False
                 for dir2, files2 in files_ba:
                     if files1 == files2 and not rename:
-                        renamed_dirs.append((dir1,dir2))
+                        renamed_dirs.append((dir1, dir2))
                         # Make sure that we don't use this (dir, files) pair again.
-                        files_ba.remove((dir2,files2))
+                        files_ba.remove((dir2, files2))
                         # If a dir has already been found to have a rename, stop and go no further.
                         rename = True
 
@@ -261,7 +261,7 @@ def blob_to_dict(blob):
     alines = [line for line in blob.data_stream.read().decode('utf-8').splitlines()]
     adict = {}
     for line in alines:
-        splitv = [i.strip() for i in line.split('=',1)]
+        splitv = [i.strip() for i in line.split('=', 1)]
         if len(splitv) > 1:
             adict[splitv[0]] = splitv[1]
     return adict
@@ -271,7 +271,7 @@ def file_list_to_dict(lines):
     adict = {}
     for line in lines:
         # Leave the last few fields intact so we handle file names containing spaces
-        splitv = line.split(None,4)
+        splitv = line.split(None, 4)
         # Grab the path and remove the leading .
         path = splitv[4][1:].strip()
         # Handle symlinks
@@ -639,7 +639,7 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep
             elif filename == 'sysroot':
                 alines = d.a_blob.data_stream.read().decode('utf-8').splitlines()
                 blines = d.b_blob.data_stream.read().decode('utf-8').splitlines()
-                filechanges = compare_file_lists(alines,blines, compare_ownership=False)
+                filechanges = compare_file_lists(alines, blines, compare_ownership=False)
                 if filechanges:
                     chg = ChangeRecord(path, filename, None, None, True)
                     chg.filechanges = filechanges
@@ -651,7 +651,7 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep
                 if filename == 'files-in-image.txt':
                     alines = d.a_blob.data_stream.read().decode('utf-8').splitlines()
                     blines = d.b_blob.data_stream.read().decode('utf-8').splitlines()
-                    filechanges = compare_file_lists(alines,blines)
+                    filechanges = compare_file_lists(alines, blines)
                     if filechanges:
                         chg = ChangeRecord(path, filename, None, None, True)
                         chg.filechanges = filechanges
@@ -659,7 +659,7 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep
                 elif filename == 'installed-package-names.txt':
                     alines = d.a_blob.data_stream.read().decode('utf-8').splitlines()
                     blines = d.b_blob.data_stream.read().decode('utf-8').splitlines()
-                    filechanges = compare_lists(alines,blines)
+                    filechanges = compare_lists(alines, blines)
                     if filechanges:
                         chg = ChangeRecord(path, filename, None, None, True)
                         chg.filechanges = filechanges
diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py
index 6db988d5d0..cb4c86cf29 100644
--- a/meta/lib/oe/cve_check.py
+++ b/meta/lib/oe/cve_check.py
@@ -27,7 +27,7 @@ class Version():
             raise Exception("Invalid version: '{0}'".format(version))
 
         self._version = _Version(
-            release=tuple(int(i) for i in match.group("release").replace("-",".").split(".")),
+            release=tuple(int(i) for i in match.group("release").replace("-", ".").split(".")),
             patch_l=match.group("patch_l") if str(suffix) in suffixes and match.group("patch_l") else "",
             pre_l=match.group("pre_l"),
             pre_v=match.group("pre_v")
diff --git a/meta/lib/oe/data.py b/meta/lib/oe/data.py
index 602130a904..a340ce3b1b 100644
--- a/meta/lib/oe/data.py
+++ b/meta/lib/oe/data.py
@@ -21,7 +21,7 @@ def typed_value(key, d):
     except (TypeError, ValueError) as exc:
         bb.msg.fatal("Data", "%s: %s" % (key, str(exc)))
 
-def export2json(d, json_file, expand=True, searchString="",replaceString=""):
+def export2json(d, json_file, expand=True, searchString="", replaceString=""):
     data2export = {}
     keys2export = []
 
@@ -41,7 +41,7 @@ def export2json(d, json_file, expand=True, searchString="",replaceString=""):
 
     for key in keys2export:
         try:
-            data2export[key] = d.getVar(key, expand).replace(searchString,replaceString)
+            data2export[key] = d.getVar(key, expand).replace(searchString, replaceString)
         except bb.data_smart.ExpansionError:
             data2export[key] = ''
         except AttributeError:
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 0a9f4d162c..213c9e66e1 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -14,7 +14,7 @@ def get_links_from_url(url, d):
 
     from bs4 import BeautifulSoup, SoupStrainer
 
-    soup = BeautifulSoup(create_socket(url,d), "html.parser", parse_only=SoupStrainer("a"))
+    soup = BeautifulSoup(create_socket(url, d), "html.parser", parse_only=SoupStrainer("a"))
     hyperlinks = []
     for line in soup.find_all('a', href=True):
         hyperlinks.append(line['href'].strip('/'))
@@ -246,7 +246,7 @@ def compare_in_distro_packages_list(distro_check_dir, d):
 
     bb.note("Recipe: %s" % recipe_name)
 
-    distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "Windriver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'})
+    distro_exceptions = dict({"OE-Core": 'OE-Core', "OpenedHand": 'OpenedHand', "Intel": 'Intel', "Upstream": 'Upstream', "Windriver": 'Windriver', "OSPDT": 'OSPDT Approved', "Poky": 'poky'})
     tmp = localdata.getVar('DISTRO_PN_ALIAS') or ""
     for str in tmp.split():
         if str and str.find("=") == -1 and distro_exceptions[str]:
diff --git a/meta/lib/oe/elf.py b/meta/lib/oe/elf.py
index acc4185544..b307e4a651 100644
--- a/meta/lib/oe/elf.py
+++ b/meta/lib/oe/elf.py
@@ -13,7 +13,7 @@ def machine_dict(d):
                       },
             "elf": {
                         "aarch64": (183, 0, 0, True, 64),
-                        "aarch64_be":(183, 0, 0, False, 64),
+                        "aarch64_be": (183, 0, 0, False, 64),
                         "i586": (3, 0, 0, True, 32),
                         "i686": (3, 0, 0, True, 32),
                         "x86_64": (62, 0, 0, True, 64),
@@ -22,14 +22,14 @@ def machine_dict(d):
                         "mips": (8, 0, 0, False, 32),
                         "mipsel": (8, 0, 0, True, 32),
                         "microblaze": (189, 0, 0, False, 32),
-                        "microblazeel":(189, 0, 0, True, 32),
+                        "microblazeel": (189, 0, 0, True, 32),
                         "powerpc": (20, 0, 0, False, 32),
                         "riscv32": (243, 0, 0, True, 32),
                         "riscv64": (243, 0, 0, True, 64),
                       },
             "linux": { 
                         "aarch64": (183, 0, 0, True, 64),
-                        "aarch64_be":(183, 0, 0, False, 64),
+                        "aarch64_be": (183, 0, 0, False, 64),
                         "arm": (40, 97, 0, True, 32),
                         "armeb": (40, 97, 0, False, 32),
                         "powerpc": (20, 0, 0, False, 32),
@@ -59,11 +59,11 @@ def machine_dict(d):
                         "sh4": (42, 0, 0, True, 32),
                         "sparc": (2, 0, 0, False, 32),
                         "microblaze": (189, 0, 0, False, 32),
-                        "microblazeel":(189, 0, 0, True, 32),
+                        "microblazeel": (189, 0, 0, True, 32),
                       },
             "linux-musl": { 
                         "aarch64": (183, 0, 0, True, 64),
-                        "aarch64_be":(183, 0, 0, False, 64),
+                        "aarch64_be": (183, 0, 0, False, 64),
                         "arm": (40, 97, 0, True, 32),
                         "armeb": (40, 97, 0, False, 32),
                         "powerpc": (20, 0, 0, False, 32),
@@ -79,7 +79,7 @@ def machine_dict(d):
                         "mips64": (8, 0, 0, False, 64),
                         "mips64el": (8, 0, 0, True, 64),
                         "microblaze": (189, 0, 0, False, 32),
-                        "microblazeel":(189, 0, 0, True, 32),
+                        "microblazeel": (189, 0, 0, True, 32),
                         "riscv32": (243, 0, 0, True, 32),
                         "riscv64": (243, 0, 0, True, 64),
                         "sh4": (42, 0, 0, True, 32),
@@ -118,7 +118,7 @@ def machine_dict(d):
                         "mips64": (8, 0, 0, False, 32),
                         "mips64el": (8, 0, 0, True, 32),
                         "mipsisa64r6": (8, 0, 0, False, 32),
-                        "mipsisa64r6el":(8, 0, 0, True, 32),
+                        "mipsisa64r6el": (8, 0, 0, True, 32),
                       },
         }
 
diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index 7686596ac8..805cedd963 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -41,7 +41,7 @@ class LocalSigner(object):
 
         cmd = self.rpm_bin + " --addsign --define '_gpg_name %s'  " % keyid
         gpg_args = '--no-permission-warning --batch --passphrase=%s --agent-program=%s|--auto-expand-secmem' % (passphrase, self.gpg_agent_bin)
-        if self.gpg_version > (2,1,):
+        if self.gpg_version > (2, 1,):
             gpg_args += ' --pinentry-mode=loopback'
         cmd += "--define '_gpg_sign_cmd_extra_args %s' " % gpg_args
         cmd += "--define '_binary_filedigest_algorithm %s' " % digest
@@ -74,7 +74,7 @@ class LocalSigner(object):
 
         #gpg > 2.1 supports password pipes only through the loopback interface
         #gpg < 2.1 errors out if given unknown parameters
-        if self.gpg_version > (2,1,):
+        if self.gpg_version > (2, 1,):
             cmd += ['--pinentry-mode', 'loopback']
 
         cmd += [input_file]
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 791d529935..fa540b48b3 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -118,4 +118,4 @@ def distro_identifier(adjust_hook=None):
         id_str = '{0}-{1}'.format(distro_id, release)
     else:
         id_str = distro_id
-    return id_str.replace(' ','-').replace('/','-')
+    return id_str.replace(' ', '-').replace('/', '-')
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index fc5408d5f8..9dd6aef641 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -245,7 +245,7 @@ def filedeprunner(arg):
                 dep = dep.split()[0]
 
             # Put parentheses around any version specifications.
-            dep = r.sub(r'(\g<0>)',dep)
+            dep = r.sub(r'(\g<0>)', dep)
 
             if file not in i:
                 i[file] = []
diff --git a/meta/lib/oe/package_manager/__init__.py b/meta/lib/oe/package_manager/__init__.py
index 5fac51aea7..633c5c4bf2 100644
--- a/meta/lib/oe/package_manager/__init__.py
+++ b/meta/lib/oe/package_manager/__init__.py
@@ -76,8 +76,8 @@ def opkg_query(cmd_output):
             if not filename:
                 filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
             if pkg:
-                output[pkg] = {"arch":arch, "ver":ver,
-                        "filename":filename, "deps": dep, "pkgarch":pkgarch, "provs": prov}
+                output[pkg] = {"arch": arch, "ver": ver,
+                        "filename": filename, "deps": dep, "pkgarch": pkgarch, "provs": prov}
             pkg = ""
             arch = ""
             ver = ""
diff --git a/meta/lib/oe/package_manager/ipk/__init__.py b/meta/lib/oe/package_manager/ipk/__init__.py
index 965d542e08..504830cdec 100644
--- a/meta/lib/oe/package_manager/ipk/__init__.py
+++ b/meta/lib/oe/package_manager/ipk/__init__.py
@@ -166,7 +166,7 @@ class OpkgPM(OpkgDpkgPM):
         self.deploy_dir = oe.path.join(self.d.getVar('WORKDIR'), ipk_repo_workdir)
         self.deploy_lock_file = os.path.join(self.deploy_dir, "deploy.lock")
         self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg")
-        self.opkg_args = "--volatile-cache -f %s -t %s -o %s " % (self.config_file, self.d.expand('${T}/ipktemp/'),target_rootfs)
+        self.opkg_args = "--volatile-cache -f %s -t %s -o %s " % (self.config_file, self.d.expand('${T}/ipktemp/'), target_rootfs)
         self.opkg_args += self.d.getVar("OPKG_ARGS")
 
         if prepare_index:
diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py
index f7cf436f61..1a38055891 100644
--- a/meta/lib/oe/package_manager/rpm/__init__.py
+++ b/meta/lib/oe/package_manager/rpm/__init__.py
@@ -65,9 +65,9 @@ class RpmPM(PackageManager):
         self.target_vendor = target_vendor
         self.task_name = task_name
         if arch_var == None:
-            self.archs = self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS').replace("-","_")
+            self.archs = self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS').replace("-", "_")
         else:
-            self.archs = self.d.getVar(arch_var).replace("-","_")
+            self.archs = self.d.getVar(arch_var).replace("-", "_")
         if task_name == "host":
             self.primary_arch = self.d.getVar('SDK_ARCH')
         else:
@@ -280,7 +280,7 @@ class RpmPM(PackageManager):
                 package_arch = package_info[1]
                 package_version = package_info[2]
                 package_rpm = package_info[3]
-                packages[current_package] = {"arch":package_arch, "ver":package_version, "filename":package_rpm}
+                packages[current_package] = {"arch": package_arch, "ver": package_version, "filename": package_rpm}
                 current_deps = []
             elif line.startswith("Dependencies:"):
                 current_state = "dependencies"
@@ -315,7 +315,7 @@ class RpmPM(PackageManager):
         cmd = [dnf_cmd] + standard_dnf_args + dnf_args
         bb.note('Running %s' % ' '.join(cmd))
         try:
-            output = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8")
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
             if print_output:
                 bb.debug(1, output)
             return output
@@ -352,7 +352,7 @@ class RpmPM(PackageManager):
         args = ["-q", "--root=%s" % self.target_rootfs, "--queryformat", "%{postin}", pkg]
 
         try:
-            output = subprocess.check_output([cmd] + args,stderr=subprocess.STDOUT).decode("utf-8")
+            output = subprocess.check_output([cmd] + args, stderr=subprocess.STDOUT).decode("utf-8")
         except subprocess.CalledProcessError as e:
             bb.fatal("Could not invoke rpm. Command "
                      "'%s' returned %d:\n%s" % (' '.join([cmd] + args), e.returncode, e.output.decode("utf-8")))
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index e0f767bf65..4cab28a215 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -580,7 +580,7 @@ class QuiltTree(PatchSet):
     def Clean(self):
         try:
             self._runcmd(["pop", "-a", "-f"])
-            oe.path.remove(os.path.join(self.dir, "patches","series"))
+            oe.path.remove(os.path.join(self.dir, "patches", "series"))
         except Exception:
             pass
         self.initialized = True
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
index afc8ea23bc..d71140980a 100644
--- a/meta/lib/oe/prservice.py
+++ b/meta/lib/oe/prservice.py
@@ -11,7 +11,7 @@ def prserv_make_conn(d, check=False):
         if check:
             if not conn.ping():
                 raise Exception('service not available')
-        d.setVar("__PRSERV_CONN",conn)
+        d.setVar("__PRSERV_CONN", conn)
     except Exception as exc:
         bb.fatal("Connecting to PR service %s:%s failed: %s" % (host_params[0], host_params[1], str(exc)))
 
@@ -63,13 +63,13 @@ def prserv_import_db(d, filter_version=None, filter_pkgarch=None, filter_checksu
             try:
                 value = int(d.getVar(remain + '$' + version + '$' + pkgarch + '$' + checksum))
             except BaseException as exc:
-                bb.debug("Not valid value of %s:%s" % (v,str(exc)))
+                bb.debug("Not valid value of %s:%s" % (v, str(exc)))
                 continue
-            ret = conn.importone(version,pkgarch,checksum,value)
+            ret = conn.importone(version, pkgarch, checksum, value)
             if ret != value:
-                bb.error("importing(%s,%s,%s,%d) failed. DB may have larger value %d" % (version,pkgarch,checksum,value,ret))
+                bb.error("importing(%s,%s,%s,%d) failed. DB may have larger value %d" % (version, pkgarch, checksum, value, ret))
             else:
-               imported.append((version,pkgarch,checksum,value))
+               imported.append((version, pkgarch, checksum, value))
     return imported
 
 def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
@@ -112,7 +112,7 @@ def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
                     (str(datainfo[i]['version']), pkgarch, str(datainfo[i]['checksum']), str(value)))
             if not nomax:
                 for i in idx:
-                    f.write("PRAUTO_%s_%s = \"%s\"\n" % (str(datainfo[idx[i]]['version']),str(datainfo[idx[i]]['pkgarch']),str(datainfo[idx[i]]['value'])))
+                    f.write("PRAUTO_%s_%s = \"%s\"\n" % (str(datainfo[idx[i]]['version']), str(datainfo[idx[i]]['pkgarch']), str(datainfo[idx[i]]['value'])))
     bb.utils.unlockfile(lf)
 
 def prserv_check_avail(d):
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 646cbdfa13..6842f7387d 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -353,7 +353,7 @@ def patch_recipe(d, fn, varvalues, patch=False, relpath='', redirect_output=None
     varfiles = get_var_files(fn, varlist, d)
     locs = localise_file_vars(fn, varfiles, varlist)
     patches = []
-    for f,v in locs.items():
+    for f, v in locs.items():
         vals = {k: varvalues[k] for k in v}
         f = os.path.abspath(f)
         if f == fn:
@@ -489,9 +489,9 @@ def get_recipe_local_files(d, patches=False, archives=False):
             if os.path.isdir(localpath):
                 for root, dirs, files in os.walk(localpath):
                     for fname in files:
-                        fileabspath = os.path.join(root,fname)
+                        fileabspath = os.path.join(root, fname)
                         srcdir = os.path.dirname(localpath)
-                        ret[os.path.relpath(fileabspath,srcdir)] = fileabspath
+                        ret[os.path.relpath(fileabspath, srcdir)] = fileabspath
             else:
                 ret[fname] = localpath
     return ret
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index 190010691b..aad3f571da 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -144,7 +144,7 @@ def get_extra_sdkinfo(sstate_dir):
         for fn in files:
             if fn.endswith('.tgz'):
                 fsize = int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024))
-                task = fn.rsplit(':',1)[1].split('_',1)[1].split(',')[0]
+                task = fn.rsplit(':', 1)[1].split('_', 1)[1].split(',')[0]
                 origtotal = extra_info['tasksizes'].get(task, 0)
                 extra_info['tasksizes'][task] = origtotal + fsize
                 extra_info['filesizes'][fn] = fsize
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 2d6a4ac792..4b9c71eea1 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -64,7 +64,7 @@ class Gnome(XTerminal):
         # clearing the LC_ALL environment variable so it uses the locale.
         # Once fixed on the gnome-terminal project, this should be removed.
         if os.getenv('LC_ALL'):
-            os.putenv('LC_ALL','')
+            os.putenv('LC_ALL', '')
 
         XTerminal.__init__(self, sh_cmd, title, env, d)
 
@@ -274,7 +274,7 @@ def check_tmux_pane_size(tmux):
         return False
     try:
         p = sub.Popen('%s list-panes -F "#{?pane_active,#{pane_height},}"' % tmux,
-                shell=True,stdout=sub.PIPE,stderr=sub.PIPE)
+                shell=True, stdout=sub.PIPE, stderr=sub.PIPE)
         out, err = p.communicate()
         size = int(out.strip())
     except OSError as exc:
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index ea78b2b0e0..929ca9c5b1 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -107,7 +107,7 @@ def inherits(d, *classes):
     """Return True if the metadata inherits any of the specified classes"""
     return any(bb.data.inherits_class(cls, d) for cls in classes)
 
-def features_backfill(var,d):
+def features_backfill(var, d):
     # This construct allows the addition of new features to variable specified
     # as var
     # Example for var = "DISTRO_FEATURES"
diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
index df7cd5ecc2..7f7c96cdd6 100644
--- a/meta/lib/oeqa/core/loader.py
+++ b/meta/lib/oeqa/core/loader.py
@@ -316,7 +316,7 @@ class OETestLoader(unittest.TestLoader):
 
     # XXX After Python 3.5, remove backward compatibility hacks for
     # use_load_tests deprecation via *args and **kws.  See issue 16662.
-    if sys.version_info >= (3,5):
+    if sys.version_info >= (3, 5):
         def loadTestsFromModule(self, module, *args, pattern=None, **kws):
             """
                 Returns a suite of all tests cases contained in module.
diff --git a/meta/lib/oeqa/core/tests/cases/data.py b/meta/lib/oeqa/core/tests/cases/data.py
index 61f88547f7..42baa708bf 100644
--- a/meta/lib/oeqa/core/tests/cases/data.py
+++ b/meta/lib/oeqa/core/tests/cases/data.py
@@ -11,7 +11,7 @@ from oeqa.core.decorator.data import OETestDataDepends
 class DataTest(OETestCase):
     data_vars = ['IMAGE', 'ARCH']
 
-    @OETestDataDepends(['MACHINE',])
+    @OETestDataDepends(['MACHINE', ])
     @OETestTag('dataTestOk')
     def testDataOk(self):
         self.assertEqual(self.td.get('IMAGE'), 'core-image-minimal')
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index bd602637dc..815f2a4c02 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -81,7 +81,7 @@ class oeTest(unittest.TestCase):
         return False
 
     @classmethod
-    def hasFeature(self,feature):
+    def hasFeature(self, feature):
         if feature in oeTest.tc.imagefeatures or \
                 feature in oeTest.tc.distrofeatures:
             return True
@@ -431,7 +431,7 @@ class RuntimeTestContext(TestContext):
         extracted_path = self.d.getVar("TEST_EXTRACTED_DIR")
         packaged_path = self.d.getVar("TEST_PACKAGED_DIR")
 
-        for key,value in needed_packages.items():
+        for key, value in needed_packages.items():
             packages = ()
             if isinstance(value, dict):
                 packages = (value, )
@@ -491,7 +491,7 @@ class RuntimeTestContext(TestContext):
 
         with open(json_file) as f:
             test_packages = json.load(f)
-        for key,value in test_packages.items():
+        for key, value in test_packages.items():
             needed_packages[key] = value
 
         if test:
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index d11171bf45..fa0ec0ccf6 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -42,7 +42,7 @@ class FakeTarget(object):
         self.connection = None
         self.ip = None
         self.server_ip = None
-        self.datetime = time.strftime('%Y%m%d%H%M%S',time.gmtime())
+        self.datetime = time.strftime('%Y%m%d%H%M%S', time.gmtime())
         self.testdir = d.getVar("TEST_LOG_DIR")
         self.pn = d.getVar("PN")
 
diff --git a/meta/lib/oeqa/runtime/cases/boot.py b/meta/lib/oeqa/runtime/cases/boot.py
index b801d13fc0..03a1d4b501 100644
--- a/meta/lib/oeqa/runtime/cases/boot.py
+++ b/meta/lib/oeqa/runtime/cases/boot.py
@@ -29,5 +29,5 @@ class BootTest(OERuntimeTestCase):
             else:
                 count = 0
         msg = ('Expected 5 consecutive, got %d.\n'
-               'ping output is:\n%s' % (count,output))
+               'ping output is:\n%s' % (count, output))
         self.assertEqual(count, 5, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/df.py b/meta/lib/oeqa/runtime/cases/df.py
index 26752fb4bc..e7822af3b4 100644
--- a/meta/lib/oeqa/runtime/cases/df.py
+++ b/meta/lib/oeqa/runtime/cases/df.py
@@ -14,6 +14,6 @@ class DfTest(OERuntimeTestCase):
     @skipIfInDataVar('IMAGE_FEATURES', 'read-only-rootfs', 'Test case df requires a writable rootfs')
     def test_df(self):
         cmd = "df -P / | sed -n '2p' | awk '{print $4}'"
-        (status,output) = self.target.run(cmd)
+        (status, output) = self.target.run(cmd)
         msg = 'Not enough space on image. Current size is %s' % output
         self.assertTrue(int(output) > 5120, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
index 777dbe6bf1..18d562176f 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -162,9 +162,9 @@ class DnfRepoTest(DnfTest):
         self.target.run('cp /lib/libtinfo.so.5 %s/usr/lib' % rootpath, 1500)
         self.target.run('cp /libx32/libtinfo.so.5 %s/usr/libx32' % rootpath, 1500)
         self.target.run('cp /lib64/libtinfo.so.5 %s/usr/lib64' % rootpath, 1500)
-        self.target.run('ln -sf -r %s/lib %s/usr/lib' % (rootpath,rootpath), 1500)
-        self.target.run('ln -sf -r %s/libx32 %s/usr/libx32' % (rootpath,rootpath), 1500)
-        self.target.run('ln -sf -r %s/lib64 %s/usr/lib64' % (rootpath,rootpath), 1500)
+        self.target.run('ln -sf -r %s/lib %s/usr/lib' % (rootpath, rootpath), 1500)
+        self.target.run('ln -sf -r %s/libx32 %s/usr/libx32' % (rootpath, rootpath), 1500)
+        self.target.run('ln -sf -r %s/lib64 %s/usr/lib64' % (rootpath, rootpath), 1500)
         self.target.run('cp -r /etc/rpm %s/etc' % rootpath, 1500)
         self.target.run('cp -r /etc/dnf %s/etc' % rootpath, 1500)
         self.target.run('cp /bin/sh %s/bin' % rootpath, 1500)
diff --git a/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py b/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
index e010612838..40ac36493b 100644
--- a/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
+++ b/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
@@ -19,7 +19,7 @@ class Ethernet_Test(OERuntimeTestCase):
         original_ip = output 
         virtual_ip = self.set_ip(original_ip)
         
-        (status, output) = self.target.run("ifconfig eth0:1 %s netmask 255.255.255.0 && sleep 2 && ping -c 5 %s && ifconfig eth0:1 down" % (virtual_ip,virtual_ip))
+        (status, output) = self.target.run("ifconfig eth0:1 %s netmask 255.255.255.0 && sleep 2 && ping -c 5 %s && ifconfig eth0:1 down" % (virtual_ip, virtual_ip))
         self.assertEqual(status, 0, msg='Failed to create virtual ip address, output: %s' % output)
         
     @OETestDepends(['ethernet_ip_connman.Ethernet_Test.test_set_virtual_ip'])  
@@ -32,5 +32,5 @@ class Ethernet_Test(OERuntimeTestCase):
         self.assertEqual(status, 0, msg='Failed to retrieve the default gateway, output: %s' % output)
         default_gateway = output
 
-        (status, output) = self.target.run("connmanctl config %s --ipv4 dhcp && sleep 2 && ping -c 5 %s" % (wired_interfaces,default_gateway))
-        self.assertEqual(status, 0, msg='Failed to get dynamic IP address via DHCP in connmand, output: %s' % output)
\ No newline at end of file
+        (status, output) = self.target.run("connmanctl config %s --ipv4 dhcp && sleep 2 && ping -c 5 %s" % (wired_interfaces, default_gateway))
+        self.assertEqual(status, 0, msg='Failed to get dynamic IP address via DHCP in connmand, output: %s' % output)
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py
index 16fde55ccf..9fe9cb8def 100644
--- a/meta/lib/oeqa/runtime/cases/ltp.py
+++ b/meta/lib/oeqa/runtime/cases/ltp.py
@@ -57,7 +57,7 @@ class LtpTestBase(OERuntimeTestCase):
 
 class LtpTest(LtpTestBase):
 
-    ltp_groups = ["math", "syscalls", "dio", "io", "mm", "ipc", "sched", "nptl", "pty", "containers", "controllers", "filecaps", "cap_bounds", "fcntl-locktests", "connectors", "commands", "net.ipv6_lib", "input","fs_perms_simple"]
+    ltp_groups = ["math", "syscalls", "dio", "io", "mm", "ipc", "sched", "nptl", "pty", "containers", "controllers", "filecaps", "cap_bounds", "fcntl-locktests", "connectors", "commands", "net.ipv6_lib", "input", "fs_perms_simple"]
 
     ltp_fs = ["fs", "fsx", "fs_bind"]
     # skip kernel cpuhotplug
diff --git a/meta/lib/oeqa/runtime/cases/oe_syslog.py b/meta/lib/oeqa/runtime/cases/oe_syslog.py
index dbb49b6895..2e1a8f153d 100644
--- a/meta/lib/oeqa/runtime/cases/oe_syslog.py
+++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -122,7 +122,7 @@ class SyslogTestConfig(OERuntimeTestCase):
         self.test_syslog_restart()
 
         cmd = 'logger foobar && grep foobar /var/log/test'
-        status,output = self.target.run(cmd)
+        status, output = self.target.run(cmd)
         msg = 'Test log string not found. Output: %s ' % output
         self.assertEqual(status, 0, msg=msg)
 
diff --git a/meta/lib/oeqa/runtime/cases/parselogs.py b/meta/lib/oeqa/runtime/cases/parselogs.py
index 345901d00d..c61969d3f2 100644
--- a/meta/lib/oeqa/runtime/cases/parselogs.py
+++ b/meta/lib/oeqa/runtime/cases/parselogs.py
@@ -195,7 +195,7 @@ ignore_errors = {
         ] + common_errors,
 }
 
-log_locations = ["/var/log/","/var/log/dmesg", "/tmp/dmesg_output.log"]
+log_locations = ["/var/log/", "/var/log/dmesg", "/tmp/dmesg_output.log"]
 
 class ParseLogsTest(OERuntimeTestCase):
 
diff --git a/meta/lib/oeqa/runtime/cases/ping.py b/meta/lib/oeqa/runtime/cases/ping.py
index d550efe17f..da40204614 100644
--- a/meta/lib/oeqa/runtime/cases/ping.py
+++ b/meta/lib/oeqa/runtime/cases/ping.py
@@ -22,5 +22,5 @@ class PingTest(OERuntimeTestCase):
             else:
                 count = 0
         msg = ('Expected 5 consecutive, got %d.\n'
-               'ping output is:\n%s' % (count,output))
+               'ping output is:\n%s' % (count, output))
         self.assertEqual(count, 5, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py
index cfaa729f30..df0a373c59 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -102,7 +102,7 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
 
     @OETestDepends(['rpm.RpmInstallRemoveTest.test_rpm_install'])
     def test_rpm_remove(self):
-        status,output = self.target.run('rpm -e base-passwd-doc')
+        status, output = self.target.run('rpm -e base-passwd-doc')
         msg = 'Failed to remove base-passwd-doc package: %s' % output
         self.assertEqual(status, 0, msg=msg)
 
diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py
index 668fc2a70e..a465eaa0b7 100644
--- a/meta/lib/oeqa/runtime/cases/systemd.py
+++ b/meta/lib/oeqa/runtime/cases/systemd.py
@@ -24,7 +24,7 @@ class SystemdTest(OERuntimeTestCase):
         return output
 
     #TODO: use pyjournalctl instead
-    def journalctl(self, args='',l_match_units=None):
+    def journalctl(self, args='', l_match_units=None):
         """
         Request for the journalctl output to the current target system
 
@@ -110,7 +110,7 @@ class SystemdServiceTests(SystemdTest):
         self.systemctl('stop', 'avahi-daemon.service')
         self.systemctl('is-active', 'avahi-daemon.service',
                        expected=3, verbose=True)
-        self.systemctl('start','avahi-daemon.service')
+        self.systemctl('start', 'avahi-daemon.service')
         self.systemctl('is-active', 'avahi-daemon.service', verbose=True)
 
     @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status'])
@@ -152,7 +152,7 @@ class SystemdJournalTests(SystemdTest):
         """
 
         # The expression chain that uniquely identifies the time boot message.
-        expr_items = ['Startup finished', 'kernel', 'userspace','\.$']
+        expr_items = ['Startup finished', 'kernel', 'userspace', '\.$']
         try:
             output = self.journalctl(args='-o cat --reverse')
         except AssertionError:
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index 30afc962c9..d196bb16cf 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -191,7 +191,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
     def test_prefile(self):
         preconf = os.path.join(self.builddir, 'conf/prefile.conf')
         self.track_for_cleanup(preconf)
-        ftools.write_file(preconf,"TEST_PREFILE=\"prefile\"")
+        ftools.write_file(preconf, "TEST_PREFILE=\"prefile\"")
         result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
         self.assertIn('prefile', result.output)
         self.write_config("TEST_PREFILE=\"localconf\"")
@@ -216,13 +216,13 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
 INHERIT_remove = \"report-error\"
 """)
         self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
-        self.write_recipeinc('man-db',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n")
+        self.write_recipeinc('man-db', "\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n")
         runCmd('bitbake -c cleanall man-db xcursor-transparent-theme')
         result = runCmd('bitbake -c unpack -k man-db xcursor-transparent-theme', ignore_status=True)
         errorpos = result.output.find('ERROR: Function failed: do_fail_task')
         manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task do_unpack: Started", result.output)
         continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
-        self.assertLess(errorpos,continuepos, msg="bitbake didn't pass do_fail_task. bitbake output: %s" % result.output)
+        self.assertLess(errorpos, continuepos, msg="bitbake didn't pass do_fail_task. bitbake output: %s" % result.output)
 
     def test_non_gplv3(self):
         self.write_config('INCOMPATIBLE_LICENSE = "GPLv3"')
diff --git a/meta/lib/oeqa/selftest/cases/cve_check.py b/meta/lib/oeqa/selftest/cases/cve_check.py
index 4f78bbaf55..bd89e9335f 100644
--- a/meta/lib/oeqa/selftest/cases/cve_check.py
+++ b/meta/lib/oeqa/selftest/cases/cve_check.py
@@ -24,21 +24,21 @@ class CVECheck(OESelftestTestCase):
 
         # ignore "p1" and "p2", so these should be equal
         result = Version("1.0p2") == Version("1.0p1")
-        self.assertTrue(result,msg="Failed to compare version '1.0p2' to '1.0p1'")
+        self.assertTrue(result, msg="Failed to compare version '1.0p2' to '1.0p1'")
         # ignore the "b" and "r"
         result = Version("1.0b") == Version("1.0r")
-        self.assertTrue(result,msg="Failed to compare version '1.0b' to '1.0r'")
+        self.assertTrue(result, msg="Failed to compare version '1.0b' to '1.0r'")
 
         # consider the trailing alphabet as patched level when comparing
-        result = Version("1.0b","alphabetical") < Version("1.0r","alphabetical")
-        self.assertTrue(result,msg="Failed to compare version with suffix '1.0b' < '1.0r'")
-        result = Version("1.0b","alphabetical") > Version("1.0","alphabetical")
-        self.assertTrue(result,msg="Failed to compare version with suffix '1.0b' > '1.0'")
+        result = Version("1.0b", "alphabetical") < Version("1.0r", "alphabetical")
+        self.assertTrue(result, msg="Failed to compare version with suffix '1.0b' < '1.0r'")
+        result = Version("1.0b", "alphabetical") > Version("1.0", "alphabetical")
+        self.assertTrue(result, msg="Failed to compare version with suffix '1.0b' > '1.0'")
 
         # consider the trailing "p" and "patch" as patched released when comparing
-        result = Version("1.0","patch") < Version("1.0p1","patch")
-        self.assertTrue(result,msg="Failed to compare version with suffix '1.0' < '1.0p1'")
-        result = Version("1.0p2","patch") > Version("1.0p1","patch")
-        self.assertTrue(result,msg="Failed to compare version with suffix '1.0p2' > '1.0p1'")
-        result = Version("1.0_patch2","patch") < Version("1.0_patch3","patch")
-        self.assertTrue(result,msg="Failed to compare version with suffix '1.0_patch2' < '1.0_patch3'")
+        result = Version("1.0", "patch") < Version("1.0p1", "patch")
+        self.assertTrue(result, msg="Failed to compare version with suffix '1.0' < '1.0p1'")
+        result = Version("1.0p2", "patch") > Version("1.0p1", "patch")
+        self.assertTrue(result, msg="Failed to compare version with suffix '1.0p2' > '1.0p1'")
+        result = Version("1.0_patch2", "patch") < Version("1.0_patch3", "patch")
+        self.assertTrue(result, msg="Failed to compare version with suffix '1.0_patch2' < '1.0_patch3'")
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 6c3b3cbb3e..b90aac72bd 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -1873,7 +1873,7 @@ class DevtoolUpgradeTests(DevtoolBase):
         #Here is just generated the config file instead of all the kernel to optimize the
         #time of executing this test case.
         bitbake('%s -c configure' % kernel_provider)
-        bbconfig = os.path.join(get_bb_var('B', kernel_provider),'.config')
+        bbconfig = os.path.join(get_bb_var('B', kernel_provider), '.config')
         #Step 2
         runCmd('cp %s %s' % (bbconfig, tempdir_cfg))
         self.assertExists(os.path.join(tempdir_cfg, '.config'), 'Could not copy .config file from kernel')
@@ -1885,34 +1885,34 @@ class DevtoolUpgradeTests(DevtoolBase):
         runCmd('devtool modify virtual/kernel -x %s' % tempdir)
         self.assertExists(os.path.join(tempdir, 'Makefile'), 'Extracted source could not be found')
         #Step 4.2
-        configfile = os.path.join(tempdir,'.config')
+        configfile = os.path.join(tempdir, '.config')
         diff = runCmd('diff %s %s' % (tmpconfig, configfile))
-        self.assertEqual(0,diff.status,'Kernel .config file is not the same using bitbake and devtool')
+        self.assertEqual(0, diff.status, 'Kernel .config file is not the same using bitbake and devtool')
         #Step 4.3
         #NOTE: virtual/kernel is mapped to kernel_provider
         result = runCmd('devtool build %s' % kernel_provider)
-        self.assertEqual(0,result.status,'Cannot build kernel using `devtool build`')
+        self.assertEqual(0, result.status, 'Cannot build kernel using `devtool build`')
         kernelfile = os.path.join(get_bb_var('KBUILD_OUTPUT', kernel_provider), 'vmlinux')
         self.assertExists(kernelfile, 'Kernel was not build correctly')
 
         #Modify the kernel source
-        modfile = os.path.join(tempdir,'arch/x86/boot/header.S')
+        modfile = os.path.join(tempdir, 'arch/x86/boot/header.S')
         modstring = "Use a boot loader. Devtool testing."
         modapplied = runCmd("sed -i 's/Use a boot loader./%s/' %s" % (modstring, modfile))
-        self.assertEqual(0,modapplied.status,'Modification to %s on kernel source failed' % modfile)
+        self.assertEqual(0, modapplied.status, 'Modification to %s on kernel source failed' % modfile)
         #Modify the configuration
-        codeconfigfile = os.path.join(tempdir,'.config.new')
+        codeconfigfile = os.path.join(tempdir, '.config.new')
         modconfopt = "CONFIG_SG_POOL=n"
         modconf = runCmd("sed -i 's/CONFIG_SG_POOL=y/%s/' %s" % (modconfopt, codeconfigfile))
-        self.assertEqual(0,modconf.status,'Modification to %s failed' % codeconfigfile)
+        self.assertEqual(0, modconf.status, 'Modification to %s failed' % codeconfigfile)
         #Build again kernel with devtool
         rebuild = runCmd('devtool build %s' % kernel_provider)
-        self.assertEqual(0,rebuild.status,'Fail to build kernel after modification of source and config')
+        self.assertEqual(0, rebuild.status, 'Fail to build kernel after modification of source and config')
         #Step 4.4
         bzimagename = 'bzImage-' + get_bb_var('KERNEL_VERSION_NAME', kernel_provider)
-        bzimagefile = os.path.join(get_bb_var('D', kernel_provider),'boot', bzimagename)
+        bzimagefile = os.path.join(get_bb_var('D', kernel_provider), 'boot', bzimagename)
         checkmodcode = runCmd("grep '%s' %s" % (modstring, bzimagefile))
-        self.assertEqual(0,checkmodcode.status,'Modification on kernel source failed')
+        self.assertEqual(0, checkmodcode.status, 'Modification on kernel source failed')
         #Step 4.5
         checkmodconfg = runCmd("grep %s %s" % (modconfopt, codeconfigfile))
-        self.assertEqual(0,checkmodconfg.status,'Modification to configuration file failed')
+        self.assertEqual(0, checkmodconfg.status, 'Modification to configuration file failed')
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py
index f485593f1d..67000bb1c1 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -747,7 +747,7 @@ FIT_HASH_ALG = "sha256"
         machine = get_bb_var('MACHINE')
         fitimage_its_path = os.path.join(deploy_dir_image,
                     "fitImage-its-%s-%s-%s" % (image_type, machine, machine))
-        fitimage_path = os.path.join(deploy_dir_image,"fitImage")
+        fitimage_path = os.path.join(deploy_dir_image, "fitImage")
 
         self.assertTrue(os.path.exists(fitimage_its_path),
             "%s image tree source doesn't exist" % (fitimage_its_path))
@@ -793,7 +793,7 @@ FIT_HASH_ALG = "sha256"
             if node == exp_node_lines:
                 print("kernel node verified")
             else:
-                self.assertTrue(test_passed == True,"kernel node does not match expectation")
+                self.assertTrue(test_passed == True, "kernel node does not match expectation")
 
         rx_configs = re.compile("^conf-.*")
         its_configs = list(filter(rx_configs.match, its_lines))
@@ -811,23 +811,23 @@ FIT_HASH_ALG = "sha256"
             print("checking configuration " + cfg_str.rstrip(" {"))
             rx_desc_line = re.compile("^description.*1 Linux kernel.*")
             if len(list(filter(rx_desc_line.match, node))) != 1:
-                self.assertTrue(test_passed == True,"kernel keyword not found in the description line")
+                self.assertTrue(test_passed == True, "kernel keyword not found in the description line")
                 break
             else:
                 print("kernel keyword found in the description line")
 
             if 'kernel = "kernel-1";' not in node:
-                self.assertTrue(test_passed == True,"kernel line not found")
+                self.assertTrue(test_passed == True, "kernel line not found")
                 break
             else:
                 print("kernel line found")
 
             rx_sign_line = re.compile("^sign-images.*kernel.*")
             if len(list(filter(rx_sign_line.match, node))) != 1:
-                self.assertTrue(test_passed == True,"kernel hash not signed")
+                self.assertTrue(test_passed == True, "kernel hash not signed")
                 break
             else:
                 print("kernel hash signed")
 
             test_passed = True
-            self.assertTrue(test_passed == True,"Initramfs bundle test success")
+            self.assertTrue(test_passed == True, "Initramfs bundle test success")
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 53c549ac95..07e46d5cfd 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -290,5 +290,5 @@ PNBLACKLIST[busybox] = "Don't build this"
         res_dir = get_bb_var('DEPLOY_DIR_IMAGE')
         images = os.path.join(res_dir, "test-empty-image-*.manifest")
         result = glob.glob(images)
-        with open(result[1],"r") as f:
-                self.assertEqual(len(f.read().strip()),0)
+        with open(result[1], "r") as f:
+                self.assertEqual(len(f.read().strip()), 0)
diff --git a/meta/lib/oeqa/selftest/cases/manifest.py b/meta/lib/oeqa/selftest/cases/manifest.py
index 56c8129a06..c7ba0ae5b7 100644
--- a/meta/lib/oeqa/selftest/cases/manifest.py
+++ b/meta/lib/oeqa/selftest/cases/manifest.py
@@ -116,7 +116,7 @@ class VerifyManifest(OESelftestTestCase):
                 self.classname, m_entry[k].file))
 
             m_entry[k].missing = self.check_manifest_entries(
-                                               m_entry[k].file,reverse_dir[k])
+                                               m_entry[k].file, reverse_dir[k])
             if m_entry[k].missing:
                 msg = '{}: {} Error has the following missing entries'\
                         .format(self.classname, m_entry[k].file)
diff --git a/meta/lib/oeqa/selftest/cases/meta_ide.py b/meta/lib/oeqa/selftest/cases/meta_ide.py
index 6f10d30dc9..3c6371fba8 100644
--- a/meta/lib/oeqa/selftest/cases/meta_ide.py
+++ b/meta/lib/oeqa/selftest/cases/meta_ide.py
@@ -43,7 +43,7 @@ class MetaIDE(OESelftestTestCase):
                         "https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.gz",
                         self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir)
         self.project.download_archive()
-        self.assertEqual(self.project.run_configure('$CONFIGURE_FLAGS --disable-maintainer-mode','sed -i -e "/char \*program_name/d" src/global.c;'), 0,
+        self.assertEqual(self.project.run_configure('$CONFIGURE_FLAGS --disable-maintainer-mode', 'sed -i -e "/char \*program_name/d" src/global.c;'), 0,
                         msg="Running configure failed")
         self.assertEqual(self.project.run_make(), 0,
                         msg="Running make failed")
diff --git a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
index 05c3268f3e..ad4ae8ccef 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
@@ -33,7 +33,7 @@ class TestBlobParsing(OESelftestTestCase):
             return
 
         for k in to_remove:
-            self.var_map.pop(x,None)
+            self.var_map.pop(x, None)
         for k in to_add:
             self.var_map[k] = to_add[k]
 
@@ -62,7 +62,7 @@ class TestBlobParsing(OESelftestTestCase):
         """
         from oe.buildhistory_analysis import compare_dict_blobs
 
-        changesmap = {"foo-2": ("2", "8"), "bar": ("","4"), "bar-2": ("","5")}
+        changesmap = {"foo-2": ("2", "8"), "bar": ("", "4"), "bar-2": ("", "5")}
 
         self.commit_vars(to_add={"foo": "1", "foo-2": "2", "foo-3": "3"})
         blob1 = self.repo.heads.master.commit.tree.blobs[0]
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
index 59784bbc67..7b20d374dd 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -88,7 +88,7 @@ class OEGitproxyTests(OESelftestTestCase):
 
         # outside, use the proxy
         res = runCmd('%s%s/oe-git-proxy host.outside-example.com 9418' %
-                     (prefix,self.scripts_dir))
+                     (prefix, self.scripts_dir))
         self.assertIn('PROXY:', res.output)
         # match with wildcard suffix
         res = runCmd('%s%s/oe-git-proxy host.example.com 9418' %
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 332e0de41f..02eaf213cb 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -385,7 +385,7 @@ IMAGE_INSTALL_append = " systemtap-runtime"
         def test_crosstap_helloworld(self):
             self.write_config(self.default_config())
             bitbake('systemtap-native')
-            systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+            systemtap_examples = os.path.join(get_bb_var("WORKDIR", "systemtap-native"), "usr/share/systemtap/examples")
             bitbake(self.image)
 
             with runqemu(self.image) as qemu:
@@ -397,7 +397,7 @@ IMAGE_INSTALL_append = " systemtap-runtime"
             self.write_config(self.default_config())
 
             bitbake('systemtap-native')
-            systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+            systemtap_examples = os.path.join(get_bb_var("WORKDIR", "systemtap-native"), "usr/share/systemtap/examples")
             bitbake(self.image)
 
             with runqemu(self.image) as qemu:
@@ -409,7 +409,7 @@ IMAGE_INSTALL_append = " systemtap-runtime"
             self.write_config(self.default_config())
 
             bitbake('systemtap-native')
-            systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+            systemtap_examples = os.path.join(get_bb_var("WORKDIR", "systemtap-native"), "usr/share/systemtap/examples")
             bitbake(self.image)
 
             with runqemu(self.image) as qemu:
@@ -421,7 +421,7 @@ IMAGE_INSTALL_append = " systemtap-runtime"
             self.write_config(self.default_config())
 
             bitbake('systemtap-native')
-            systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+            systemtap_examples = os.path.join(get_bb_var("WORKDIR", "systemtap-native"), "usr/share/systemtap/examples")
             bitbake(self.image)
 
             with runqemu(self.image) as qemu:
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index d428462e9c..c3846f6771 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -558,7 +558,7 @@ BB_SIGNATURE_HANDLER = "OEBasicHash"
         files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps/")
         files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps/")
         # Remove items that are identical in both sets
-        for k,v in files1.items() & files2.items():
+        for k, v in files1.items() & files2.items():
             del files1[k]
             del files2[k]
         if not files1 and not files2:
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 72c25c634f..e2b2d28b25 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -244,7 +244,7 @@ class Wic(WicTestCase):
         sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
         images = glob(self.resultdir + "mkefidisk-*.direct")
         result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))       
-        self.assertIn("kernel",result.output)
+        self.assertIn("kernel", result.output)
 
     def test_sdimage_bootpart(self):
         """Test creation of sdimage-bootpart image"""
@@ -629,12 +629,12 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc
                 config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "%s"\n' % wks_file
                 self.append_config(config)
                 bitbake('core-image-minimal')
-                tmpdir = os.path.join(get_bb_var('WORKDIR', 'core-image-minimal'),'build-wic')
+                tmpdir = os.path.join(get_bb_var('WORKDIR', 'core-image-minimal'), 'build-wic')
 
                 # check each partition for permission
                 for part in glob(os.path.join(tmpdir, 'temp-*.direct.p*')):
                     res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % (part))
-                    self.assertTrue(files_own_by_root(res.output),msg='Files permission incorrect using wks set "%s"' % test)
+                    self.assertTrue(files_own_by_root(res.output), msg='Files permission incorrect using wks set "%s"' % test)
 
                 # clean config and result directory for next cases
                 self.remove_config(config)
@@ -715,7 +715,7 @@ class Wic2(WicTestCase):
         wicvars = set(bb_vars['WICVARS'].split())
         # filter out optional variables
         wicvars = wicvars.difference(('DEPLOY_DIR_IMAGE', 'IMAGE_BOOT_FILES',
-                                      'INITRD', 'INITRD_LIVE', 'ISODIR','INITRAMFS_IMAGE',
+                                      'INITRD', 'INITRD_LIVE', 'ISODIR', 'INITRAMFS_IMAGE',
                                       'INITRAMFS_IMAGE_BUNDLE', 'INITRAMFS_LINK_NAME',
                                       'APPEND', 'IMAGE_EFI_BOOT_FILES'))
         with open(path) as envfile:
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index d97faefcab..752e4e6208 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -32,7 +32,7 @@ class getResults(object):
                 s = i[0].id()
                 #Handle the _ErrorHolder objects from skipModule failures
                 if "setUpModule (" in s:
-                    ret.append(s.replace("setUpModule (", "").replace(")",""))
+                    ret.append(s.replace("setUpModule (", "").replace(")", ""))
                 else:
                     ret.append(s)
                 # Append also the test without the full path
@@ -55,10 +55,10 @@ class getResults(object):
 
 class skipIfFailure(object):
 
-    def __init__(self,testcase):
+    def __init__(self, testcase):
         self.testcase = testcase
 
-    def __call__(self,f):
+    def __call__(self, f):
         @wraps(f)
         def wrapped_f(*args, **kwargs):
             res = getResults()
@@ -70,10 +70,10 @@ class skipIfFailure(object):
 
 class skipIfSkipped(object):
 
-    def __init__(self,testcase):
+    def __init__(self, testcase):
         self.testcase = testcase
 
-    def __call__(self,f):
+    def __call__(self, f):
         @wraps(f)
         def wrapped_f(*args, **kwargs):
             res = getResults()
@@ -85,10 +85,10 @@ class skipIfSkipped(object):
 
 class skipUnlessPassed(object):
 
-    def __init__(self,testcase):
+    def __init__(self, testcase):
         self.testcase = testcase
 
-    def __call__(self,f):
+    def __call__(self, f):
         @wraps(f)
         def wrapped_f(*args, **kwargs):
             res = getResults()
@@ -124,9 +124,9 @@ def LogResults(original_class):
 
     from time import strftime, gmtime
     caller = os.path.basename(sys.argv[0])
-    timestamp = strftime('%Y%m%d%H%M%S',gmtime())
-    logfile = os.path.join(os.getcwd(),'results-' + caller + '.' + timestamp + '.log')
-    linkfile = os.path.join(os.getcwd(),'results-' + caller + '.log')
+    timestamp = strftime('%Y%m%d%H%M%S', gmtime())
+    logfile = os.path.join(os.getcwd(), 'results-' + caller + '.' + timestamp + '.log')
+    linkfile = os.path.join(os.getcwd(), 'results-' + caller + '.log')
 
     def get_class_that_defined_method(meth):
         if inspect.ismethod(meth):
@@ -262,7 +262,7 @@ def gettag(obj, key, default=None):
 
 def getAllTags(obj):
     def __gettags(o):
-        r = {k[len(__tag_prefix):]:getattr(o,k) for k in dir(o) if k.startswith(__tag_prefix)}
+        r = {k[len(__tag_prefix):]: getattr(o, k) for k in dir(o) if k.startswith(__tag_prefix)}
         return r
     if not isinstance(obj, unittest.TestCase):
         return __gettags(obj)
diff --git a/meta/lib/oeqa/utils/package_manager.py b/meta/lib/oeqa/utils/package_manager.py
index 6b67f22fdd..e763d93c43 100644
--- a/meta/lib/oeqa/utils/package_manager.py
+++ b/meta/lib/oeqa/utils/package_manager.py
@@ -80,7 +80,7 @@ def _get_needed_packages(json_file, test=None):
 
     with open(json_file) as f:
         test_packages = json.load(f)
-    for key,value in test_packages.items():
+    for key, value in test_packages.items():
         needed_packages[key] = value
 
     if test:
@@ -101,7 +101,7 @@ def extract_packages(d, needed_packages):
 
     extracted_path = d.getVar('TEST_EXTRACTED_DIR')
 
-    for key,value in needed_packages.items():
+    for key, value in needed_packages.items():
         packages = ()
         if isinstance(value, dict):
             packages = (value, )
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 2d7b1122d4..0e4fff2346 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -26,7 +26,7 @@ from collections import defaultdict
 import importlib
 
 # Get Unicode non printable control chars
-control_range = list(range(0,32)) + list(range(127,160))
+control_range = list(range(0, 32)) + list(range(127, 160))
 control_chars = [chr(x) for x in control_range
                 if chr(x) not in string.printable]
 re_control_char = re.compile('[%s]' % re.escape("".join(control_chars)))
@@ -99,7 +99,7 @@ class QemuRunner:
         try:
             sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             sock.setblocking(0)
-            sock.bind(("127.0.0.1",0))
+            sock.bind(("127.0.0.1", 0))
             sock.listen(2)
             port = sock.getsockname()[1]
             self.logger.debug("Created listening socket for qemu serial console on: 127.0.0.1:%s" % port)
@@ -621,7 +621,7 @@ class QemuRunner:
                 data += "<<< run_serial(): command timed out after %d seconds without output >>>\r\n\r\n" % timeout
                 break
             try:
-                sread, _, _ = select.select([self.server_socket],[],[], end - now)
+                sread, _, _ = select.select([self.server_socket], [], [], end - now)
             except InterruptedError:
                 continue
             if sread:
diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py
index 1807f92320..dc4efae9a0 100644
--- a/meta/lib/oeqa/utils/qemutinyrunner.py
+++ b/meta/lib/oeqa/utils/qemutinyrunner.py
@@ -94,7 +94,7 @@ class QemuTinyRunner(QemuRunner):
         self.qemuparams = '--append "root=/dev/ram0 console=ttyS0" -nographic -serial unix:%s,server,nowait' % self.socketfile
 
         launch_cmd = 'qemu-system-i386 -kernel %s -initrd %s %s' % (self.kernel, self.rootfs, self.qemuparams)
-        self.runqemu = subprocess.Popen(launch_cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT,preexec_fn=os.setpgrp)
+        self.runqemu = subprocess.Popen(launch_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, preexec_fn=os.setpgrp)
 
         bb.note("runqemu started, pid is %s" % self.runqemu.pid)
         bb.note("waiting at most %s seconds for qemu pid" % self.runqemutime)
@@ -122,7 +122,7 @@ class QemuTinyRunner(QemuRunner):
         endtime = time.time() + timeout
         while time.time() < endtime and not stopread:
                 try:
-                        sread, _, _ = select.select([self.server_socket],[],[],1)
+                        sread, _, _ = select.select([self.server_socket], [], [], 1)
                 except InterruptedError:
                         continue
                 for sock in sread:
@@ -138,7 +138,7 @@ class QemuTinyRunner(QemuRunner):
             data += "<<< run_serial(): command timed out after %d seconds without output >>>\r\n\r\n" % timeout
         return (status, str(data))
 
-    def find_child(self,parent_pid):
+    def find_child(self, parent_pid):
         #
         # Walk the process tree from the process specified looking for a qemu-system. Return its [pid'cmd]
         #
@@ -179,4 +179,4 @@ class QemuTinyRunner(QemuRunner):
             basecmd = commands[p].split()[0]
             basecmd = os.path.basename(basecmd)
             if "qemu-system" in basecmd and "-serial unix" in commands[p]:
-                return [int(p),commands[p]]
+                return [int(p), commands[p]]
diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py
index 0221bbee67..141ba2e25a 100644
--- a/meta/lib/oeqa/utils/testexport.py
+++ b/meta/lib/oeqa/utils/testexport.py
@@ -82,8 +82,8 @@ def process_binaries(d, params):
         rpm_deploy_dir = d.getVar("DEPLOY_DIR_RPM")
         arch = get_dest_folder(d.getVar("TUNE_FEATURES"), os.listdir(rpm_deploy_dir))
         arch_rpm_dir = os.path.join(rpm_deploy_dir, arch)
-        extracted_bin_dir = os.path.join(exportpath,"binaries", arch, "extracted_binaries")
-        packaged_bin_dir = os.path.join(exportpath,"binaries", arch, "packaged_binaries")
+        extracted_bin_dir = os.path.join(exportpath, "binaries", arch, "extracted_binaries")
+        packaged_bin_dir = os.path.join(exportpath, "binaries", arch, "packaged_binaries")
         # creating necessary directory structure in case testing is done in poky env.
         if export_env == "0":
             if not os.path.exists(extracted_bin_dir):
@@ -104,7 +104,7 @@ def process_binaries(d, params):
             else: # nothing to do here; running tests under bitbake, so we asume native binaries are in sysroots dir.
                 if param_list[1] or param_list[4]:
                     bb.warn("Native binary %s %s%s. Running tests under bitbake environment. Version can't be checked except when the test itself does it"
-                            " and binary can't be removed." % (param_list[0],"has assigned ver. " + param_list[1] if param_list[1] else "",
+                            " and binary can't be removed." % (param_list[0], "has assigned ver. " + param_list[1] if param_list[1] else "",
                             ", is marked for removal" if param_list[4] else ""))
         else:# the package is target aka DUT intended and it is either required to be delivered in an extracted form or in a packaged version
             target_rpm_file_list = [item for item in os.listdir(arch_rpm_dir) if re.search(param_list[0] + "-([0-9]+\.*)", item)]
@@ -121,7 +121,7 @@ def process_binaries(d, params):
                 if param_list[1]: # the package is versioned
                     for item in target_rpm_file_list:
                         if re.match(".*-{}-.*\.rpm".format(param_list[1]), item):
-                            destination = os.path.join(extracted_bin_dir,param_list[0], param_list[1])
+                            destination = os.path.join(extracted_bin_dir, param_list[0], param_list[1])
                             bb.utils.mkdirhier(destination)
                             extract_binary(os.path.join(arch_rpm_dir, item), destination)
                             break
@@ -130,7 +130,7 @@ def process_binaries(d, params):
                         return ""
                     return "extracted"
                 else: # no version provided, just extract one binary
-                    destination = os.path.join(extracted_bin_dir,param_list[0],
+                    destination = os.path.join(extracted_bin_dir, param_list[0],
                                                re.search(".*-([0-9]+\.[0-9]+)-.*rpm", target_rpm_file_list[0]).group(1))
                     bb.utils.mkdirhier(destination)
                     extract_binary(os.path.join(arch_rpm_dir, target_rpm_file_list[0]), destination)
@@ -168,9 +168,9 @@ def process_binaries(d, params):
                 for item in packaged_bin_file_list:
                     if param_list[1]:
                         if re.match("%s-%s.*rpm" % (param_list[0], param_list[1]), item): # package with version
-                            if not os.path.exists(os.path.join(extracted_bin_path, param_list[0],param_list[1])):
+                            if not os.path.exists(os.path.join(extracted_bin_path, param_list[0], param_list[1])):
                                 os.makedirs(os.path.join(extracted_bin_path, param_list[0], param_list[1]))
-                                extract_binary(os.path.join(packaged_bin_path, item), os.path.join(extracted_bin_path, param_list[0],param_list[1]))
+                                extract_binary(os.path.join(packaged_bin_path, item), os.path.join(extracted_bin_path, param_list[0], param_list[1]))
                                 bb.plain("Using {} for {}".format(os.path.join(packaged_bin_path, item), param_list[0]))
                             break
                     else:
@@ -210,7 +210,7 @@ def files_to_copy(base_dir):
     return files_list
 
 
-def send_bin_to_DUT(d,params):
+def send_bin_to_DUT(d, params):
     from oeqa.oetest import oeRuntimeTest
     param_list = params
     cleanup_list = list()
@@ -264,7 +264,7 @@ def send_bin_to_DUT(d,params):
 def rm_bin(removal_list): # need to know both if the binary is sent archived and the path where it is sent if archived
     from oeqa.oetest import oeRuntimeTest
     for item in removal_list:
-        (status,output) = oeRuntimeTest.tc.target.run("rm " + item)
+        (status, output) = oeRuntimeTest.tc.target.run("rm " + item)
         if status != 0:
             bb.warn("Failed to remove: %s. Please ensure connection with the target device is up and running and "
                      "you have the needed rights." % item)
diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py
index f172555504..9a76e86d47 100644
--- a/meta/recipes-devtools/python/python3/create_manifest3.py
+++ b/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -71,8 +71,8 @@ hasfolders = []
 allfolders = []
 
 def isFolder(value):
-    value = value.replace('${PYTHON_MAJMIN}',pyversion)
-    if os.path.isdir(value.replace('${libdir}',nativelibfolder + '/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder + '/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder + '/usr/lib32')):
+    value = value.replace('${PYTHON_MAJMIN}', pyversion)
+    if os.path.isdir(value.replace('${libdir}', nativelibfolder + '/usr/lib')) or os.path.isdir(value.replace('${libdir}', nativelibfolder + '/usr/lib64')) or os.path.isdir(value.replace('${libdir}', nativelibfolder + '/usr/lib32')):
         return True
     else:
         return False
@@ -122,7 +122,7 @@ print_indent('Getting dependencies for package: core', 0)
 
 output = subprocess.check_output([sys.executable, 'get_module_deps3.py', 'python-core-package', '%s' % debugFlag]).decode('utf8')
 for coredep in output.split():
-    coredep = coredep.replace(pyversion,'${PYTHON_MAJMIN}')
+    coredep = coredep.replace(pyversion, '${PYTHON_MAJMIN}')
     if isCached(coredep):
         if coredep not in old_manifest['core']['cached']:
             old_manifest['core']['cached'].append(coredep)
@@ -173,7 +173,7 @@ for filedep in old_manifest['core']['files']:
 
 
     for pymodule_dep in output.split():
-        pymodule_dep = pymodule_dep.replace(pyversion,'${PYTHON_MAJMIN}')
+        pymodule_dep = pymodule_dep.replace(pyversion, '${PYTHON_MAJMIN}')
 
         if isCached(pymodule_dep):
             if pymodule_dep not in old_manifest['core']['cached']:
@@ -254,7 +254,7 @@ for pypkg in old_manifest:
         if isFolder(filedep):
             new_manifest[pypkg]['files'].append(filedep)
             # Asyncio (and others) are both the package and the folder name, we should not skip those...
-            path,mod = os.path.split(filedep)
+            path, mod = os.path.split(filedep)
             if mod != pypkg:
                 continue
         if '${bindir}' in filedep:
@@ -318,7 +318,7 @@ for pypkg in old_manifest:
             #   is folder_string inside path/folder1/folder2/filename?, 
             #   Yes, it works, but we waste a couple of milliseconds.
 
-            pymodule_dep = pymodule_dep.replace(pyversion,'${PYTHON_MAJMIN}')
+            pymodule_dep = pymodule_dep.replace(pyversion, '${PYTHON_MAJMIN}')
             inFolders = False
             for folder in allfolders:
                 # The module could have a directory named after it, e.g. xml, if we take out the filename from the path
@@ -427,11 +427,11 @@ for pypkg in new_manifest:
     new_manifest[pypkg]['rdepends'].sort()
 
 # Create the manifest from the data structure that was built
-with open('python3-manifest.json.new','w') as outfile:
-    json.dump(new_manifest,outfile, indent=4)
+with open('python3-manifest.json.new', 'w') as outfile:
+    json.dump(new_manifest, outfile, indent=4)
     outfile.write('\n')
 
-prepend_comments(comments,'python3-manifest.json.new')
+prepend_comments(comments, 'python3-manifest.json.new')
 
 if (repeated):
     error_msg = '\n\nERROR:\n'
diff --git a/meta/recipes-devtools/python/python3/get_module_deps3.py b/meta/recipes-devtools/python/python3/get_module_deps3.py
index 2a6e7f7bd9..62629c6870 100644
--- a/meta/recipes-devtools/python/python3/get_module_deps3.py
+++ b/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -36,13 +36,13 @@ def fix_path(dep_path):
 
     # Handle multilib, is there a better way?
     if '/usr/lib32' in dep_path:
-        dep_path = dep_path.replace('/usr/lib32','${libdir}')
+        dep_path = dep_path.replace('/usr/lib32', '${libdir}')
     if '/usr/lib64' in dep_path:
-        dep_path = dep_path.replace('/usr/lib64','${libdir}')
+        dep_path = dep_path.replace('/usr/lib64', '${libdir}')
     if '/usr/lib' in dep_path:
-        dep_path = dep_path.replace('/usr/lib','${libdir}')
+        dep_path = dep_path.replace('/usr/lib', '${libdir}')
     if '/usr/include' in dep_path:
-        dep_path = dep_path.replace('/usr/include','${includedir}')
+        dep_path = dep_path.replace('/usr/include', '${includedir}')
     if '__init__.' in dep_path:
         dep_path = os.path.split(dep_path)[0]
     return dep_path
@@ -51,7 +51,7 @@ def fix_path(dep_path):
 # Module to import was passed as an argument
 current_module = str(sys.argv[1]).rstrip()
 if debug == True:
-    log = open('temp/log_%s' % current_module.strip('.*'),'w')
+    log = open('temp/log_%s' % current_module.strip('.*'), 'w')
     log.write('Module %s generated the following dependencies:\n' % current_module)
 try:
     m = importlib.import_module(current_module)
@@ -129,7 +129,7 @@ for item in dif:
     if soabi in dep_path:
         if debug == True:
             log.write('Shared library found in %s\n' % dep_path)
-        dep_path = dep_path.replace(soabi,'*')
+        dep_path = dep_path.replace(soabi, '*')
         print(dep_path)
         continue
     if "_sysconfigdata" in dep_path:
@@ -165,7 +165,7 @@ for item in dif:
         if debug == True:
             log.write(cached + '\n')
         cached = fix_path(cached)
-        cached = cached.replace(cpython_tag,'*')
+        cached = cached.replace(cpython_tag, '*')
         if "_sysconfigdata" in cached:
             cached = cached.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*")
         print(cached)
diff --git a/meta/recipes-kernel/perf/perf/sort-pmuevents.py b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
index be25d4982d..5e29fab2ce 100755
--- a/meta/recipes-kernel/perf/perf/sort-pmuevents.py
+++ b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
@@ -83,7 +83,7 @@ outf = open(outfile, 'w')
 print(preamble.group(1))
 outf.write(preamble.group(1))
 for d in entry_dict_sorted:
-    outf.write("struct %s %s[] = {\n" % (entry_dict_sorted[d]['type'],d))
+    outf.write("struct %s %s[] = {\n" % (entry_dict_sorted[d]['type'], d))
     for f in entry_dict_sorted[d]['fields']:
         outf.write(entry_dict_sorted[d]['fields'][f] + '\n')
 
diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py
index 65d7e3fd86..0b7dff1712 100755
--- a/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -378,7 +378,7 @@ class cyclictest_runner:
 
                         print()
                         print(tc_name(name), "[Min/us,Avg/us,Max/us]:",)
-                        print("%d,%.1f,%d" % (bm_min,bm_avg, bm_max))
+                        print("%d,%.1f,%d" % (bm_min, bm_avg, bm_max))
                         print("PASS:", tc_name(name))
                         print()
 
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 2c2568fc19..81d9badbc0 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -31,7 +31,7 @@ __version__ = "0.2.1"
 def logger_create():
     logger = logging.getLogger("")
     loggerhandler = logging.StreamHandler()
-    loggerhandler.setFormatter(logging.Formatter("[%(asctime)s] %(message)s","%H:%M:%S"))
+    loggerhandler.setFormatter(logging.Formatter("[%(asctime)s] %(message)s", "%H:%M:%S"))
     logger.addHandler(loggerhandler)
     logger.setLevel(logging.INFO)
     return logger
@@ -159,7 +159,7 @@ class Configuration(object):
             dest_dir = os.path.normpath(self.repos[name].get("dest_dir", "."))
             self.repos[name]["dest_dir"] = "." if not dest_dir else dest_dir
         if msg != "":
-            logger.error("configuration file %s has the following error: %s" % (self.conffile,msg))
+            logger.error("configuration file %s has the following error: %s" % (self.conffile, msg))
             if self.localconffile and 'last_revision' in missing_options:
                 logger.error("local configuration file %s may be missing configuration for combo branch %s" % (self.localconffile, self.combobranch))
             sys.exit(1)
@@ -169,7 +169,7 @@ class Configuration(object):
             logger.error("ERROR: patchutils package is missing, please install it (e.g. # apt-get install patchutils)")
             sys.exit(1)
 
-def runcmd(cmd,destdir=None,printerr=True,out=None,env=None):
+def runcmd(cmd, destdir=None, printerr=True, out=None, env=None):
     """
         execute command, raise CalledProcessError if fail
         return output if succeed
@@ -686,7 +686,7 @@ def update_with_patches(conf, components, revisions, repos):
             patch_cmd_range = "%s..%s" % (repo['last_revision'], top_revision)
             rev_cmd_range = patch_cmd_range
 
-        file_filter = repo.get('file_filter',".")
+        file_filter = repo.get('file_filter', ".")
 
         # Filter out unwanted files
         exclude = repo.get('file_exclude', '')
@@ -696,7 +696,7 @@ def update_with_patches(conf, components, revisions, repos):
                 file_filter += " ':!%s'" % p
 
         patch_cmd = "git format-patch -N %s --output-directory %s %s -- %s" % \
-            (prefix,repo_patch_dir, patch_cmd_range, file_filter)
+            (prefix, repo_patch_dir, patch_cmd_range, file_filter)
         output = runcmd(patch_cmd, ldir)
         logger.debug("generated patch set:\n%s" % output)
         patchlist = output.splitlines()
diff --git a/scripts/contrib/image-manifest b/scripts/contrib/image-manifest
index ebca44a365..f342e6b5dd 100755
--- a/scripts/contrib/image-manifest
+++ b/scripts/contrib/image-manifest
@@ -79,7 +79,7 @@ def get_recipe_list(manifest, tinfoil):
     pkglist = get_pkg_list(manifest)
     recipelist = []
     for pkg in pkglist:
-        recipe = pkg2recipe(tinfoil,pkg)
+        recipe = pkg2recipe(tinfoil, pkg)
         if recipe:
             if not recipe in recipelist:
                 recipelist.append(recipe)
@@ -251,16 +251,16 @@ def pkg_dependencies(args):
             data = recipe_info[p]
             if "-native" not in data.pn:
                 if "cross" not in data.pn:
-                    print(" %s (%s)" % (data.pn,p))
+                    print(" %s (%s)" % (data.pn, p))
 
         if args.native:
             print('\nThe following native packages are required to build %s' % recipe)
             for p in sorted(packages):
                 data = recipe_info[p]
                 if "-native" in data.pn:
-                    print(" %s(%s)" % (data.pn,p))
+                    print(" %s(%s)" % (data.pn, p))
                 if "cross" in data.pn:
-                    print(" %s(%s)" % (data.pn,p))
+                    print(" %s(%s)" % (data.pn, p))
 
 def default_config():
     vlist = OrderedDict()
@@ -324,7 +324,7 @@ def export_manifest_info(args):
     logger.debug('tmp dir: %s' % tmpoutdir)
 
     # export manifest
-    shutil.copy2(args.manifest,os.path.join(tmpoutdir, "manifest"))
+    shutil.copy2(args.manifest, os.path.join(tmpoutdir, "manifest"))
 
     with bb.tinfoil.Tinfoil(tracking=True) as tinfoil:
         tinfoil.logger.setLevel(logger.getEffectiveLevel())
@@ -339,7 +339,7 @@ def export_manifest_info(args):
 
         recipelist = []
         for pkg in pkglist:
-            recipe = pkg2recipe(tinfoil,pkg)
+            recipe = pkg2recipe(tinfoil, pkg)
             if recipe:
                 if not recipe in recipelist:
                     recipelist.append(recipe)
diff --git a/scripts/contrib/list-packageconfig-flags.py b/scripts/contrib/list-packageconfig-flags.py
index d88de43bd2..fda0b35e9d 100755
--- a/scripts/contrib/list-packageconfig-flags.py
+++ b/scripts/contrib/list-packageconfig-flags.py
@@ -120,7 +120,7 @@ def display_all(data_dict):
             packageconfig = 'None'
         print('PACKAGECONFIG %s' % packageconfig)
 
-        for flag,flag_val in data_dict[fn].getVarFlags("PACKAGECONFIG").items():
+        for flag, flag_val in data_dict[fn].getVarFlags("PACKAGECONFIG").items():
             if flag == "doc":
                 continue
             print('PACKAGECONFIG[%s] %s' % (flag, flag_val))
diff --git a/scripts/install-buildtools b/scripts/install-buildtools
index 8554a5db67..213edb5b15 100755
--- a/scripts/install-buildtools
+++ b/scripts/install-buildtools
@@ -55,7 +55,7 @@ import scriptpath
 PROGNAME = 'install-buildtools'
 logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout)
 
-DEFAULT_INSTALL_DIR = os.path.join(os.path.split(scripts_path)[0],'buildtools')
+DEFAULT_INSTALL_DIR = os.path.join(os.path.split(scripts_path)[0], 'buildtools')
 DEFAULT_BASE_URL = 'http://downloads.yoctoproject.org/releases/yocto'
 DEFAULT_RELEASE = 'yocto-3.2_M3'
 DEFAULT_INSTALLER_VERSION = '3.1+snapshot'
diff --git a/scripts/lib/buildstats.py b/scripts/lib/buildstats.py
index 56f5bb24d2..3b251a697b 100644
--- a/scripts/lib/buildstats.py
+++ b/scripts/lib/buildstats.py
@@ -8,7 +8,7 @@ import json
 import logging
 import os
 import re
-from collections import namedtuple,OrderedDict
+from collections import namedtuple, OrderedDict
 from statistics import mean
 
 
diff --git a/scripts/lib/devtool/export.py b/scripts/lib/devtool/export.py
index 01174edae5..8e8800c0aa 100644
--- a/scripts/lib/devtool/export.py
+++ b/scripts/lib/devtool/export.py
@@ -52,7 +52,7 @@ def export(args, config, basepath, workspace):
         logger.info('Workspace contains no recipes, nothing to export')
         return 0
     else:
-        for param, recipes in {'include':args.include,'exclude':args.exclude}.items():
+        for param, recipes in {'include': args.include, 'exclude': args.exclude}.items():
             for recipe in recipes:
                 if recipe not in workspace:
                     logger.error('Recipe (%s) on %s argument not in the current workspace' % (recipe, param))
diff --git a/scripts/lib/devtool/menuconfig.py b/scripts/lib/devtool/menuconfig.py
index 95384c5333..9275ba7c52 100644
--- a/scripts/lib/devtool/menuconfig.py
+++ b/scripts/lib/devtool/menuconfig.py
@@ -45,19 +45,19 @@ def menuconfig(args, config, basepath, workspace):
         check_workspace_recipe(workspace, args.component)
         pn = rd.getVar('PN', True)
 
-        if not rd.getVarFlag('do_menuconfig','task'):
+        if not rd.getVarFlag('do_menuconfig', 'task'):
             raise DevtoolError("This recipe does not support menuconfig option")
 
-        workspace_dir = os.path.join(config.workspace_path,'sources')
+        workspace_dir = os.path.join(config.workspace_path, 'sources')
         kconfigpath = rd.getVar('B')
-        pn_src = os.path.join(workspace_dir,pn)
+        pn_src = os.path.join(workspace_dir, pn)
 
         # add check to see if oe_local_files exists or not
-        localfilesdir = os.path.join(pn_src,'oe-local-files')
+        localfilesdir = os.path.join(pn_src, 'oe-local-files')
         if not os.path.exists(localfilesdir):
             bb.utils.mkdirhier(localfilesdir)
             # Add gitignore to ensure source tree is clean
-            gitignorefile = os.path.join(localfilesdir,'.gitignore')
+            gitignorefile = os.path.join(localfilesdir, '.gitignore')
             with open(gitignorefile, 'w') as f:
                 f.write('# Ignore local files, by default. Remove this file if you want to commit the directory to Git\n')
                 f.write('*\n')
@@ -68,12 +68,12 @@ def menuconfig(args, config, basepath, workspace):
     logger.info('Launching menuconfig')
     exec_build_env_command(config.init_path, basepath, 'bitbake -c menuconfig %s' % pn, watch=True)
     fragment = os.path.join(localfilesdir, 'devtool-fragment.cfg')
-    res = standard._create_kconfig_diff(pn_src,rd,fragment)
+    res = standard._create_kconfig_diff(pn_src, rd, fragment)
 
     return 0
 
 def register_commands(subparsers, context):
     """register devtool subcommands from this plugin"""
-    parser_menuconfig = subparsers.add_parser('menuconfig',help='Alter build-time configuration for a recipe', description='Launches the make menuconfig command (for recipes where do_menuconfig is available), allowing users to make changes to the build-time configuration. Creates a config fragment corresponding to changes made.', group='advanced')
+    parser_menuconfig = subparsers.add_parser('menuconfig', help='Alter build-time configuration for a recipe', description='Launches the make menuconfig command (for recipes where do_menuconfig is available), allowing users to make changes to the build-time configuration. Creates a config fragment corresponding to changes made.', group='advanced')
     parser_menuconfig.add_argument('component', help='compenent to alter config')
-    parser_menuconfig.set_defaults(func=menuconfig,fixed_setup=context.fixed_setup)
+    parser_menuconfig.set_defaults(func=menuconfig, fixed_setup=context.fixed_setup)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 2bf65ad072..27f50b7ab1 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -457,7 +457,7 @@ def sync(args, config, basepath, workspace):
     finally:
         tinfoil.shutdown()
 
-def symlink_oelocal_files_srctree(rd,srctree):
+def symlink_oelocal_files_srctree(rd, srctree):
     import oe.patch
     if os.path.abspath(rd.getVar('S')) == os.path.abspath(rd.getVar('WORKDIR')):
         # If recipe extracts to ${WORKDIR}, symlink the files into the srctree
@@ -648,9 +648,9 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
 
             if os.path.exists(workshareddir) and (not os.listdir(workshareddir) or kernelVersion != staging_kerVer):
                 shutil.rmtree(workshareddir)
-                oe.path.copyhardlinktree(srcsubdir,workshareddir)
+                oe.path.copyhardlinktree(srcsubdir, workshareddir)
             elif not os.path.exists(workshareddir):
-                oe.path.copyhardlinktree(srcsubdir,workshareddir)
+                oe.path.copyhardlinktree(srcsubdir, workshareddir)
 
         tempdir_localdir = os.path.join(tempdir, 'oe-local-files')
         srctree_localdir = os.path.join(srctree, 'oe-local-files')
@@ -680,7 +680,7 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
                 shutil.move(tempdir_localdir, srcsubdir)
 
             shutil.move(srcsubdir, srctree)
-            symlink_oelocal_files_srctree(d,srctree)
+            symlink_oelocal_files_srctree(d, srctree)
 
         if is_kernel_yocto:
             logger.info('Copying kernel config to srctree')
@@ -753,7 +753,7 @@ def get_staging_kver(srcdir):
     kerver = []
     staging_kerVer = ""
     if os.path.exists(srcdir) and os.listdir(srcdir):
-        with open(os.path.join(srcdir,"Makefile")) as f:
+        with open(os.path.join(srcdir, "Makefile")) as f:
             version = [next(f) for x in range(5)][1:4]
             for word in version:
                 kerver.append(word.split('= ')[1].split('\n')[0])
@@ -824,10 +824,10 @@ def modify(args, config, basepath, workspace):
             staging_kerVer = get_staging_kver(srcdir)
             staging_kbranch = get_staging_kbranch(srcdir)
             if (os.path.exists(srcdir) and os.listdir(srcdir)) and (kernelVersion in staging_kerVer and staging_kbranch == kbranch):
-                oe.path.copyhardlinktree(srcdir,srctree)
+                oe.path.copyhardlinktree(srcdir, srctree)
                 workdir = rd.getVar('WORKDIR')
                 srcsubdir = rd.getVar('S')
-                localfilesdir = os.path.join(srctree,'oe-local-files')
+                localfilesdir = os.path.join(srctree, 'oe-local-files')
                 # Move local source files into separate subdir
                 recipe_patches = [os.path.basename(patch) for patch in oe.recipeutils.get_recipe_patches(rd)]
                 local_files = oe.recipeutils.get_recipe_local_files(rd)
@@ -853,7 +853,7 @@ def modify(args, config, basepath, workspace):
                     with open(os.path.join(srctree, 'oe-local-files', '.gitignore'), 'w') as f:
                         f.write('# Ignore local files, by default. Remove this file ''if you want to commit the directory to Git\n*\n')
 
-                symlink_oelocal_files_srctree(rd,srctree)
+                symlink_oelocal_files_srctree(rd, srctree)
 
                 task = 'do_configure'
                 res = tinfoil.build_targets(pn, task, handle_events=True)
@@ -861,7 +861,7 @@ def modify(args, config, basepath, workspace):
                 # Copy .config to workspace
                 kconfpath = rd.getVar('B')
                 logger.info('Copying kernel config to workspace')
-                shutil.copy2(os.path.join(kconfpath, '.config'),srctree)
+                shutil.copy2(os.path.join(kconfpath, '.config'), srctree)
 
                 # Set this to true, we still need to get initial_rev
                 # by parsing the git repo
@@ -964,7 +964,7 @@ def modify(args, config, basepath, workspace):
                         '        mv ${S}/.config ${S}/.config.old\n'
                         '    fi\n'
                         '}\n')
-            if rd.getVarFlag('do_menuconfig','task'):
+            if rd.getVarFlag('do_menuconfig', 'task'):
                 f.write('\ndo_configure_append() {\n'
                 '    if [ ! ${DEVTOOL_DISABLE_MENUCONFIG} ]; then\n'
                 '        cp ${B}/.config ${S}/.config.baseline\n'
@@ -1648,7 +1648,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil
         logger.debug('Pre-filtering: update: %s, new: %s' % (dict(upd_p), dict(new_p)))
         if filter_patches:
             new_p = OrderedDict()
-            upd_p = OrderedDict((k,v) for k,v in upd_p.items() if k in filter_patches)
+            upd_p = OrderedDict((k, v) for k, v in upd_p.items() if k in filter_patches)
             remove_files = [f for f in remove_files if f in filter_patches]
         updatefiles = False
         updaterecipe = False
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index 1a75252321..0605a01f87 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -27,7 +27,7 @@ from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_r
 logger = logging.getLogger('devtool')
 
 def _run(cmd, cwd=''):
-    logger.debug("Running command %s> %s" % (cwd,cmd))
+    logger.debug("Running command %s> %s" % (cwd, cmd))
     return bb.process.run('%s' % cmd, cwd=cwd)
 
 def _get_srctree(tmpdir):
@@ -47,7 +47,7 @@ def _copy_source_code(orig, dest):
 def _remove_patch_dirs(recipefolder):
     for root, dirs, files in os.walk(recipefolder):
         for d in dirs:
-            shutil.rmtree(os.path.join(root,d))
+            shutil.rmtree(os.path.join(root, d))
 
 def _recipe_contains(rd, var):
     rf = rd.getVar('FILE')
@@ -236,7 +236,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
         # Copy in new ones
         _copy_source_code(tmpsrctree, srctree)
 
-        (stdout,_) = __run('git ls-files --modified --others')
+        (stdout, _) = __run('git ls-files --modified --others')
         filelist = stdout.splitlines()
         pbar = bb.ui.knotty.BBProgress('Adding changed files', len(filelist))
         pbar.start()
diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py
index e9d52bb67b..ce91c3713c 100644
--- a/scripts/lib/recipetool/append.py
+++ b/scripts/lib/recipetool/append.py
@@ -49,7 +49,7 @@ def find_target_file(targetpath, d, pkglist=None):
                       '/etc/group': '/etc/group should be managed through the useradd and extrausers classes',
                       '/etc/shadow': '/etc/shadow should be managed through the useradd and extrausers classes',
                       '/etc/gshadow': '/etc/gshadow should be managed through the useradd and extrausers classes',
-                      '${sysconfdir}/hostname': '${sysconfdir}/hostname contents should be set by setting hostname_pn-base-files = "value" in configuration',}
+                      '${sysconfdir}/hostname': '${sysconfdir}/hostname contents should be set by setting hostname_pn-base-files = "value" in configuration', }
 
     for pthspec, message in invalidtargets.items():
         if fnmatch.fnmatchcase(targetpath, d.expand(pthspec)):
@@ -231,7 +231,7 @@ def appendfile(args):
             logger.warning('This file looks like it is a binary or otherwise the output of compilation. If it is, you should consider building it properly instead of substituting a binary file directly.')
 
     if args.recipe:
-        recipes = {args.targetpath: [args.recipe],}
+        recipes = {args.targetpath: [args.recipe], }
     else:
         try:
             recipes = find_target_file(args.targetpath, tinfoil.config_data)
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 67f3f4980a..9d531948e5 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -1113,7 +1113,7 @@ def crunch_license(licfile):
             # Squash spaces, and replace smart quotes, double quotes
             # and backticks with single quotes
             line = oe.utils.squashspaces(line.strip())
-            line = line.replace(u"\u2018", "'").replace(u"\u2019", "'").replace(u"\u201c","'").replace(u"\u201d", "'").replace('"', '\'').replace('`', '\'')
+            line = line.replace(u"\u2018", "'").replace(u"\u2019", "'").replace(u"\u201c", "'").replace(u"\u201d", "'").replace('"', '\'').replace('`', '\'')
             if line:
                 lictext.append(line)
 
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py
index b9bfa936fa..44b398d792 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -680,7 +680,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
                 process_macro(in_keyword, partial)
 
         if extravalues:
-            for k,v in list(extravalues.items()):
+            for k, v in list(extravalues.items()):
                 if v:
                     if v.startswith('$') or v.startswith('@') or v.startswith('%'):
                         del extravalues[k]
diff --git a/scripts/lib/resulttool/manualexecution.py b/scripts/lib/resulttool/manualexecution.py
index a847dd9caf..2bd4f6f136 100755
--- a/scripts/lib/resulttool/manualexecution.py
+++ b/scripts/lib/resulttool/manualexecution.py
@@ -98,10 +98,10 @@ class ManualTestRunner(object):
                 print('Expected output: %s' % expected_output)
         while True:
             done = input('\nPlease provide test results: (P)assed/(F)ailed/(B)locked/(S)kipped? \n').lower()
-            result_types = {'p':'PASSED',
-                            'f':'FAILED',
-                            'b':'BLOCKED',
-                            's':'SKIPPED'}
+            result_types = {'p': 'PASSED',
+                            'f': 'FAILED',
+                            'b': 'BLOCKED',
+                            's': 'SKIPPED'}
             if done in result_types:
                 for r in result_types:
                     if done == r:
diff --git a/scripts/lib/resulttool/report.py b/scripts/lib/resulttool/report.py
index 0c56b64cb2..a4f1d11bef 100644
--- a/scripts/lib/resulttool/report.py
+++ b/scripts/lib/resulttool/report.py
@@ -167,7 +167,7 @@ class ResultsTextReport(object):
         reportvalues = []
         machines = []
         cols = ['passed', 'failed', 'skipped']
-        maxlen = {'passed': 0, 'failed': 0, 'skipped': 0, 'result_id': 0, 'testseries': 0, 'ptest': 0,'ltptest': 0, 'ltpposixtest': 0}
+        maxlen = {'passed': 0, 'failed': 0, 'skipped': 0, 'result_id': 0, 'testseries': 0, 'ptest': 0, 'ltptest': 0, 'ltpposixtest': 0}
         for line in test_count_reports:
             total_tested = line['passed'] + line['failed'] + line['skipped']
             vals = {}
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 174bd27f2f..cef201aec8 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -280,7 +280,7 @@ class Disk:
     def __getattr__(self, name):
         """Get path to the executable in a lazy way."""
         if name in ("mdir", "mcopy", "mdel", "mdeltree", "sfdisk", "e2fsck",
-                    "resize2fs", "mkswap", "mkdosfs", "debugfs","blkid"):
+                    "resize2fs", "mkswap", "mkdosfs", "debugfs", "blkid"):
             aname = "_%s" % name
             if aname not in self.__dict__:
                 setattr(self, aname, find_executable(name, self.paths))
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 5f9a1f64bf..9ae3f52dea 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -344,9 +344,9 @@ class PartitionedImage():
                 #make sure the fsuuid for vfat/msdos align with format 0xYYYYYYYY
                 if part.fstype == 'vfat' or part.fstype == 'msdos':
                     if part.fsuuid.upper().startswith("0X"):
-                        part.fsuuid = '0x' + part.fsuuid.upper()[2:].rjust(8,"0")
+                        part.fsuuid = '0x' + part.fsuuid.upper()[2:].rjust(8, "0")
                     else:
-                        part.fsuuid = '0x' + part.fsuuid.upper().rjust(8,"0")
+                        part.fsuuid = '0x' + part.fsuuid.upper().rjust(8, "0")
 
     def prepare(self, imager):
         """Prepare an image. Call prepare method of all image partitions."""
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index 75dd23efa3..aef04a18c0 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -497,7 +497,7 @@ def find_path(args):
     found = False
     for root, dirs, files in os.walk(os.path.join(args.pkgdata_dir, 'runtime')):
         for fn in files:
-            with open(os.path.join(root,fn)) as f:
+            with open(os.path.join(root, fn)) as f:
                 for line in f:
                     if line.startswith('FILES_INFO:'):
                         val = line.split(':', 1)[1].strip()
diff --git a/scripts/opkg-query-helper.py b/scripts/opkg-query-helper.py
index bc3ab43823..9e50f30962 100755
--- a/scripts/opkg-query-helper.py
+++ b/scripts/opkg-query-helper.py
@@ -43,26 +43,26 @@ for line in fileinput.input(args):
             if archmode:
                 if line.startswith("Architecture:"):
                     arch = line.split(": ")[1]
-                    print("%s %s" % (pkg,arch))
+                    print("%s %s" % (pkg, arch))
             elif filemode:
                 if line.startswith("Version:"):
                     ver = line.split(": ")[1]
                 elif line.startswith("Architecture:"):
                     arch = line.split(": ")[1]
-                    print("%s %s_%s_%s.ipk %s" % (pkg,pkg,ver,arch,arch))
+                    print("%s %s_%s_%s.ipk %s" % (pkg, pkg, ver, arch, arch))
             elif vermode:
                 if line.startswith("Version:"):
                     ver = line.split(": ")[1]
                 elif line.startswith("Architecture:"):
                     arch = line.split(": ")[1]
-                    print("%s %s %s" % (pkg,arch,ver))
+                    print("%s %s %s" % (pkg, arch, ver))
             else:
                 if line.startswith("Depends:"):
                     depval = line.split(": ")[1]
                     deps = depval.split(", ")
                     for dep in deps:
                         dep = verregex.sub('', dep)
-                        print("%s|%s" % (pkg,dep))
+                        print("%s|%s" % (pkg, dep))
                 elif line.startswith("Recommends:"):
                     recval = line.split(": ")[1]
                     recs = recval.split(", ")
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index b6e49567f1..7572b59b8d 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -454,7 +454,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
                             [(sample.time,
                               # Sum up used space of all volumes including the current one
                               # so that the graphs appear as stacked on top of each other.
-                              functools.reduce(lambda x,y: x + y,
+                              functools.reduce(lambda x, y: x + y,
                                      [sample.records[volume] - min_used[volume]
                                       for volume in volumes[0:i]
                                       if volume in sample.records],
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index 3dc5da081b..2de03937ce 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -267,7 +267,7 @@ def _parse_headers(file):
             value = line.strip()
         headers[last] += value
         return headers, last
-    return reduce(parse, file.read().split('\n'), (defaultdict(str),''))[0]
+    return reduce(parse, file.read().split('\n'), (defaultdict(str), ''))[0]
 
 def _parse_timed_blocks(file):
     """Parses (ie., splits) a file into so-called timed-blocks. A
@@ -469,7 +469,7 @@ def _parse_proc_disk_stat_log(file):
 
     for time, lines in _parse_timed_blocks(file):
         sample = DiskStatSample(time)
-        relevant_tokens = [linetokens for linetokens in map(lambda x: x.split(),lines) if is_relevant_line(linetokens)]
+        relevant_tokens = [linetokens for linetokens in map(lambda x: x.split(), lines) if is_relevant_line(linetokens)]
 
         for tokens in relevant_tokens:
             disk, rsect, wsect, use = tokens[2], int(tokens[5]), int(tokens[9]), int(tokens[12])
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py
index 4a55427655..301583e9aa 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -161,7 +161,7 @@ class Process:
             if self.parent == None and self.pid // 1000 > 1 and \
                 not (self.ppid == 2000 or self.pid == 2000): # kernel threads: ppid=2
                 self.writer.warn("Missing CONFIG_PROC_EVENTS: no parent for pid '%i' ('%s') with ppid '%i'"
-                                 % (self.pid,self.cmd,self.ppid))
+                                 % (self.pid, self.cmd, self.ppid))
 
     def get_end_time(self):
         return self.start_time + self.duration
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
index 1f66027a6e..3ea3592441 100644
--- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
+++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
@@ -28,7 +28,7 @@ class TestBCParser(unittest.TestCase):
 		self.name = "My first unittest"
 		self.rootdir = bootchart_dir
 
-	def mk_fname(self,f):
+	def mk_fname(self, f):
 		return os.path.join(self.rootdir, f)
 
 	def testParseHeader(self):
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py b/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
index a30e13ca06..f9f49cc340 100644
--- a/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
+++ b/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
@@ -27,7 +27,7 @@ class TestProcessTree(unittest.TestCase):
         self.processtree = process_tree.ProcessTree(writer, None, trace.ps_stats,
             trace.ps_stats.sample_period, None, options.prune, None, None, False, for_testing=True)
 
-    def mk_fname(self,f):
+    def mk_fname(self, f):
         return os.path.join(self.rootdir, f)
 
     def flatten(self, process_tree):
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index b919e0167d..4269eacb34 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -32,7 +32,7 @@ old_prefix = re.compile(b("##DEFAULT_INSTALL_DIR##"))
 def get_arch():
     f.seek(0)
     e_ident = f.read(16)
-    ei_mag0,ei_mag1_3,ei_class = struct.unpack("<B3sB11x", e_ident)
+    ei_mag0, ei_mag1_3, ei_class = struct.unpack("<B3sB11x", e_ident)
 
     if (ei_mag0 != 0x7f and ei_mag1_3 != "ELF") or ei_class == 0:
         return 0
@@ -69,7 +69,7 @@ def change_interpreter(elf_file_name):
         ph_fmt = "<IIQQQQQQ"
 
     """ look for PT_INTERP section """
-    for i in range(0,e_phnum):
+    for i in range(0, e_phnum):
         f.seek(e_phoff + i * e_phentsize)
         ph_hdr = f.read(e_phentsize)
         if arch == 32:
@@ -123,7 +123,7 @@ def change_dl_sysdirs(elf_file_name):
     sysdirs = sysdirs_len = ""
 
     """ change ld.so.cache path and default libs path for dynamic loader """
-    for i in range(0,e_shnum):
+    for i in range(0, e_shnum):
         f.seek(e_shoff + i * e_shentsize)
         sh_hdr = f.read(e_shentsize)
 
diff --git a/scripts/runqemu b/scripts/runqemu
index fceebfce4c..259d32cd2a 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -795,7 +795,7 @@ class BaseConfig(object):
 
         mach = self.get('MACHINE')
         if not mach.startswith('qemumips'):
-            self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m','').strip() + 'M'
+            self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m', '').strip() + 'M'
 
         self.qemu_opt_script += ' %s' % self.get('QB_MEM')
 
@@ -1241,7 +1241,7 @@ class BaseConfig(object):
                     elif drive_type.startswith("/dev/vdb"):
                         logger.info('Using block virtio drive')
                         vm_drive = '-drive id=disk0,file=%s,if=none,format=%s -device virtio-blk-device,drive=disk0%s' \
-                                    % (self.rootfs, rootfs_format,qb_rootfs_extra_opt)
+                                    % (self.rootfs, rootfs_format, qb_rootfs_extra_opt)
                     else:
                         # virtio might have been selected explicitly (just use it), or
                         # is used as fallback (then warn about that).
diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
index b9c1c42f41..dbdff0714f 100755
--- a/scripts/tiny/ksize.py
+++ b/scripts/tiny/ksize.py
@@ -80,8 +80,8 @@ class Report:
         self.title = title
         self.sizes = Sizes(glob)
         self.parts = []
-        self.totals = {"total":0, "text":0, "data":0, "bss":0}
-        self.deltas = {"total":0, "text":0, "data":0, "bss":0}
+        self.totals = {"total": 0, "text": 0, "data": 0, "bss": 0}
+        self.deltas = {"total": 0, "text": 0, "data": 0, "bss": 0}
 
     def show(self, indent=""):
         rule = str.ljust(indent, 80, '-')
diff --git a/scripts/wic b/scripts/wic
index 17ed688bf4..6c62f9e84e 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -337,7 +337,7 @@ def wic_init_parser_create(subparser):
                       dest='compressor',
                       help="compress image with specified compressor")
     subparser.add_argument("-m", "--bmap", action="store_true", help="generate .bmap")
-    subparser.add_argument("--no-fstab-update",action="store_true",
+    subparser.add_argument("--no-fstab-update", action="store_true",
                       help="Do not change fstab file.")
     subparser.add_argument("-v", "--vars", dest='vars_dir',
                       help="directory with <image>.env files that store "
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 7/8] PEP8 double aggressive E301 ~ E306
  2021-06-28  5:59 [PATCH 1/8] PEP8 double aggressive E401 Khem Raj
                   ` (4 preceding siblings ...)
  2021-06-28  5:59 ` [PATCH 6/8] PEP8 double aggressive E225 ~ E228 and E231 Khem Raj
@ 2021-06-28  5:59 ` Khem Raj
  2021-06-28  5:59 ` [PATCH 8/8] PEP8 double aggressive W291 ~ W293 and W391 Khem Raj
  2021-06-28  6:12 ` [OE-core] [PATCH 1/8] PEP8 double aggressive E401 Alexander Kanavin
  7 siblings, 0 replies; 16+ messages in thread
From: Khem Raj @ 2021-06-28  5:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: persianpros, Khem Raj

From: persianpros <persianpros@yahoo.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-selftest/lib/devtool/bbpath.py           |  7 ++++
 meta-selftest/lib/devtool/test.py             |  2 ++
 .../lib/oeqa/runtime/cases/dnf_runtime.py     |  1 +
 .../lib/oeqa/runtime/cases/selftest.py        |  1 +
 meta-selftest/lib/oeqa/runtime/cases/virgl.py |  1 +
 meta-selftest/lib/recipetool/bbpath.py        |  7 ++++
 meta/files/ext-sdk-prepare.py                 |  5 +++
 meta/lib/bblayers/create.py                   |  3 ++
 meta/lib/buildstats.py                        |  2 +-
 meta/lib/oe/buildhistory_analysis.py          |  7 ++++
 meta/lib/oe/cachedpath.py                     |  1 +
 meta/lib/oe/classextend.py                    |  4 +++
 meta/lib/oe/classutils.py                     |  3 ++
 meta/lib/oe/copy_buildsystem.py               |  7 ++++
 meta/lib/oe/cve_check.py                      |  2 ++
 meta/lib/oe/data.py                           |  2 ++
 meta/lib/oe/distro_check.py                   | 20 ++++++++++-
 meta/lib/oe/elf.py                            |  1 +
 meta/lib/oe/gpg_sign.py                       |  5 ++-
 meta/lib/oe/license.py                        | 19 ++++++++++
 meta/lib/oe/lsb.py                            |  5 +++
 meta/lib/oe/maketype.py                       |  7 ++++
 meta/lib/oe/manifest.py                       |  5 ++-
 meta/lib/oe/package.py                        | 10 ++++++
 meta/lib/oe/package_manager/__init__.py       | 10 +++++-
 meta/lib/oe/package_manager/deb/__init__.py   |  6 ++--
 meta/lib/oe/package_manager/deb/manifest.py   |  1 +
 meta/lib/oe/package_manager/deb/rootfs.py     |  3 +-
 meta/lib/oe/package_manager/deb/sdk.py        |  2 +-
 meta/lib/oe/package_manager/ipk/__init__.py   |  5 +--
 meta/lib/oe/package_manager/ipk/manifest.py   |  2 ++
 meta/lib/oe/package_manager/ipk/rootfs.py     |  6 ++++
 meta/lib/oe/package_manager/ipk/sdk.py        |  1 +
 meta/lib/oe/package_manager/rpm/__init__.py   |  5 +--
 meta/lib/oe/package_manager/rpm/manifest.py   |  2 ++
 meta/lib/oe/package_manager/rpm/rootfs.py     |  3 +-
 meta/lib/oe/package_manager/rpm/sdk.py        |  1 +
 meta/lib/oe/packagedata.py                    | 12 +++++++
 meta/lib/oe/packagegroup.py                   |  6 ++++
 meta/lib/oe/patch.py                          | 13 +++++--
 meta/lib/oe/path.py                           | 17 +++++++++
 meta/lib/oe/prservice.py                      |  5 +++
 meta/lib/oe/qa.py                             |  4 +++
 meta/lib/oe/recipeutils.py                    | 10 +++++-
 meta/lib/oe/reproducible.py                   |  6 ++++
 meta/lib/oe/rootfs.py                         |  7 ++--
 meta/lib/oe/sdk.py                            |  4 +++
 meta/lib/oe/sstatesig.py                      | 18 ++++++++++
 meta/lib/oe/terminal.py                       | 21 +++++++++++
 meta/lib/oe/types.py                          | 13 +++++++
 meta/lib/oe/useradd.py                        |  5 +++
 meta/lib/oe/utils.py                          | 35 +++++++++++++++++++
 meta/lib/oeqa/buildperf/base.py               |  2 --
 meta/lib/oeqa/buildperf/test_basic.py         |  1 +
 meta/lib/oeqa/controllers/masterimage.py      |  1 +
 meta/lib/oeqa/controllers/testtargetloader.py |  2 ++
 meta/lib/oeqa/core/case.py                    |  3 ++
 .../lib/oeqa/core/cases/example/test_basic.py |  2 ++
 meta/lib/oeqa/core/context.py                 |  4 +++
 meta/lib/oeqa/core/decorator/__init__.py      |  5 +++
 meta/lib/oeqa/core/decorator/data.py          | 16 +++++++++
 meta/lib/oeqa/core/decorator/depends.py       |  5 +++
 meta/lib/oeqa/core/decorator/oetimeout.py     |  2 ++
 meta/lib/oeqa/core/exception.py               |  7 ++++
 meta/lib/oeqa/core/loader.py                  |  4 ++-
 meta/lib/oeqa/core/runner.py                  |  7 ++++
 meta/lib/oeqa/core/target/__init__.py         |  1 +
 meta/lib/oeqa/core/target/qemu.py             |  1 +
 meta/lib/oeqa/core/target/ssh.py              |  4 +--
 meta/lib/oeqa/core/tests/cases/data.py        |  1 +
 meta/lib/oeqa/core/tests/cases/depends.py     |  1 +
 .../core/tests/cases/loader/valid/another.py  |  1 +
 meta/lib/oeqa/core/tests/cases/oetag.py       |  2 ++
 meta/lib/oeqa/core/tests/cases/timeout.py     |  2 +-
 meta/lib/oeqa/core/tests/common.py            |  2 ++
 meta/lib/oeqa/core/tests/test_data.py         |  2 ++
 meta/lib/oeqa/core/tests/test_decorators.py   |  4 +++
 meta/lib/oeqa/core/tests/test_loader.py       |  2 ++
 meta/lib/oeqa/core/tests/test_runner.py       |  2 ++
 meta/lib/oeqa/core/utils/concurrencytest.py   | 18 ++++++++++
 meta/lib/oeqa/core/utils/misc.py              |  7 ++++
 meta/lib/oeqa/core/utils/path.py              |  2 ++
 meta/lib/oeqa/core/utils/test.py              | 11 ++++++
 meta/lib/oeqa/oetest.py                       | 16 +++++++++
 meta/lib/oeqa/runexported.py                  |  5 +++
 meta/lib/oeqa/runtime/case.py                 |  1 +
 meta/lib/oeqa/runtime/cases/_qemutiny.py      |  1 +
 meta/lib/oeqa/runtime/cases/apt.py            |  2 ++
 meta/lib/oeqa/runtime/cases/boot.py           |  1 +
 meta/lib/oeqa/runtime/cases/buildcpio.py      |  1 +
 .../lib/oeqa/runtime/cases/buildgalculator.py |  1 +
 meta/lib/oeqa/runtime/cases/buildlzip.py      |  1 +
 meta/lib/oeqa/runtime/cases/connman.py        |  1 +
 meta/lib/oeqa/runtime/cases/date.py           |  1 +
 meta/lib/oeqa/runtime/cases/df.py             |  1 +
 meta/lib/oeqa/runtime/cases/dnf.py            |  3 ++
 .../oeqa/runtime/cases/ethernet_ip_connman.py |  1 +
 meta/lib/oeqa/runtime/cases/gcc.py            |  1 +
 meta/lib/oeqa/runtime/cases/gi.py             |  1 +
 meta/lib/oeqa/runtime/cases/gstreamer.py      |  1 +
 meta/lib/oeqa/runtime/cases/kernelmodule.py   |  1 +
 meta/lib/oeqa/runtime/cases/ksample.py        |  3 ++
 meta/lib/oeqa/runtime/cases/ldd.py            |  1 +
 meta/lib/oeqa/runtime/cases/logrotate.py      |  1 +
 meta/lib/oeqa/runtime/cases/ltp.py            |  3 +-
 meta/lib/oeqa/runtime/cases/ltp_compliance.py |  3 +-
 meta/lib/oeqa/runtime/cases/ltp_stress.py     |  4 +--
 meta/lib/oeqa/runtime/cases/multilib.py       |  1 +
 meta/lib/oeqa/runtime/cases/oe_syslog.py      |  5 ++-
 meta/lib/oeqa/runtime/cases/opkg.py           |  2 ++
 meta/lib/oeqa/runtime/cases/pam.py            |  1 +
 meta/lib/oeqa/runtime/cases/parselogs.py      |  1 +
 meta/lib/oeqa/runtime/cases/perl.py           |  1 +
 meta/lib/oeqa/runtime/cases/ping.py           |  1 +
 meta/lib/oeqa/runtime/cases/ptest.py          |  1 +
 meta/lib/oeqa/runtime/cases/python.py         |  1 +
 meta/lib/oeqa/runtime/cases/rpm.py            |  1 +
 meta/lib/oeqa/runtime/cases/rtc.py            |  1 +
 meta/lib/oeqa/runtime/cases/runlevel.py       |  1 +
 meta/lib/oeqa/runtime/cases/scons.py          |  1 +
 meta/lib/oeqa/runtime/cases/scp.py            |  1 +
 meta/lib/oeqa/runtime/cases/skeletoninit.py   |  1 +
 meta/lib/oeqa/runtime/cases/ssh.py            |  1 +
 meta/lib/oeqa/runtime/cases/stap.py           |  1 +
 meta/lib/oeqa/runtime/cases/storage.py        |  2 +-
 meta/lib/oeqa/runtime/cases/suspend.py        |  1 +
 meta/lib/oeqa/runtime/cases/systemd.py        |  3 ++
 meta/lib/oeqa/runtime/cases/terminal.py       |  1 +
 meta/lib/oeqa/runtime/cases/usb_hid.py        |  1 +
 meta/lib/oeqa/runtime/cases/weston.py         |  1 +
 meta/lib/oeqa/runtime/cases/x32lib.py         |  1 +
 meta/lib/oeqa/runtime/cases/xorg.py           |  1 +
 meta/lib/oeqa/runtime/context.py              |  3 ++
 meta/lib/oeqa/runtime/decorator/package.py    |  2 ++
 meta/lib/oeqa/runtime/loader.py               |  1 +
 .../oeqa/runtime/utils/targetbuildproject.py  |  1 +
 meta/lib/oeqa/sdk/case.py                     |  1 +
 meta/lib/oeqa/sdk/cases/assimp.py             |  1 +
 meta/lib/oeqa/sdk/cases/buildcpio.py          |  2 ++
 meta/lib/oeqa/sdk/cases/buildepoxy.py         |  2 ++
 meta/lib/oeqa/sdk/cases/buildgalculator.py    |  2 ++
 meta/lib/oeqa/sdk/cases/buildlzip.py          |  2 ++
 meta/lib/oeqa/sdk/cases/gcc.py                |  1 +
 meta/lib/oeqa/sdk/cases/perl.py               |  1 +
 meta/lib/oeqa/sdk/cases/python.py             |  2 ++
 meta/lib/oeqa/sdk/context.py                  |  3 ++
 meta/lib/oeqa/sdk/testsdk.py                  |  2 ++
 meta/lib/oeqa/sdk/utils/sdkbuildproject.py    |  1 +
 meta/lib/oeqa/sdkext/case.py                  |  1 +
 meta/lib/oeqa/sdkext/cases/devtool.py         |  2 ++
 meta/lib/oeqa/sdkext/context.py               |  3 ++
 meta/lib/oeqa/sdkext/testsdk.py               |  1 +
 meta/lib/oeqa/selftest/case.py                |  2 ++
 meta/lib/oeqa/selftest/cases/archiver.py      |  3 +-
 meta/lib/oeqa/selftest/cases/bblayers.py      |  1 +
 meta/lib/oeqa/selftest/cases/bbtests.py       |  2 +-
 meta/lib/oeqa/selftest/cases/binutils.py      |  2 ++
 meta/lib/oeqa/selftest/cases/buildoptions.py  |  6 ++++
 .../lib/oeqa/selftest/cases/containerimage.py |  2 ++
 meta/lib/oeqa/selftest/cases/cve_check.py     |  1 +
 meta/lib/oeqa/selftest/cases/devtool.py       | 15 ++++++--
 meta/lib/oeqa/selftest/cases/distrodata.py    |  1 +
 meta/lib/oeqa/selftest/cases/eSDK.py          |  1 +
 .../oeqa/selftest/cases/efibootpartition.py   |  1 +
 meta/lib/oeqa/selftest/cases/fetch.py         |  1 +
 meta/lib/oeqa/selftest/cases/fitimage.py      |  5 +--
 meta/lib/oeqa/selftest/cases/gcc.py           | 16 +++++++++
 meta/lib/oeqa/selftest/cases/glibc.py         |  4 +++
 meta/lib/oeqa/selftest/cases/image_typedep.py |  1 +
 meta/lib/oeqa/selftest/cases/imagefeatures.py |  2 +-
 .../oeqa/selftest/cases/incompatible_lic.py   |  3 ++
 .../oeqa/selftest/cases/kerneldevelopment.py  |  1 +
 meta/lib/oeqa/selftest/cases/layerappend.py   |  1 +
 meta/lib/oeqa/selftest/cases/liboe.py         |  1 +
 meta/lib/oeqa/selftest/cases/lic_checksum.py  |  1 +
 meta/lib/oeqa/selftest/cases/manifest.py      |  4 ++-
 meta/lib/oeqa/selftest/cases/meta_ide.py      |  1 +
 meta/lib/oeqa/selftest/cases/multiconfig.py   |  1 +
 .../oeqa/selftest/cases/oelib/buildhistory.py |  2 ++
 meta/lib/oeqa/selftest/cases/oelib/elf.py     |  1 +
 meta/lib/oeqa/selftest/cases/oelib/license.py |  5 +++
 meta/lib/oeqa/selftest/cases/oelib/path.py    |  1 +
 meta/lib/oeqa/selftest/cases/oelib/types.py   |  2 ++
 meta/lib/oeqa/selftest/cases/oelib/utils.py   |  2 ++
 meta/lib/oeqa/selftest/cases/oescripts.py     |  8 +++--
 meta/lib/oeqa/selftest/cases/package.py       |  3 ++
 meta/lib/oeqa/selftest/cases/pkgdata.py       |  1 +
 meta/lib/oeqa/selftest/cases/prservice.py     |  1 +
 meta/lib/oeqa/selftest/cases/pseudo.py        |  1 +
 meta/lib/oeqa/selftest/cases/recipetool.py    |  3 +-
 meta/lib/oeqa/selftest/cases/recipeutils.py   |  3 --
 meta/lib/oeqa/selftest/cases/reproducible.py  |  8 +++++
 .../oeqa/selftest/cases/resulttooltests.py    |  1 +
 meta/lib/oeqa/selftest/cases/runcmd.py        |  2 ++
 meta/lib/oeqa/selftest/cases/runqemu.py       |  3 +-
 meta/lib/oeqa/selftest/cases/runtime_test.py  |  7 ++--
 meta/lib/oeqa/selftest/cases/selftest.py      |  3 ++
 meta/lib/oeqa/selftest/cases/signing.py       |  2 --
 meta/lib/oeqa/selftest/cases/sstatetests.py   | 10 +++---
 meta/lib/oeqa/selftest/cases/sysroot.py       |  1 +
 meta/lib/oeqa/selftest/cases/tinfoil.py       |  1 +
 meta/lib/oeqa/selftest/cases/wic.py           |  7 ++--
 meta/lib/oeqa/selftest/context.py             |  5 +++
 meta/lib/oeqa/targetcontrol.py                |  2 +-
 meta/lib/oeqa/utils/__init__.py               |  5 +++
 meta/lib/oeqa/utils/buildproject.py           |  1 +
 meta/lib/oeqa/utils/commands.py               |  8 ++++-
 meta/lib/oeqa/utils/decorators.py             | 19 ++++++++++
 meta/lib/oeqa/utils/dump.py                   |  4 +++
 meta/lib/oeqa/utils/ftools.py                 |  4 +++
 meta/lib/oeqa/utils/git.py                    |  2 ++
 meta/lib/oeqa/utils/gitarchive.py             |  7 ++++
 meta/lib/oeqa/utils/httpserver.py             |  4 ++-
 meta/lib/oeqa/utils/logparser.py              |  2 ++
 meta/lib/oeqa/utils/metadata.py               |  5 +++
 meta/lib/oeqa/utils/network.py                |  1 +
 meta/lib/oeqa/utils/nfs.py                    |  1 +
 meta/lib/oeqa/utils/package_manager.py        | 11 ++++++
 meta/lib/oeqa/utils/qemurunner.py             |  5 +--
 meta/lib/oeqa/utils/qemutinyrunner.py         |  3 +-
 meta/lib/oeqa/utils/sshcontrol.py             |  4 +--
 meta/lib/oeqa/utils/subprocesstweak.py        |  2 ++
 meta/lib/oeqa/utils/targetbuild.py            |  2 ++
 meta/lib/oeqa/utils/testexport.py             |  3 ++
 meta/lib/rootfspostcommands.py                |  3 ++
 .../systemd/systemd-systemctl/systemctl       |  2 ++
 .../meson/meson/meson-setup.py                |  3 ++
 .../python/python3/create_manifest3.py        | 11 +++---
 .../python/python3/get_module_deps3.py        |  2 +-
 meta/recipes-rt/rt-tests/files/rt_bmark.py    | 16 +++++++++
 scripts/bitbake-whatchanged                   |  7 ++++
 scripts/buildhistory-collect-srcrevs          |  3 ++
 scripts/buildhistory-diff                     |  3 ++
 scripts/buildstats-diff                       |  2 ++
 scripts/combo-layer                           | 28 ++++++++++++++-
 scripts/contrib/bbvars.py                     |  5 +++
 scripts/contrib/devtool-stress.py             |  2 ++
 scripts/contrib/graph-tool                    |  1 +
 scripts/contrib/image-manifest                | 11 ++++++
 scripts/contrib/list-packageconfig-flags.py   |  8 +++++
 scripts/contrib/oe-build-perf-report-email.py |  1 +
 scripts/contrib/patchreview.py                |  5 +--
 scripts/contrib/verify-homepage.py            |  3 ++
 scripts/cp-noerror                            |  2 ++
 scripts/crosstap                              |  5 +++
 scripts/devtool                               |  5 ++-
 scripts/gen-lockedsig-cache                   |  8 +++++
 scripts/install-buildtools                    |  2 ++
 scripts/lib/argparse_oe.py                    |  5 +++
 scripts/lib/build_perf/__init__.py            |  1 +
 scripts/lib/build_perf/report.py              |  1 +
 scripts/lib/buildstats.py                     |  3 +-
 scripts/lib/checklayer/__init__.py            | 14 ++++++++
 scripts/lib/checklayer/case.py                |  1 +
 scripts/lib/checklayer/cases/bsp.py           |  4 ++-
 scripts/lib/checklayer/cases/common.py        |  1 +
 scripts/lib/checklayer/cases/distro.py        |  1 +
 scripts/lib/checklayer/context.py             |  1 +
 scripts/lib/devtool/__init__.py               | 17 +++++++++
 scripts/lib/devtool/build.py                  |  3 ++
 scripts/lib/devtool/build_image.py            |  4 +++
 scripts/lib/devtool/deploy.py                 |  3 +-
 scripts/lib/devtool/export.py                 |  3 +-
 scripts/lib/devtool/import.py                 |  2 ++
 scripts/lib/devtool/menuconfig.py             |  2 ++
 scripts/lib/devtool/package.py                |  2 ++
 scripts/lib/devtool/runqemu.py                |  2 ++
 scripts/lib/devtool/sdk.py                    |  9 +++++
 scripts/lib/devtool/search.py                 |  3 +-
 scripts/lib/devtool/standard.py               | 23 ++++++++++++
 scripts/lib/devtool/upgrade.py                | 21 +++++++++++
 scripts/lib/devtool/utilcmds.py               |  1 +
 scripts/lib/recipetool/append.py              |  7 ++++
 scripts/lib/recipetool/create.py              | 21 +++++++++++
 scripts/lib/recipetool/create_buildsys.py     |  7 +++-
 scripts/lib/recipetool/create_kernel.py       |  3 ++
 scripts/lib/recipetool/create_kmod.py         |  2 ++
 scripts/lib/recipetool/create_npm.py          |  3 ++
 scripts/lib/recipetool/setvar.py              |  2 ++
 scripts/lib/resulttool/log.py                 |  4 +++
 scripts/lib/resulttool/manualexecution.py     |  4 +++
 scripts/lib/resulttool/merge.py               |  2 ++
 scripts/lib/resulttool/regression.py          |  6 ++++
 scripts/lib/resulttool/report.py              |  3 +-
 scripts/lib/resulttool/resultutils.py         | 16 +++++++++
 scripts/lib/resulttool/store.py               |  1 +
 scripts/lib/scriptpath.py                     |  2 ++
 scripts/lib/scriptutils.py                    |  9 +++++
 scripts/lib/wic/__init__.py                   |  1 +
 scripts/lib/wic/engine.py                     |  8 +++++
 scripts/lib/wic/filemap.py                    |  9 +++++
 scripts/lib/wic/help.py                       |  1 +
 scripts/lib/wic/ksparser.py                   | 10 +++++-
 scripts/lib/wic/misc.py                       |  9 +++++
 scripts/lib/wic/partition.py                  |  1 +
 scripts/lib/wic/pluginbase.py                 |  4 +++
 scripts/lib/wic/plugins/imager/direct.py      |  3 ++
 .../wic/plugins/source/bootimg-biosplusefi.py |  1 +
 scripts/lib/wic/plugins/source/bootimg-efi.py |  2 +-
 .../wic/plugins/source/bootimg-partition.py   |  3 +-
 .../lib/wic/plugins/source/bootimg-pcbios.py  |  1 +
 scripts/lib/wic/plugins/source/empty.py       |  1 +
 .../wic/plugins/source/isoimage-isohybrid.py  |  1 +
 scripts/lib/wic/plugins/source/rawcopy.py     |  1 +
 scripts/lib/wic/plugins/source/rootfs.py      |  1 +
 scripts/oe-build-perf-report                  |  8 ++---
 scripts/oe-build-perf-test                    |  1 +
 scripts/oe-depends-dot                        |  2 ++
 scripts/oe-git-archive                        |  3 ++
 scripts/oe-pkgdata-browser                    | 10 ++++++
 scripts/oe-pkgdata-util                       | 16 +++++++--
 scripts/oe-publish-sdk                        |  3 ++
 scripts/oe-selftest                           |  3 +-
 scripts/oe-test                               |  2 ++
 scripts/oe-trim-schemas                       |  3 ++
 scripts/oepydevshell-internal.py              |  4 +++
 .../pybootchartgui/pybootchartgui/batch.py    |  1 +
 scripts/pybootchartgui/pybootchartgui/draw.py | 27 ++++++++++++++
 scripts/pybootchartgui/pybootchartgui/gui.py  |  3 ++
 .../pybootchartgui/pybootchartgui/main.py.in  |  6 ++++
 .../pybootchartgui/pybootchartgui/parsing.py  | 28 ++++++++++++---
 .../pybootchartgui/process_tree.py            |  1 +
 .../pybootchartgui/pybootchartgui/samples.py  | 10 ++++++
 .../pybootchartgui/tests/parser_test.py       |  4 +++
 .../pybootchartgui/tests/process_tree_test.py |  2 ++
 scripts/pythondeps                            |  1 +
 scripts/recipetool                            |  2 ++
 scripts/relocate_sdk.py                       |  5 +++
 scripts/resulttool                            |  2 ++
 scripts/runqemu                               | 10 +++++-
 scripts/send-error-report                     |  7 ++--
 scripts/sysroot-relativelinks.py              |  2 ++
 scripts/task-time                             |  7 ++++
 scripts/test-remote-image                     | 10 ++++--
 scripts/tiny/dirsize.py                       |  1 +
 scripts/tiny/ksize.py                         |  1 +
 scripts/tiny/ksum.py                          | 10 ++++++
 scripts/verify-bashisms                       |  6 +++-
 scripts/wic                                   | 16 +++++++++
 scripts/yocto-check-layer                     |  4 +++
 340 files changed, 1367 insertions(+), 121 deletions(-)

diff --git a/meta-selftest/lib/devtool/bbpath.py b/meta-selftest/lib/devtool/bbpath.py
index 973ed779af..40be57a69e 100644
--- a/meta-selftest/lib/devtool/bbpath.py
+++ b/meta-selftest/lib/devtool/bbpath.py
@@ -3,27 +3,34 @@ import argparse
 already_loaded = False
 kept_context = None
 
+
 def plugin_name(filename):
     return os.path.splitext(os.path.basename(filename))[0]
 
+
 def plugin_init(plugins):
     global already_loaded
     already_loaded = plugin_name(__file__) in (plugin_name(p.__name__) for p in plugins)
 
+
 def print_name(args, config, basepath, workspace):
     print(__file__)
 
+
 def print_bbdir(args, config, basepath, workspace):
     print(__file__.replace('/lib/devtool/bbpath.py', ''))
 
+
 def print_registered(args, config, basepath, workspace):
     global kept_context
     print(kept_context.loaded)
 
+
 def multiloaded(args, config, basepath, workspace):
     global already_loaded
     print("yes" if already_loaded else "no")
 
+
 def register_commands(subparsers, context):
     global kept_context
     kept_context = context
diff --git a/meta-selftest/lib/devtool/test.py b/meta-selftest/lib/devtool/test.py
index 31190f58e7..eac0d472c1 100644
--- a/meta-selftest/lib/devtool/test.py
+++ b/meta-selftest/lib/devtool/test.py
@@ -1,9 +1,11 @@
 import argparse
 
+
 def selftest_reverse(args, config, basepath, workspace):
     """Reverse the value passed to verify the plugin is executing."""
     print(args.value[::-1])
 
+
 def register_commands(subparsers, context):
     parser_build = subparsers.add_parser('selftest-reverse', help='Reverse value (for selftest)',
                                          formatter_class=argparse.ArgumentDefaultsHelpFormatter)
diff --git a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
index fcd6ae313c..6507f401b1 100644
--- a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
+++ b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
@@ -3,6 +3,7 @@ from oeqa.runtime.cases.dnf import DnfTest
 from oeqa.utils.httpserver import HTTPService
 from oeqa.core.decorator.data import skipIfDataVar
 
+
 class DnfSelftest(DnfTest):
 
     @classmethod
diff --git a/meta-selftest/lib/oeqa/runtime/cases/selftest.py b/meta-selftest/lib/oeqa/runtime/cases/selftest.py
index 19de740623..a61ebfc6c5 100644
--- a/meta-selftest/lib/oeqa/runtime/cases/selftest.py
+++ b/meta-selftest/lib/oeqa/runtime/cases/selftest.py
@@ -1,6 +1,7 @@
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 
+
 class Selftest(OERuntimeTestCase):
 
     @OETestDepends(['ssh.SSHTest.test_ssh'])
diff --git a/meta-selftest/lib/oeqa/runtime/cases/virgl.py b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
index e3b6fe1d80..346e63cce3 100644
--- a/meta-selftest/lib/oeqa/runtime/cases/virgl.py
+++ b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
@@ -3,6 +3,7 @@ from oeqa.core.decorator.depends import OETestDepends
 import subprocess
 import oe.lsb
 
+
 class VirglTest(OERuntimeTestCase):
 
     @OETestDepends(['ssh.SSHTest.test_ssh'])
diff --git a/meta-selftest/lib/recipetool/bbpath.py b/meta-selftest/lib/recipetool/bbpath.py
index d0df800c3d..ae129c62a8 100644
--- a/meta-selftest/lib/recipetool/bbpath.py
+++ b/meta-selftest/lib/recipetool/bbpath.py
@@ -3,28 +3,35 @@ import argparse
 already_loaded = False
 register_count = 0
 
+
 def plugin_name(filename):
     return os.path.splitext(os.path.basename(filename))[0]
 
+
 def plugin_init(plugins):
     global already_loaded
     already_loaded = plugin_name(__file__) in (plugin_name(p.__name__) for p in plugins)
 
+
 def print_name(opts):
     print(__file__)
 
+
 def print_bbdir(opts):
     print(__file__.replace('/lib/recipetool/bbpath.py', ''))
 
+
 def print_registered(opts):
     #global kept_context
     #print(kept_context.loaded)
     print("1")
 
+
 def multiloaded(opts):
     global already_loaded
     print("yes" if already_loaded else "no")
 
+
 def register_commands(subparsers):
     global register_count
     register_count += 1
diff --git a/meta/files/ext-sdk-prepare.py b/meta/files/ext-sdk-prepare.py
index d191e5e19c..2b4a43ead9 100644
--- a/meta/files/ext-sdk-prepare.py
+++ b/meta/files/ext-sdk-prepare.py
@@ -7,9 +7,11 @@ import os
 import subprocess
 import signal
 
+
 def reenable_sigint():
     signal.signal(signal.SIGINT, signal.SIG_DFL)
 
+
 def run_command_interruptible(cmd):
     """
     Run a command with output displayed on the console, but ensure any Ctrl+C is
@@ -22,6 +24,7 @@ def run_command_interruptible(cmd):
         signal.signal(signal.SIGINT, signal.SIG_DFL)
     return ret
 
+
 def get_last_consolelog():
     '''Return the most recent console log file'''
     logdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'tmp', 'log', 'cooker')
@@ -35,6 +38,7 @@ def get_last_consolelog():
                 return os.path.join(logdir, logfiles[-1])
     return None
 
+
 def main():
     if len(sys.argv) < 2:
         print('Please specify output log file')
@@ -81,6 +85,7 @@ def main():
             print('ERROR: SDK preparation failed: error log written to %s' % logfile)
             return ret
 
+
 if __name__ == "__main__":
     try:
         ret = main()
diff --git a/meta/lib/bblayers/create.py b/meta/lib/bblayers/create.py
index 06e1f6d342..f5af56f215 100644
--- a/meta/lib/bblayers/create.py
+++ b/meta/lib/bblayers/create.py
@@ -13,15 +13,18 @@ from bblayers.common import LayerPlugin
 
 logger = logging.getLogger('bitbake-layers')
 
+
 def plugin_init(plugins):
     return CreatePlugin()
 
+
 def read_template(template, template_dir='templates'):
     lines = str()
     with open(os.path.join(os.path.dirname(__file__), template_dir, template)) as fd:
         lines = ''.join(fd.readlines())
     return lines
 
+
 class CreatePlugin(LayerPlugin):
     def do_create_layer(self, args):
         """Create a basic layer"""
diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
index 27bff9dda6..b10712886e 100644
--- a/meta/lib/buildstats.py
+++ b/meta/lib/buildstats.py
@@ -9,6 +9,7 @@ import time
 import re
 import bb.event
 
+
 class SystemStats:
     def __init__(self, d):
         bn = d.getVar('BUILDNAME')
@@ -103,7 +104,6 @@ class SystemStats:
         self.diskstats_data = diskdata
         return reduced
 
-
     def _reduce_nop(self, time, data):
         return (time, data)
 
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 44b02c1ae0..e74de876e0 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -41,6 +41,7 @@ colours = {
     'colour_remove': '',
 }
 
+
 def init_colours(use_colours):
     global colours
     if use_colours:
@@ -56,6 +57,7 @@ def init_colours(use_colours):
             'colour_remove': '',
         }
 
+
 class ChangeRecord:
     def __init__(self, path, fieldname, oldvalue, newvalue, monitored):
         self.path = path
@@ -206,6 +208,7 @@ class ChangeRecord:
 
         return '%s%s' % (prefix, out) if out else ''
 
+
 class FileChange:
     changetype_add = 'A'
     changetype_remove = 'R'
@@ -257,6 +260,7 @@ class FileChange:
         else:
             return '%s changed (unknown)' % self.path
 
+
 def blob_to_dict(blob):
     alines = [line for line in blob.data_stream.read().decode('utf-8').splitlines()]
     adict = {}
@@ -283,8 +287,10 @@ def file_list_to_dict(lines):
             adict[path] = splitv[0:3]
     return adict
 
+
 numeric_removal = str.maketrans('0123456789', 'XXXXXXXXXX')
 
+
 def compare_file_lists(alines, blines, compare_ownership=True):
     adict = file_list_to_dict(alines)
     bdict = file_list_to_dict(blines)
@@ -523,6 +529,7 @@ def compare_siglists(a_blob, b_blob, taskdiff=False):
     blines = b_blob.data_stream.read().decode('utf-8').splitlines()
     keys = []
     pnmap = {}
+
     def readsigs(lines):
         sigs = {}
         for line in lines:
diff --git a/meta/lib/oe/cachedpath.py b/meta/lib/oe/cachedpath.py
index 607421e29d..a94b03f6d2 100644
--- a/meta/lib/oe/cachedpath.py
+++ b/meta/lib/oe/cachedpath.py
@@ -10,6 +10,7 @@ import os
 import errno
 import stat as statmod
 
+
 class CachedPath(object):
     def __init__(self):
         self.statcache = {}
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py
index d5f252c63e..d7dea36a1b 100644
--- a/meta/lib/oe/classextend.py
+++ b/meta/lib/oe/classextend.py
@@ -4,15 +4,18 @@
 
 import collections
 
+
 def get_packages(d):
     pkgs = d.getVar("PACKAGES_NONML")
     extcls = d.getVar("EXTENDERCLASS")
     return extcls.rename_packages_internal(pkgs)
 
+
 def get_depends(varprefix, d):
     extcls = d.getVar("EXTENDERCLASS")
     return extcls.map_depends_variable(varprefix + "_NONML")
 
+
 class ClassExtender(object):
     def __init__(self, extname, d):
         self.extname = extname
@@ -144,6 +147,7 @@ class ClassExtender(object):
             for subs in variables:
                 self.d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1]))
 
+
 class NativesdkClassExtender(ClassExtender):
     def map_depends(self, dep):
         if dep.startswith(self.extname):
diff --git a/meta/lib/oe/classutils.py b/meta/lib/oe/classutils.py
index 08bb66b365..4169baaef3 100644
--- a/meta/lib/oe/classutils.py
+++ b/meta/lib/oe/classutils.py
@@ -2,12 +2,14 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
+
 class ClassRegistryMeta(type):
     """Give each ClassRegistry their own registry"""
     def __init__(cls, name, bases, attrs):
         cls.registry = {}
         type.__init__(cls, name, bases, attrs)
 
+
 class ClassRegistry(type, metaclass=ClassRegistryMeta):
     """Maintain a registry of classes, indexed by name.
 
@@ -22,6 +24,7 @@ Subclasses of ClassRegistry may define an 'implemented' property to exert
 control over whether the class will be added to the registry (e.g. to keep
 abstract base classes out of the registry)."""
     priority = 0
+
     def __init__(cls, name, bases, attrs):
         super(ClassRegistry, cls).__init__(name, bases, attrs)
         try:
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index 5bd087060c..790dcefc5e 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -13,6 +13,7 @@
 import stat
 import shutil
 
+
 def _smart_copy(src, dest):
     import subprocess
     # smart_copy will choose the correct function depending on whether the
@@ -27,6 +28,7 @@ def _smart_copy(src, dest):
         shutil.copyfile(src, dest)
         shutil.copymode(src, dest)
 
+
 class BuildSystem(object):
     def __init__(self, context, d):
         self.d = d
@@ -169,12 +171,14 @@ class BuildSystem(object):
 
         return copied_corebase, layers_copied
 
+
 def generate_locked_sigs(sigfile, d):
     bb.utils.mkdirhier(os.path.dirname(sigfile))
     depd = d.getVar('BB_TASKDEPDATA', False)
     tasks = ['%s:%s' % (v[2], v[1]) for v in depd.values()]
     bb.parse.siggen.dump_lockedsigs(sigfile, tasks)
 
+
 def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, onlynative, pruned_output):
     with open(lockedsigs, 'r') as infile:
         bb.utils.mkdirhier(os.path.dirname(pruned_output))
@@ -197,6 +201,7 @@ def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, onlynative, p
                     invalue = True
                     f.write(line)
 
+
 def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output=None):
     merged = {}
     arch_order = []
@@ -252,6 +257,7 @@ def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_outpu
     if merged_output:
         write_sigs_file(merged_output, arch_order, merged)
 
+
 def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring="", filterfile=None):
     import shutil
     bb.note('Generating sstate-cache...')
@@ -273,6 +279,7 @@ def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cac
                         bb.utils.mkdirhier(os.path.dirname(dest))
                         shutil.move(src, dest)
 
+
 def check_sstate_task_list(d, targets, filteroutfile, cmdprefix='', cwd=None, logfile=None):
     import subprocess
 
diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py
index cb4c86cf29..efeae3db48 100644
--- a/meta/lib/oe/cve_check.py
+++ b/meta/lib/oe/cve_check.py
@@ -7,6 +7,7 @@ _Version = collections.namedtuple(
     "_Version", ["release", "patch_l", "pre_l", "pre_v"]
 )
 
+
 @functools.total_ordering
 class Version():
 
@@ -50,6 +51,7 @@ class Version():
             return NotImplemented
         return self._key > other._key
 
+
 def _cmpkey(release, patch_l, pre_l, pre_v):
     # remove leading 0
     _release = tuple(
diff --git a/meta/lib/oe/data.py b/meta/lib/oe/data.py
index a340ce3b1b..995f7166d6 100644
--- a/meta/lib/oe/data.py
+++ b/meta/lib/oe/data.py
@@ -5,6 +5,7 @@
 import json
 import oe.maketype
 
+
 def typed_value(key, d):
     """Construct a value for the specified metadata variable, using its flags
     to determine the type and parameters for construction."""
@@ -21,6 +22,7 @@ def typed_value(key, d):
     except (TypeError, ValueError) as exc:
         bb.msg.fatal("Data", "%s: %s" % (key, str(exc)))
 
+
 def export2json(d, json_file, expand=True, searchString="", replaceString=""):
     data2export = {}
     keys2export = []
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 213c9e66e1..24b875d616 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -2,6 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
+
 def create_socket(url, d):
     import urllib
     from bb.utils import export_proxies
@@ -9,6 +10,7 @@ def create_socket(url, d):
     export_proxies(d)
     return urllib.request.urlopen(url)
 
+
 def get_links_from_url(url, d):
     "Return all the href links found on the web location"
 
@@ -20,6 +22,7 @@ def get_links_from_url(url, d):
         hyperlinks.append(line['href'].strip('/'))
     return hyperlinks
 
+
 def find_latest_numeric_release(url, d):
     "Find the latest listed numeric release on the given url"
     max = 0
@@ -35,10 +38,12 @@ def find_latest_numeric_release(url, d):
             maxstr = link
     return maxstr
 
+
 def is_src_rpm(name):
     "Check if the link is pointing to a src.rpm file"
     return name.endswith(".src.rpm")
 
+
 def package_name_from_srpm(srpm):
     "Strip out the package name from the src.rpm filename"
 
@@ -47,6 +52,7 @@ def package_name_from_srpm(srpm):
     (name, version, release) = srpm.replace(".src.rpm", "").rsplit("-", 2)
     return name
 
+
 def get_source_package_list_from_url(url, section, d):
     "Return a sectioned list of package names from a URL list"
 
@@ -60,6 +66,7 @@ def get_source_package_list_from_url(url, section, d):
        new_pkgs.add(pkgs + ":" + section)
     return new_pkgs
 
+
 def get_source_package_list_from_url_by_letter(url, section, d):
     import string
     from urllib.error import HTTPError
@@ -73,6 +80,7 @@ def get_source_package_list_from_url_by_letter(url, section, d):
                 raise
     return packages
 
+
 def get_latest_released_fedora_source_package_list(d):
     "Returns list of all the name os packages in the latest fedora distro"
     latest = find_latest_numeric_release("http://archive.fedoraproject.org/pub/fedora/linux/releases/", d)
@@ -80,6 +88,7 @@ def get_latest_released_fedora_source_package_list(d):
     package_names |= get_source_package_list_from_url_by_letter("http://archive.fedoraproject.org/pub/fedora/linux/updates/%s/SRPMS/" % latest, "updates", d)
     return latest, package_names
 
+
 def get_latest_released_opensuse_source_package_list(d):
     "Returns list of all the name os packages in the latest opensuse distro"
     latest = find_latest_numeric_release("http://download.opensuse.org/source/distribution/leap", d)
@@ -88,11 +97,13 @@ def get_latest_released_opensuse_source_package_list(d):
     package_names |= get_source_package_list_from_url("http://download.opensuse.org/update/leap/%s/oss/src/" % latest, "updates", d)
     return latest, package_names
 
+
 def get_latest_released_clear_source_package_list(d):
     latest = find_latest_numeric_release("https://download.clearlinux.org/releases/", d)
     package_names = get_source_package_list_from_url("https://download.clearlinux.org/releases/%s/clear/source/SRPMS/" % latest, "main", d)
     return latest, package_names
 
+
 def find_latest_debian_release(url, d):
     "Find the latest listed debian release on the given url"
 
@@ -105,6 +116,7 @@ def find_latest_debian_release(url, d):
     except:
         return "_NotFound_"
 
+
 def get_debian_style_source_package_list(url, section, d):
     "Return the list of package-names stored in the debian style Sources.gz file"
     import gzip
@@ -116,6 +128,7 @@ def get_debian_style_source_package_list(url, section, d):
             package_names.add(pkg + ":" + section)
     return package_names
 
+
 def get_latest_released_debian_source_package_list(d):
     "Returns list of all the name of packages in the latest debian distro"
     latest = find_latest_debian_release("http://ftp.debian.org/debian/dists/", d)
@@ -125,6 +138,7 @@ def get_latest_released_debian_source_package_list(d):
     package_names |= get_debian_style_source_package_list(url, "updates", d)
     return latest, package_names
 
+
 def find_latest_ubuntu_release(url, d):
     """
     Find the latest listed Ubuntu release on the given ubuntu/dists/ URL.
@@ -139,6 +153,7 @@ def find_latest_ubuntu_release(url, d):
             return distro
     return "_NotFound_"
 
+
 def get_latest_released_ubuntu_source_package_list(d):
     "Returns list of all the name os packages in the latest ubuntu distro"
     latest = find_latest_ubuntu_release("http://archive.ubuntu.com/ubuntu/dists/", d)
@@ -148,6 +163,7 @@ def get_latest_released_ubuntu_source_package_list(d):
     package_names |= get_debian_style_source_package_list(url, "updates", d)
     return latest, package_names
 
+
 def create_distro_packages_list(distro_check_dir, d):
     import shutil
 
@@ -177,6 +193,7 @@ def create_distro_packages_list(distro_check_dir, d):
             for pkg in sorted(package_list):
                 f.write(pkg + "\n")
 
+
 def update_distro_data(distro_check_dir, datetime, d):
     """
     If distro packages list data is old then rebuild it.
@@ -190,7 +207,6 @@ def update_distro_data(distro_check_dir, datetime, d):
         except OSError:
             raise Exception('Unable to create directory %s' % (distro_check_dir))
 
-
     datetime_file = os.path.join(distro_check_dir, "build_datetime")
     saved_datetime = "_invalid_"
     import fcntl
@@ -214,6 +230,7 @@ def update_distro_data(distro_check_dir, datetime, d):
         fcntl.lockf(f, fcntl.LOCK_UN)
         f.close()
 
+
 def compare_in_distro_packages_list(distro_check_dir, d):
     if not os.path.isdir(distro_check_dir):
         raise Exception("compare_in_distro_packages_list: invalid distro_check_dir passed")
@@ -278,6 +295,7 @@ def compare_in_distro_packages_list(distro_check_dir, d):
     bb.note("Matching: %s" % matching_distros)
     return matching_distros
 
+
 def create_log_file(d, logname):
     logpath = d.getVar('LOG_DIR')
     bb.utils.mkdirhier(logpath)
diff --git a/meta/lib/oe/elf.py b/meta/lib/oe/elf.py
index b307e4a651..5e8be92592 100644
--- a/meta/lib/oe/elf.py
+++ b/meta/lib/oe/elf.py
@@ -2,6 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
+
 def machine_dict(d):
 #           TARGET_OS  TARGET_ARCH   MACHINE, OSABI, ABIVERSION, Little Endian, 32bit?
     machdata = {
diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index 805cedd963..9cd7968da1 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -9,8 +9,10 @@ import bb
 import subprocess
 import shlex
 
+
 class LocalSigner(object):
     """Class for handling local (on the build host) signing"""
+
     def __init__(self, d):
         self.gpg_bin = d.getVar('GPG_BIN') or \
                   bb.utils.which(os.getenv('PATH'), 'gpg')
@@ -25,7 +27,6 @@ class LocalSigner(object):
         self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmsign")
         self.gpg_version = self.get_gpg_version()
 
-
     def export_pubkey(self, output_file, keyid, armor=True):
         """Export GPG public key to a file"""
         cmd = self.gpg_cmd + ["--no-permission-warning", "--batch", "--yes", "--export", "-o", output_file]
@@ -98,7 +99,6 @@ class LocalSigner(object):
             bb.error("OS error (%s): %s" % (e.errno, e.strerror))
             raise Exception("Failed to sign '%s" % input_file)
 
-
     def get_gpg_version(self):
         """Return the gpg version as a tuple of ints"""
         try:
@@ -108,7 +108,6 @@ class LocalSigner(object):
         except subprocess.CalledProcessError as e:
             bb.fatal("Could not get gpg version: %s" % e)
 
-
     def verify(self, sig_file):
         """Verify signature"""
         cmd = self.gpg_cmd + ["--verify", "--no-permission-warning"]
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index 7aefeaaae0..98e65c32be 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -7,6 +7,7 @@ import ast
 import re
 from fnmatch import fnmatchcase as fnmatch
 
+
 def license_ok(license, dont_want_licenses):
     """ Return False if License exist in dont_want_licenses else True """
     for dwl in dont_want_licenses:
@@ -14,9 +15,11 @@ def license_ok(license, dont_want_licenses):
             return False
     return True
 
+
 class LicenseError(Exception):
     pass
 
+
 class LicenseSyntaxError(LicenseError):
     def __init__(self, licensestr, exc):
         self.licensestr = licensestr
@@ -26,6 +29,7 @@ class LicenseSyntaxError(LicenseError):
     def __str__(self):
         return "error in '%s': %s" % (self.licensestr, self.exc)
 
+
 class InvalidLicense(LicenseError):
     def __init__(self, license):
         self.license = license
@@ -34,12 +38,15 @@ class InvalidLicense(LicenseError):
     def __str__(self):
         return "invalid characters in license '%s'" % self.license
 
+
 license_operator_chars = '&|() '
 license_operator = re.compile(r'([' + license_operator_chars + '])')
 license_pattern = re.compile(r'[a-zA-Z0-9.+_\-]+$')
 
+
 class LicenseVisitor(ast.NodeVisitor):
     """Get elements based on OpenEmbedded license strings"""
+
     def get_elements(self, licensestr):
         new_elements = []
         elements = list([x for x in license_operator.split(licensestr) if x.strip()])
@@ -56,16 +63,20 @@ class LicenseVisitor(ast.NodeVisitor):
 
     """Syntax tree visitor which can accept elements previously generated with
     OpenEmbedded license string"""
+
     def visit_elements(self, elements):
         self.visit(ast.parse(' '.join(elements)))
 
     """Syntax tree visitor which can accept OpenEmbedded license strings"""
+
     def visit_string(self, licensestr):
         self.visit_elements(self.get_elements(licensestr))
 
+
 class FlattenVisitor(LicenseVisitor):
     """Flatten a license tree (parsed from a string) by selecting one of each
     set of OR options, in the way the user specifies"""
+
     def __init__(self, choose_licenses):
         self.choose_licenses = choose_licenses
         self.licenses = []
@@ -87,6 +98,7 @@ class FlattenVisitor(LicenseVisitor):
         else:
             self.generic_visit(node)
 
+
 def flattened_licenses(licensestr, choose_licenses):
     """Given a license string and choose_licenses function, return a flat list of licenses"""
     flatten = FlattenVisitor(choose_licenses)
@@ -96,6 +108,7 @@ def flattened_licenses(licensestr, choose_licenses):
         raise LicenseSyntaxError(licensestr, exc)
     return flatten.licenses
 
+
 def is_included(licensestr, whitelist=None, blacklist=None):
     """Given a license string and whitelist and blacklist, determine if the
     license string matches the whitelist and does not match the blacklist.
@@ -142,9 +155,11 @@ def is_included(licensestr, whitelist=None, blacklist=None):
     else:
         return True, included
 
+
 class ManifestVisitor(LicenseVisitor):
     """Walk license tree (parsed from a string) removing the incompatible
     licenses specified"""
+
     def __init__(self, dont_want_licenses, canonical_license, d):
         self._dont_want_licenses = dont_want_licenses
         self._canonical_license = canonical_license
@@ -198,6 +213,7 @@ class ManifestVisitor(LicenseVisitor):
 
         self.generic_visit(node)
 
+
 def manifest_licenses(licensestr, dont_want_licenses, canonical_license, d):
     """Given a license string and dont_want_licenses list,
        return license string filtered and a list of licenses"""
@@ -219,14 +235,17 @@ def manifest_licenses(licensestr, dont_want_licenses, canonical_license, d):
 
     return (manifest.licensestr, manifest.licenses)
 
+
 class ListVisitor(LicenseVisitor):
     """Record all different licenses found in the license string"""
+
     def __init__(self):
         self.licenses = set()
 
     def visit_Str(self, node):
         self.licenses.add(node.s)
 
+
 def list_licenses(licensestr):
     """Simply get a list of all licenses mentioned in a license string.
        Binary operators are not applied or taken into account in any way"""
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index fa540b48b3..f5ccddee3d 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -2,6 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
+
 def get_os_release():
     """Get all key-value pairs from /etc/os-release as a dict"""
     from collections import OrderedDict
@@ -17,6 +18,7 @@ def get_os_release():
                 data[key.strip()] = val.strip('"')
     return data
 
+
 def release_dict_osr():
     """ Populate a dict with pertinent values from /etc/os-release """
     data = {}
@@ -28,6 +30,7 @@ def release_dict_osr():
 
     return data
 
+
 def release_dict_lsb():
     """ Return the output of lsb_release -ir as a dictionary """
     from subprocess import PIPE
@@ -57,6 +60,7 @@ def release_dict_lsb():
 
     return data
 
+
 def release_dict_file():
     """ Try to gather release information manually when other methods fail """
     data = {}
@@ -89,6 +93,7 @@ def release_dict_file():
         return {}
     return data
 
+
 def distro_identifier(adjust_hook=None):
     """Return a distro identifier string based upon lsb_release -ri,
        with optional adjustment via a hook"""
diff --git a/meta/lib/oe/maketype.py b/meta/lib/oe/maketype.py
index d929c8b3e5..66d1cf6cce 100644
--- a/meta/lib/oe/maketype.py
+++ b/meta/lib/oe/maketype.py
@@ -19,9 +19,11 @@ except ImportError:
 
 available_types = {}
 
+
 class MissingFlag(TypeError):
     """A particular flag is required to construct the type, but has not been
     provided."""
+
     def __init__(self, flag, type):
         self.flag = flag
         self.type = type
@@ -30,6 +32,7 @@ class MissingFlag(TypeError):
     def __str__(self):
         return "Type '%s' requires flag '%s'" % (self.type, self.flag)
 
+
 def factory(var_type):
     """Return the factory for a specified type."""
     if var_type is None:
@@ -41,6 +44,7 @@ def factory(var_type):
         raise TypeError("Invalid type '%s':\n  Valid types: %s" %
                         (var_type, ', '.join(available_types)))
 
+
 def create(value, var_type, **flags):
     """Create an object of the specified type, given the specified flags and
     string value."""
@@ -55,6 +59,7 @@ def create(value, var_type, **flags):
 
     return obj(value, **objflags)
 
+
 def get_callable_args(obj):
     """Grab all but the first argument of the specified callable, returning
     the list, as well as a list of which of the arguments have default
@@ -76,6 +81,7 @@ def get_callable_args(obj):
         optional |= set(flaglist[-len(defaults):])
     return flaglist, optional
 
+
 def factory_setup(name, obj):
     """Prepare a factory for use."""
     args, optional = get_callable_args(obj)
@@ -89,6 +95,7 @@ def factory_setup(name, obj):
     if not hasattr(obj, 'name'):
         obj.name = name
 
+
 def register(name, factory):
     """Register a type, given its name and a factory callable.
 
diff --git a/meta/lib/oe/manifest.py b/meta/lib/oe/manifest.py
index 1a058dcd73..3f4224fed4 100644
--- a/meta/lib/oe/manifest.py
+++ b/meta/lib/oe/manifest.py
@@ -7,6 +7,7 @@ import os
 import re
 import bb
 
+
 class Manifest(object, metaclass=ABCMeta):
     """
     This is an abstract class. Do not instantiate this directly.
@@ -84,6 +85,7 @@ class Manifest(object, metaclass=ABCMeta):
     This creates a standard initial manifest for core-image-(minimal|sato|sato-sdk).
     This will be used for testing until the class is implemented properly!
     """
+
     def _create_dummy_initial(self):
         image_rootfs = self.d.getVar('IMAGE_ROOTFS')
         pkg_list = dict()
@@ -144,6 +146,7 @@ class Manifest(object, metaclass=ABCMeta):
     The following function parses an initial manifest and returns a dictionary
     object with the must install, attempt only, multilib and language packages.
     """
+
     def parse_initial_manifest(self):
         pkgs = dict()
 
@@ -175,6 +178,7 @@ class Manifest(object, metaclass=ABCMeta):
     This following function parses a full manifest and return a list
     object with packages.
     '''
+
     def parse_full_manifest(self):
         installed_pkgs = list()
         if not os.path.exists(self.full_manifest):
@@ -188,7 +192,6 @@ class Manifest(object, metaclass=ABCMeta):
         return installed_pkgs
 
 
-
 def create_manifest(d, final_manifest=False, manifest_dir=None,
                     manifest_type=Manifest.MANIFEST_TYPE_IMAGE):
     import importlib
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 9dd6aef641..0113f97b83 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -6,6 +6,7 @@ import stat
 import mmap
 import subprocess
 
+
 def runstrip(arg):
     # Function to strip a single file, called from split_and_strip_files below
     # A working 'file' (one which works on the target architecture)
@@ -51,11 +52,15 @@ def runstrip(arg):
         os.chmod(file, origmode)
 
 # Detect .ko module by searching for "vermagic=" string
+
+
 def is_kernel_module(path):
     with open(path) as f:
         return mmap.mmap(f.fileno(), 0, prot=mmap.PROT_READ).find(b"vermagic=") >= 0
 
 # Detect if .ko module is signed
+
+
 def is_kernel_module_signed(path):
     with open(path, "rb") as f:
         f.seek(-28, 2)
@@ -69,6 +74,8 @@ def is_kernel_module_signed(path):
 # 4 - executable
 # 8 - shared library
 # 16 - kernel module
+
+
 def is_elf(path):
     exec_type = 0
     result = subprocess.check_output(["file", "-b", path], stderr=subprocess.STDOUT).decode("utf-8")
@@ -86,6 +93,7 @@ def is_elf(path):
                 exec_type |= 16
     return (path, exec_type)
 
+
 def is_static_lib(path):
     if path.endswith('.a') and not os.path.islink(path):
         with open(path, 'rb') as fh:
@@ -96,6 +104,7 @@ def is_static_lib(path):
             return start == magic
     return False
 
+
 def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d, qa_already_stripped=False):
     """
     Strip executable code (like executables, shared libraries) _in_place_
@@ -189,6 +198,7 @@ def file_translate(file):
     ft = ft.replace("_", "@underscore@")
     return ft
 
+
 def filedeprunner(arg):
     import re
     import subprocess
diff --git a/meta/lib/oe/package_manager/__init__.py b/meta/lib/oe/package_manager/__init__.py
index 633c5c4bf2..9feae4b6c0 100644
--- a/meta/lib/oe/package_manager/__init__.py
+++ b/meta/lib/oe/package_manager/__init__.py
@@ -19,6 +19,8 @@ import hashlib
 import fnmatch
 
 # this can be used by all PM backends to create the index files in parallel
+
+
 def create_index(arg):
     index_cmd = arg
 
@@ -27,6 +29,7 @@ def create_index(arg):
     if result:
         bb.note(result)
 
+
 def opkg_query(cmd_output):
     """
     This method parse the output from the package managerand return
@@ -88,12 +91,14 @@ def opkg_query(cmd_output):
 
     return output
 
+
 def failed_postinsts_abort(pkgs, log_path):
     bb.fatal("""Postinstall scriptlets of %s have failed. If the intention is to defer them to first boot,
 then please place them into pkg_postinst_ontarget_${PN} ().
 Deferring to first boot via 'exit 1' is no longer supported.
 Details of the failure are in %s.""" % (pkgs, log_path))
 
+
 def generate_locale_archive(d, rootfs, target_arch, localedir):
     # Pretty sure we don't need this for locale archive generation but
     # keeping it to be safe...
@@ -140,6 +145,7 @@ def generate_locale_archive(d, rootfs, target_arch, localedir):
             cmd += ["--add-to-archive", path]
             subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT)
 
+
 class Indexer(object, metaclass=ABCMeta):
     def __init__(self, d, deploy_dir):
         self.d = d
@@ -149,6 +155,7 @@ class Indexer(object, metaclass=ABCMeta):
     def write_index(self):
         pass
 
+
 class PkgsList(object, metaclass=ABCMeta):
     def __init__(self, d, rootfs_dir):
         self.d = d
@@ -158,6 +165,7 @@ class PkgsList(object, metaclass=ABCMeta):
     def list_pkgs(self):
         pass
 
+
 class PackageManager(object, metaclass=ABCMeta):
     """
     This is an abstract class. Do not instantiate this directly.
@@ -212,7 +220,6 @@ class PackageManager(object, metaclass=ABCMeta):
                 # call the backend dependent handler
                 self._handle_intercept_failure(registered_pkgs)
 
-
     def run_intercepts(self, populate_sdk=None):
         intercepts_dir = self.intercepts_dir
 
@@ -451,6 +458,7 @@ class PackageManager(object, metaclass=ABCMeta):
             return res
         return _append(uris, base_paths)
 
+
 def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies):
     """
     Go through our do_package_write_X dependencies and hardlink the packages we depend
diff --git a/meta/lib/oe/package_manager/deb/__init__.py b/meta/lib/oe/package_manager/deb/__init__.py
index 457e936862..9e99074eab 100644
--- a/meta/lib/oe/package_manager/deb/__init__.py
+++ b/meta/lib/oe/package_manager/deb/__init__.py
@@ -6,6 +6,7 @@ import re
 import subprocess
 from oe.package_manager import *
 
+
 class DpkgIndexer(Indexer):
     def _create_configs(self):
         bb.utils.mkdirhier(self.apt_conf_dir)
@@ -79,6 +80,7 @@ class DpkgIndexer(Indexer):
         if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
             raise NotImplementedError('Package feed signing not implementd for dpkg')
 
+
 class PMPkgsList(PkgsList):
 
     def list_pkgs(self):
@@ -96,6 +98,7 @@ class PMPkgsList(PkgsList):
 
         return opkg_query(cmd_output)
 
+
 class OpkgDpkgPM(PackageManager):
     def __init__(self, d, target_rootfs):
         """
@@ -163,6 +166,7 @@ class OpkgDpkgPM(PackageManager):
     def _handle_intercept_failure(self, registered_pkgs):
         self.mark_packages("unpacked", registered_pkgs.split())
 
+
 class DpkgPM(OpkgDpkgPM):
     def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None, deb_repo_workdir="oe-rootfs-repo", filterbydependencies=True):
         super(DpkgPM, self).__init__(d, target_rootfs)
@@ -308,7 +312,6 @@ class DpkgPM(OpkgDpkgPM):
                     bb.utils.rename(os.path.join(root, file),
                               os.path.join(root, new_file))
 
-
     def remove(self, pkgs, with_dependencies=True):
         if not pkgs:
             return
@@ -348,7 +351,6 @@ class DpkgPM(OpkgDpkgPM):
         if feed_uris == "":
             return
 
-
         sources_conf = os.path.join("%s/etc/apt/sources.list"
                                     % self.target_rootfs)
         if not os.path.exists(os.path.dirname(sources_conf)):
diff --git a/meta/lib/oe/package_manager/deb/manifest.py b/meta/lib/oe/package_manager/deb/manifest.py
index d8eab24a06..23b24b0855 100644
--- a/meta/lib/oe/package_manager/deb/manifest.py
+++ b/meta/lib/oe/package_manager/deb/manifest.py
@@ -4,6 +4,7 @@
 
 from oe.manifest import Manifest
 
+
 class PkgManifest(Manifest):
     def create_initial(self):
         with open(self.initial_manifest, "w+") as manifest:
diff --git a/meta/lib/oe/package_manager/deb/rootfs.py b/meta/lib/oe/package_manager/deb/rootfs.py
index 56ed7e2359..8b293ea201 100644
--- a/meta/lib/oe/package_manager/deb/rootfs.py
+++ b/meta/lib/oe/package_manager/deb/rootfs.py
@@ -10,6 +10,7 @@ from oe.utils import execute_pre_post_process
 from oe.package_manager.deb.manifest import PkgManifest
 from oe.package_manager.deb import DpkgPM
 
+
 class DpkgOpkgRootfs(Rootfs):
     def __init__(self, d, progress_reporter=None, logcatcher=None):
         super(DpkgOpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
@@ -120,6 +121,7 @@ class DpkgOpkgRootfs(Rootfs):
 
             num += 1
 
+
 class PkgRootfs(DpkgOpkgRootfs):
     def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
         super(PkgRootfs, self).__init__(d, progress_reporter, logcatcher)
@@ -136,7 +138,6 @@ class PkgRootfs(DpkgOpkgRootfs):
                          d.getVar('PACKAGE_ARCHS'),
                          d.getVar('DPKG_ARCH'))
 
-
     def _create(self):
         pkgs_to_install = self.manifest.parse_initial_manifest()
         deb_pre_process_cmds = self.d.getVar('DEB_PREPROCESS_COMMANDS')
diff --git a/meta/lib/oe/package_manager/deb/sdk.py b/meta/lib/oe/package_manager/deb/sdk.py
index f4b0b6510a..cb5545e0ce 100644
--- a/meta/lib/oe/package_manager/deb/sdk.py
+++ b/meta/lib/oe/package_manager/deb/sdk.py
@@ -10,6 +10,7 @@ from oe.manifest import Manifest
 from oe.package_manager.deb import DpkgPM
 from oe.package_manager.deb.manifest import PkgManifest
 
+
 class PkgSdk(Sdk):
     def __init__(self, d, manifest_dir=None):
         super(PkgSdk, self).__init__(d, manifest_dir)
@@ -17,7 +18,6 @@ class PkgSdk(Sdk):
         self.target_conf_dir = os.path.join(self.d.getVar("APTCONF_TARGET"), "apt")
         self.host_conf_dir = os.path.join(self.d.getVar("APTCONF_TARGET"), "apt-sdk")
 
-
         self.target_manifest = PkgManifest(d, self.manifest_dir,
                                             Manifest.MANIFEST_TYPE_SDK_TARGET)
         self.host_manifest = PkgManifest(d, self.manifest_dir,
diff --git a/meta/lib/oe/package_manager/ipk/__init__.py b/meta/lib/oe/package_manager/ipk/__init__.py
index 504830cdec..0cea1b1942 100644
--- a/meta/lib/oe/package_manager/ipk/__init__.py
+++ b/meta/lib/oe/package_manager/ipk/__init__.py
@@ -7,6 +7,7 @@ import shutil
 import subprocess
 from oe.package_manager import *
 
+
 class OpkgIndexer(Indexer):
     def write_index(self):
         arch_vars = ["ALL_MULTILIB_PACKAGE_ARCHS",
@@ -59,6 +60,7 @@ class OpkgIndexer(Indexer):
                                    self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
                                    armor=is_ascii_sig)
 
+
 class PMPkgsList(PkgsList):
     def __init__(self, d, rootfs_dir):
         super(PMPkgsList, self).__init__(d, rootfs_dir)
@@ -87,7 +89,6 @@ class PMPkgsList(PkgsList):
         return opkg_query(cmd_output)
 
 
-
 class OpkgDpkgPM(PackageManager):
     def __init__(self, d, target_rootfs):
         """
@@ -155,6 +156,7 @@ class OpkgDpkgPM(PackageManager):
     def _handle_intercept_failure(self, registered_pkgs):
         self.mark_packages("unpacked", registered_pkgs.split())
 
+
 class OpkgPM(OpkgDpkgPM):
     def __init__(self, d, target_rootfs, config_file, archs, task_name='target', ipk_repo_workdir="oe-rootfs-repo", filterbydependencies=True, prepare_index=True):
         super(OpkgPM, self).__init__(d, target_rootfs)
@@ -265,7 +267,6 @@ class OpkgPM(OpkgDpkgPM):
                             cfg_file.write("option lists_dir    %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'lists'))
                             cfg_file.write("option status_file  %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status'))
 
-
     def _create_config(self):
         with open(self.config_file, "w+") as config_file:
             priority = 1
diff --git a/meta/lib/oe/package_manager/ipk/manifest.py b/meta/lib/oe/package_manager/ipk/manifest.py
index ee4b57bcb0..5700d8e2e1 100644
--- a/meta/lib/oe/package_manager/ipk/manifest.py
+++ b/meta/lib/oe/package_manager/ipk/manifest.py
@@ -4,10 +4,12 @@
 
 from oe.manifest import Manifest
 
+
 class PkgManifest(Manifest):
     """
     Returns a dictionary object with mip and mlp packages.
     """
+
     def _split_multilib(self, pkg_list):
         pkgs = dict()
 
diff --git a/meta/lib/oe/package_manager/ipk/rootfs.py b/meta/lib/oe/package_manager/ipk/rootfs.py
index 077c061c91..8033ee2020 100644
--- a/meta/lib/oe/package_manager/ipk/rootfs.py
+++ b/meta/lib/oe/package_manager/ipk/rootfs.py
@@ -11,6 +11,7 @@ from oe.utils import execute_pre_post_process
 from oe.package_manager.ipk.manifest import PkgManifest
 from oe.package_manager.ipk import OpkgPM
 
+
 class DpkgOpkgRootfs(Rootfs):
     def __init__(self, d, progress_reporter=None, logcatcher=None):
         super(DpkgOpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
@@ -121,6 +122,7 @@ class DpkgOpkgRootfs(Rootfs):
 
             num += 1
 
+
 class PkgRootfs(DpkgOpkgRootfs):
     def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
         super(PkgRootfs, self).__init__(d, progress_reporter, logcatcher)
@@ -173,6 +175,7 @@ class PkgRootfs(DpkgOpkgRootfs):
          creation and the file has been changed, so we need to
          prelink the other one and compare them.
     '''
+
     def _file_equal(self, key, f1, f2):
 
         # Both of them are not prelinked
@@ -198,6 +201,7 @@ class PkgRootfs(DpkgOpkgRootfs):
     See commit: "image.bbclass: Added variables for multilib support." by
     Lianhao Lu.
     """
+
     def _multilib_sanity_test(self, dirs):
 
         allow_replace = self.d.getVar("MULTILIBRE_ALLOW_REP")
@@ -259,6 +263,7 @@ class PkgRootfs(DpkgOpkgRootfs):
     unneeded pkgs by comparing the old full manifest in previous existing
     image and the new full manifest in the current image.
     '''
+
     def _remove_extra_packages(self, pkgs_initial_install):
         if self.inc_opkg_image_gen == "1":
             # Parse full manifest in previous existing image creation session
@@ -286,6 +291,7 @@ class PkgRootfs(DpkgOpkgRootfs):
     The conditions include any of 'PACKAGE_EXCLUDE, NO_RECOMMENDATIONS
     and BAD_RECOMMENDATIONS' has been changed.
     '''
+
     def _remove_old_rootfs(self):
         if self.inc_opkg_image_gen != "1":
             return True
diff --git a/meta/lib/oe/package_manager/ipk/sdk.py b/meta/lib/oe/package_manager/ipk/sdk.py
index e2ca415c8e..8c503e4efc 100644
--- a/meta/lib/oe/package_manager/ipk/sdk.py
+++ b/meta/lib/oe/package_manager/ipk/sdk.py
@@ -10,6 +10,7 @@ from oe.package_manager.ipk.manifest import PkgManifest
 from oe.manifest import Manifest
 from oe.package_manager.ipk import OpkgPM
 
+
 class PkgSdk(Sdk):
     def __init__(self, d, manifest_dir=None):
         super(PkgSdk, self).__init__(d, manifest_dir)
diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py
index 1a38055891..c28a0aa0ab 100644
--- a/meta/lib/oe/package_manager/rpm/__init__.py
+++ b/meta/lib/oe/package_manager/rpm/__init__.py
@@ -6,6 +6,7 @@ import shutil
 import subprocess
 from oe.package_manager import *
 
+
 class RpmIndexer(Indexer):
     def write_index(self):
         self.do_write_index(self.deploy_dir)
@@ -30,6 +31,7 @@ class RpmIndexer(Indexer):
                                self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
                                armor=is_ascii_sig)
 
+
 class RpmSubdirIndexer(RpmIndexer):
     def write_index(self):
         bb.note("Generating package index for %s" % (self.deploy_dir))
@@ -50,6 +52,7 @@ class PMPkgsList(PkgsList):
     def list_pkgs(self):
         return RpmPM(self.d, self.rootfs_dir, self.d.getVar('TARGET_VENDOR'), needfeed=False).list_installed()
 
+
 class RpmPM(PackageManager):
     def __init__(self,
                  d,
@@ -102,7 +105,6 @@ class RpmPM(PackageManager):
 
         open(oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), 'w').write("")
 
-
     def _configure_rpm(self):
         # We need to configure rpm to use our primary package architecture as the installation architecture,
         # and to make it compatible with other package architectures that we use.
@@ -180,7 +182,6 @@ class RpmPM(PackageManager):
         os.environ['INTERCEPT_DIR'] = self.intercepts_dir
         os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
 
-
     def install(self, pkgs, attempt_only=False):
         if len(pkgs) == 0:
             return
diff --git a/meta/lib/oe/package_manager/rpm/manifest.py b/meta/lib/oe/package_manager/rpm/manifest.py
index e6604b301f..6415c81210 100644
--- a/meta/lib/oe/package_manager/rpm/manifest.py
+++ b/meta/lib/oe/package_manager/rpm/manifest.py
@@ -4,10 +4,12 @@
 
 from oe.manifest import Manifest
 
+
 class PkgManifest(Manifest):
     """
     Returns a dictionary object with mip and mlp packages.
     """
+
     def _split_multilib(self, pkg_list):
         pkgs = dict()
 
diff --git a/meta/lib/oe/package_manager/rpm/rootfs.py b/meta/lib/oe/package_manager/rpm/rootfs.py
index 00d07cd9cc..470fec8718 100644
--- a/meta/lib/oe/package_manager/rpm/rootfs.py
+++ b/meta/lib/oe/package_manager/rpm/rootfs.py
@@ -8,6 +8,7 @@ from oe.utils import execute_pre_post_process
 from oe.package_manager.rpm.manifest import PkgManifest
 from oe.package_manager.rpm import RpmPM
 
+
 class PkgRootfs(Rootfs):
     def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
         super(PkgRootfs, self).__init__(d, progress_reporter, logcatcher)
@@ -36,6 +37,7 @@ class PkgRootfs(Rootfs):
     unneeded pkgs by comparing the new install solution manifest and the
     old installed manifest.
     '''
+
     def _create_incremental(self, pkgs_initial_install):
         if self.inc_rpm_image_gen == "1":
 
@@ -118,7 +120,6 @@ class PkgRootfs(Rootfs):
         if self.progress_reporter:
             self.progress_reporter.next_stage()
 
-
     @staticmethod
     def _depends_list():
         return ['DEPLOY_DIR_RPM', 'INC_RPM_IMAGE_GEN', 'RPM_PREPROCESS_COMMANDS',
diff --git a/meta/lib/oe/package_manager/rpm/sdk.py b/meta/lib/oe/package_manager/rpm/sdk.py
index c5f232431f..da226de092 100644
--- a/meta/lib/oe/package_manager/rpm/sdk.py
+++ b/meta/lib/oe/package_manager/rpm/sdk.py
@@ -9,6 +9,7 @@ from oe.manifest import Manifest
 from oe.package_manager.rpm.manifest import PkgManifest
 from oe.package_manager.rpm import RpmPM
 
+
 class PkgSdk(Sdk):
     def __init__(self, d, manifest_dir=None, rpm_workdir="oe-sdk-repo"):
         super(PkgSdk, self).__init__(d, manifest_dir)
diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py
index a82085a792..24c93b4f05 100644
--- a/meta/lib/oe/packagedata.py
+++ b/meta/lib/oe/packagedata.py
@@ -5,9 +5,11 @@
 import codecs
 import os
 
+
 def packaged(pkg, d):
     return os.access(get_subpkgedata_fn(pkg, d) + '.packaged', os.R_OK)
 
+
 def read_pkgdatafile(fn):
     pkgdata = {}
 
@@ -27,19 +29,24 @@ def read_pkgdatafile(fn):
 
     return pkgdata
 
+
 def get_subpkgedata_fn(pkg, d):
     return d.expand('${PKGDATA_DIR}/runtime/%s' % pkg)
 
+
 def has_subpkgdata(pkg, d):
     return os.access(get_subpkgedata_fn(pkg, d), os.R_OK)
 
+
 def read_subpkgdata(pkg, d):
     return read_pkgdatafile(get_subpkgedata_fn(pkg, d))
 
+
 def has_pkgdata(pn, d):
     fn = d.expand('${PKGDATA_DIR}/%s' % pn)
     return os.access(fn, os.R_OK)
 
+
 def read_pkgdata(pn, d):
     fn = d.expand('${PKGDATA_DIR}/%s' % pn)
     return read_pkgdatafile(fn)
@@ -47,6 +54,8 @@ def read_pkgdata(pn, d):
 #
 # Collapse FOO_pkg variables into FOO
 #
+
+
 def read_subpkgdata_dict(pkg, d):
     ret = {}
     subd = read_pkgdatafile(get_subpkgedata_fn(pkg, d))
@@ -57,6 +66,7 @@ def read_subpkgdata_dict(pkg, d):
         ret[newvar] = subd[var]
     return ret
 
+
 def _pkgmap(d):
     """Return a dictionary mapping package to recipe name."""
 
@@ -81,6 +91,7 @@ def _pkgmap(d):
 
     return pkgmap
 
+
 def pkgmap(d):
     """Return a dictionary mapping package to recipe name.
     Cache the mapping in the metadata"""
@@ -92,6 +103,7 @@ def pkgmap(d):
 
     return pkgmap_data
 
+
 def recipename(pkg, d):
     """Return the recipe name for the given binary package name."""
 
diff --git a/meta/lib/oe/packagegroup.py b/meta/lib/oe/packagegroup.py
index 8fcaecde82..5728fcbc85 100644
--- a/meta/lib/oe/packagegroup.py
+++ b/meta/lib/oe/packagegroup.py
@@ -4,27 +4,33 @@
 
 import itertools
 
+
 def is_optional(feature, d):
     return bool(d.getVarFlag("FEATURE_PACKAGES_%s" % feature, "optional"))
 
+
 def packages(features, d):
     for feature in features:
         packages = d.getVar("FEATURE_PACKAGES_%s" % feature)
         for pkg in (packages or "").split():
             yield pkg
 
+
 def required_packages(features, d):
     req = [feature for feature in features if not is_optional(feature, d)]
     return packages(req, d)
 
+
 def optional_packages(features, d):
     opt = [feature for feature in features if is_optional(feature, d)]
     return packages(opt, d)
 
+
 def active_packages(features, d):
     return itertools.chain(required_packages(features, d),
                            optional_packages(features, d))
 
+
 def active_recipes(features, d):
     import oe.packagedata
 
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 4cab28a215..2bf13ec34b 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -5,6 +5,7 @@
 import oe.path
 import oe.types
 
+
 class NotFoundError(bb.BBHandledException):
     def __init__(self, path):
         self.path = path
@@ -12,6 +13,7 @@ class NotFoundError(bb.BBHandledException):
     def __str__(self):
         return "Error: %s not found." % self.path
 
+
 class CmdError(bb.BBHandledException):
     def __init__(self, command, exitstatus, output):
         self.command = command
@@ -56,6 +58,7 @@ def runcmd(args, dir=None):
         if dir:
             os.chdir(olddir)
 
+
 class PatchError(Exception):
     def __init__(self, msg):
         self.msg = msg
@@ -63,6 +66,7 @@ class PatchError(Exception):
     def __str__(self):
         return "Patch Error: %s" % self.msg
 
+
 class PatchSet(object):
     defaults = {
         "strippath": 1
@@ -290,6 +294,7 @@ class PatchTree(PatchSet):
         """"""
         self.Pop(all=True)
 
+
 class GitApplyTree(PatchTree):
     patch_line_prefix = '%% original patch'
     ignore_commit_prefix = '%% ignore'
@@ -569,7 +574,6 @@ class QuiltTree(PatchSet):
     def _quiltpatchpath(self, file):
         return os.path.join(self.dir, "patches", os.path.basename(file))
 
-
     def __init__(self, dir, d):
         PatchSet.__init__(self, dir, d)
         self.initialized = False
@@ -632,7 +636,6 @@ class QuiltTree(PatchSet):
 
         self.patches.insert(self._current or 0, patch)
 
-
     def Push(self, force=False, all=False, run=True):
         # quilt push [-f]
 
@@ -690,6 +693,7 @@ class QuiltTree(PatchSet):
                 args.append(os.path.basename(self.patches[kwargs["patch"]]["quiltfile"]))
             self._runcmd(args)
 
+
 class Resolver(object):
     def __init__(self, patchset, terminal):
         raise NotImplementedError()
@@ -703,6 +707,7 @@ class Resolver(object):
     def Finalize(self):
         raise NotImplementedError()
 
+
 class NOOPResolver(Resolver):
     def __init__(self, patchset, terminal):
         self.patchset = patchset
@@ -721,6 +726,8 @@ class NOOPResolver(Resolver):
 # Patch resolver which relies on the user doing all the work involved in the
 # resolution, with the exception of refreshing the remote copy of the patch
 # files (the urls).
+
+
 class UserResolver(Resolver):
     def __init__(self, patchset, terminal):
         self.patchset = patchset
@@ -803,6 +810,7 @@ def patch_path(url, fetch, workdir, expand=True):
 
     return local
 
+
 def src_patches(d, all=False, expand=True):
     workdir = d.getVar('WORKDIR')
     fetch = bb.fetch2.Fetch([], d)
@@ -866,7 +874,6 @@ def should_apply(parm, d):
         if "mindate" in parm and parm["mindate"] > srcdate:
             return False, 'is predated'
 
-
     if "minrev" in parm:
         srcrev = d.getVar('SRCREV')
         if srcrev and srcrev < parm["minrev"]:
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index 101ee2d029..1ac9c2cfcf 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -8,10 +8,12 @@ import shutil
 import subprocess
 import os.path
 
+
 def join(*paths):
     """Like os.path.join but doesn't treat absolute RHS specially"""
     return os.path.normpath("/".join(paths))
 
+
 def relative(src, dest):
     """ Return a relative path from src to dest.
 
@@ -27,6 +29,7 @@ def relative(src, dest):
 
     return os.path.relpath(dest, src)
 
+
 def make_relative_symlink(path):
     """ Convert an absolute symlink to a relative one """
     if not os.path.islink(path):
@@ -54,6 +57,7 @@ def make_relative_symlink(path):
     os.remove(path)
     os.symlink(base, path)
 
+
 def replace_absolute_symlinks(basedir, d):
     """
     Walk basedir looking for absolute symlinks and replacing them with relative ones.
@@ -75,6 +79,7 @@ def replace_absolute_symlinks(basedir, d):
             os.remove(path)
             os.symlink(base, path)
 
+
 def format_display(path, metadata):
     """ Prepare a path for display to the user. """
     rel = relative(metadata.getVar("TOPDIR"), path)
@@ -83,6 +88,7 @@ def format_display(path, metadata):
     else:
         return rel
 
+
 def copytree(src, dst):
     # We could use something like shutil.copytree here but it turns out to
     # to be slow. It takes twice as long copying to an empty directory. 
@@ -93,6 +99,7 @@ def copytree(src, dst):
     cmd = "tar --xattrs --xattrs-include='*' -cf - -S -C %s -p . | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, dst)
     subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
 
+
 def copyhardlinktree(src, dst):
     """Make a tree of hard links when possible, otherwise copy."""
     bb.utils.mkdirhier(dst)
@@ -133,6 +140,7 @@ def copyhardlinktree(src, dst):
     else:
         copytree(src, dst)
 
+
 def copyhardlink(src, dst):
     """Make a hard link when possible, otherwise copy."""
 
@@ -141,6 +149,7 @@ def copyhardlink(src, dst):
     except OSError:
         shutil.copy(src, dst)
 
+
 def remove(path, recurse=True):
     """
     Equivalent to rm -f or rm -rf
@@ -159,6 +168,7 @@ def remove(path, recurse=True):
             elif exc.errno != errno.ENOENT:
                 raise
 
+
 def symlink(source, destination, force=False):
     """Create a symbolic link"""
     try:
@@ -169,6 +179,7 @@ def symlink(source, destination, force=False):
         if e.errno != errno.EEXIST or os.readlink(destination) != source:
             raise
 
+
 def find(dir, **walkoptions):
     """ Given a directory, recurses into that directory,
     returning all files as absolute paths. """
@@ -182,6 +193,7 @@ def find(dir, **walkoptions):
 def __is_path_below(file, root):
     return (file + os.path.sep).startswith(root)
 
+
 def __realpath_rel(start, rel_path, root, loop_cnt, assume_dir):
     """Calculates real path of symlink 'start' + 'rel_path' below
     'root'; no part of 'start' below 'root' must contain symlinks. """
@@ -206,6 +218,7 @@ def __realpath_rel(start, rel_path, root, loop_cnt, assume_dir):
 
     return start
 
+
 def __realpath(file, root, loop_cnt, assume_dir):
     while os.path.islink(file) and len(file) >= len(root):
         if loop_cnt == 0:
@@ -229,6 +242,7 @@ def __realpath(file, root, loop_cnt, assume_dir):
 
     return (file, is_dir)
 
+
 def realpath(file, root, use_physdir=True, loop_cnt=100, assume_dir=False):
     """ Returns the canonical path of 'file' with assuming a
     toplevel 'root' directory. When 'use_physdir' is set, all
@@ -265,6 +279,7 @@ def realpath(file, root, use_physdir=True, loop_cnt=100, assume_dir=False):
 
     return file
 
+
 def is_path_parent(possible_parent, *paths):
     """
     Return True if a path is the parent of another, False otherwise.
@@ -287,6 +302,7 @@ def is_path_parent(possible_parent, *paths):
             return False
     return True
 
+
 def which_wild(pathname, path=None, mode=os.F_OK, *, reverse=False, candidates=False):
     """Search a search path for pathname, supporting wildcards.
 
@@ -320,6 +336,7 @@ def which_wild(pathname, path=None, mode=os.F_OK, *, reverse=False, candidates=F
 
     return files
 
+
 def canonicalize(paths, sep=','):
     """Given a string with paths (separated by commas by default), expand
     each path using os.path.realpath() and return the resulting paths as a
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
index d71140980a..30808e362a 100644
--- a/meta/lib/oe/prservice.py
+++ b/meta/lib/oe/prservice.py
@@ -2,6 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
+
 def prserv_make_conn(d, check=False):
     import prserv.serv
     host_params = list([_f for _f in (d.getVar("PRSERV_HOST") or '').split(':') if _f])
@@ -17,6 +18,7 @@ def prserv_make_conn(d, check=False):
 
     return conn
 
+
 def prserv_dump_db(d):
     if not d.getVar('PRSERV_HOST'):
         bb.error("Not using network based PR service")
@@ -36,6 +38,7 @@ def prserv_dump_db(d):
     opt_col = ("1" == d.getVar('PRSERV_DUMPOPT_COL'))
     return conn.export(opt_version, opt_pkgarch, opt_checksum, opt_col)
 
+
 def prserv_import_db(d, filter_version=None, filter_pkgarch=None, filter_checksum=None):
     if not d.getVar('PRSERV_HOST'):
         bb.error("Not using network based PR service")
@@ -72,6 +75,7 @@ def prserv_import_db(d, filter_version=None, filter_pkgarch=None, filter_checksu
                imported.append((version, pkgarch, checksum, value))
     return imported
 
+
 def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
     import bb.utils
     #initilize the output file
@@ -115,6 +119,7 @@ def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
                     f.write("PRAUTO_%s_%s = \"%s\"\n" % (str(datainfo[idx[i]]['version']), str(datainfo[idx[i]]['pkgarch']), str(datainfo[idx[i]]['value'])))
     bb.utils.unlockfile(lf)
 
+
 def prserv_check_avail(d):
     host_params = list([_f for _f in (d.getVar("PRSERV_HOST") or '').split(':') if _f])
     try:
diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index c6aaa0af06..f2310c18be 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -6,9 +6,11 @@ import os
 import struct
 import mmap
 
+
 class NotELFFileError(Exception):
     pass
 
+
 class ELFFile:
     EI_NIDENT = 16
 
@@ -151,6 +153,7 @@ class ELFFile:
             bb.note("%s %s %s failed: %s" % (objdump, cmd, self.name, e))
             return ""
 
+
 def elf_machine_to_string(machine):
     """
     Return the name of a given ELF e_machine field or the hex value as a string
@@ -173,6 +176,7 @@ def elf_machine_to_string(machine):
     except:
         return "Unknown (%s)" % repr(machine)
 
+
 if __name__ == "__main__":
     import sys
 
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 6842f7387d..610500b6a0 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -232,6 +232,7 @@ def patch_recipe_lines(fromlines, values, trailing_newline=True):
             lines.extend(addlines)
 
     existingnames = []
+
     def patch_recipe_varfunc(varname, origvalue, op, newlines):
         if modifying:
             # Insert anything that should come before this variable
@@ -334,11 +335,13 @@ def localise_file_vars(fn, varfiles, varlist):
 
     return filevars
 
+
 def patch_recipe(d, fn, varvalues, patch=False, relpath='', redirect_output=None):
     """Modify a list of variable values in the specified recipe. Handles inc files if
     used by the recipe.
     """
     overrides = d.getVar('OVERRIDES').split(':')
+
     def override_applicable(hevent):
         op = hevent['op']
         if '[' in op:
@@ -389,7 +392,6 @@ def patch_recipe(d, fn, varvalues, patch=False, relpath='', redirect_output=None
         return None
 
 
-
 def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True, all_variants=False):
     """Copy (local) recipe files, including both files included via include/require,
     and files referred to in the SRC_URI variable."""
@@ -400,6 +402,7 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True, all_variants=F
 
     uri_values = []
     localpaths = []
+
     def fetch_urls(rdata):
         # Collect the local paths from SRC_URI
         srcuri = rdata.getVar('SRC_URI') or ""
@@ -612,6 +615,7 @@ def get_bbfile_path(d, destdir, extrapathhint=None):
                 return pathoption
     return None
 
+
 def get_bbappend_path(d, destlayerdir, wildcardver=False):
     """Determine how a bbappend for a recipe should be named and located within another layer"""
 
@@ -942,6 +946,7 @@ def replace_dir_vars(path, d):
         path = path.replace(dirpath, '${%s}' % dirvars[dirpath])
     return path
 
+
 def get_recipe_pv_without_srcpv(pv, uri_type):
     """
     Get PV without SRCPV common in SCM's for now only
@@ -969,6 +974,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
 
     return (pv, pfx, sfx)
 
+
 def get_recipe_upstream_version(rd):
     """
         Get upstream version of recipe using bb.fetch2 methods with support for
@@ -1048,6 +1054,7 @@ def get_recipe_upstream_version(rd):
 
     return ru
 
+
 def _get_recipe_upgrade_status(data):
     uv = get_recipe_upstream_version(data)
 
@@ -1073,6 +1080,7 @@ def _get_recipe_upgrade_status(data):
 
     return (pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason)
 
+
 def get_recipe_upgrade_status(recipes=None):
     pkgs_list = []
     data_copy_list = []
diff --git a/meta/lib/oe/reproducible.py b/meta/lib/oe/reproducible.py
index 204b9bd734..fd9f9354fd 100644
--- a/meta/lib/oe/reproducible.py
+++ b/meta/lib/oe/reproducible.py
@@ -5,6 +5,7 @@ import os
 import subprocess
 import bb
 
+
 def get_source_date_epoch_from_known_files(d, sourcedir):
     source_date_epoch = None
     newest_file = None
@@ -21,6 +22,7 @@ def get_source_date_epoch_from_known_files(d, sourcedir):
         bb.debug(1, "SOURCE_DATE_EPOCH taken from: %s" % newest_file)
     return source_date_epoch
 
+
 def find_git_folder(d, sourcedir):
     # First guess: WORKDIR/git
     # This is the default git fetcher unpack path
@@ -46,6 +48,7 @@ def find_git_folder(d, sourcedir):
     bb.warn("Failed to find a git repository in WORKDIR: %s" % workdir)
     return None
 
+
 def get_source_date_epoch_from_git(d, sourcedir):
     if not "git://" in d.getVar('SRC_URI') and not "gitsm://" in d.getVar('SRC_URI'):
         return None
@@ -65,6 +68,7 @@ def get_source_date_epoch_from_git(d, sourcedir):
     p = subprocess.run(['git', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'], check=True, stdout=subprocess.PIPE)
     return int(p.stdout.decode('utf-8'))
 
+
 def get_source_date_epoch_from_youngest_file(d, sourcedir):
     if sourcedir == d.getVar('WORKDIR'):
        # These sources are almost certainly not from a tarball
@@ -90,6 +94,7 @@ def get_source_date_epoch_from_youngest_file(d, sourcedir):
         bb.debug(1, "Newest file found: %s" % newest_file)
     return source_date_epoch
 
+
 def fixed_source_date_epoch(d):
     bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH")
     source_date_epoch = d.getVar('SOURCE_DATE_EPOCH_FALLBACK')
@@ -98,6 +103,7 @@ def fixed_source_date_epoch(d):
         return int(source_date_epoch)
     return 0
 
+
 def get_source_date_epoch(d, sourcedir):
     return (
         get_source_date_epoch_from_git(d, sourcedir) or
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 0043df18d7..cd4d158570 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -11,6 +11,7 @@ import os
 import subprocess
 import re
 
+
 class Rootfs(object, metaclass=ABCMeta):
     """
     This is an abstract class. Do not instantiate this directly.
@@ -94,7 +95,6 @@ class Rootfs(object, metaclass=ABCMeta):
                 self.d.getVar('PACKAGE_FEED_BASE_PATHS') or "",
                 self.d.getVar('PACKAGE_FEED_ARCHS'))
 
-
     """
     The _cleanup() method should be used to clean-up stuff that we don't really
     want to end up on target. For example, in the case of RPM, the DB locks.
@@ -248,7 +248,6 @@ class Rootfs(object, metaclass=ABCMeta):
         if self.progress_reporter:
             self.progress_reporter.next_stage()
 
-
     def _uninstall_unneeded(self):
         # Remove the run-postinsts package if no delayed postinsts are found
         delayed_postinsts = self._get_delayed_postinsts()
@@ -337,6 +336,7 @@ class Rootfs(object, metaclass=ABCMeta):
     If neither are specified then the default name of files/device_table-minimal.txt
     is searched for in the BBPATH (same as the old version.)
     """
+
     def _create_devfs(self):
         devtable_list = []
         devtable = self.d.getVar('IMAGE_DEVICE_TABLE')
@@ -359,11 +359,13 @@ def get_class_for_type(imgtype):
     mod = importlib.import_module('oe.package_manager.' + imgtype + '.rootfs')
     return mod.PkgRootfs
 
+
 def variable_depends(d, manifest_dir=None):
     img_type = d.getVar('IMAGE_PKGTYPE')
     cls = get_class_for_type(img_type)
     return cls._depends_list()
 
+
 def create_rootfs(d, manifest_dir=None, progress_reporter=None, logcatcher=None):
     env_bkp = os.environ.copy()
 
@@ -385,6 +387,7 @@ def image_list_installed_packages(d, rootfs_dir=None):
     cls = importlib.import_module('oe.package_manager.' + img_type)
     return cls.PMPkgsList(d, rootfs_dir).list_pkgs()
 
+
 if __name__ == "__main__":
     """
     We should be able to run this as a standalone script, from outside bitbake
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index aad3f571da..7dca15b65c 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -9,6 +9,7 @@ from oe.package_manager import *
 import os
 import traceback
 
+
 class Sdk(object, metaclass=ABCMeta):
     def __init__(self, d, manifest_dir):
         self.d = d
@@ -120,6 +121,7 @@ def sdk_list_installed_packages(d, target, rootfs_dir=None):
     cls = importlib.import_module('oe.package_manager.' + img_type)
     return cls.PMPkgsList(d, rootfs_dir).list_pkgs()
 
+
 def populate_sdk(d, manifest_dir=None):
     env_bkp = os.environ.copy()
 
@@ -131,6 +133,7 @@ def populate_sdk(d, manifest_dir=None):
     os.environ.clear()
     os.environ.update(env_bkp)
 
+
 def get_extra_sdkinfo(sstate_dir):
     """
     This function is going to be used for generating the target and host manifest files packages of eSDK.
@@ -150,5 +153,6 @@ def get_extra_sdkinfo(sstate_dir):
                 extra_info['filesizes'][fn] = fsize
     return extra_info
 
+
 if __name__ == "__main__":
     pass
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 560c6a40dd..588332042d 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -5,23 +5,30 @@ import bb.siggen
 import bb.runqueue
 import oe
 
+
 def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCaches):
     # Return True if we should keep the dependency, False to drop it
     def isNative(x):
         return x.endswith("-native")
+
     def isCross(x):
         return "-cross-" in x
+
     def isNativeSDK(x):
         return x.startswith("nativesdk-")
+
     def isKernel(mc, fn):
         inherits = " ".join(dataCaches[mc].inherits[fn])
         return inherits.find("/module-base.bbclass") != -1 or inherits.find("/linux-kernel-base.bbclass") != -1
+
     def isPackageGroup(mc, fn):
         inherits = " ".join(dataCaches[mc].inherits[fn])
         return "/packagegroup.bbclass" in inherits
+
     def isAllArch(mc, fn):
         inherits = " ".join(dataCaches[mc].inherits[fn])
         return "/allarch.bbclass" in inherits
+
     def isImage(mc, fn):
         return "/image.bbclass" in " ".join(dataCaches[mc].inherits[fn])
 
@@ -71,6 +78,7 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCaches):
     # Default to keep dependencies
     return True
 
+
 def sstate_lockedsigs(d):
     sigs = {}
     types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES") or "").split()
@@ -84,15 +92,19 @@ def sstate_lockedsigs(d):
             sigs[pn][task] = [h, siggen_lockedsigs_var]
     return sigs
 
+
 class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
     name = "OEBasic"
+
     def init_rundepcheck(self, data):
         self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split()
         self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split()
         pass
+
     def rundep_check(self, fn, recipename, task, dep, depname, dataCaches=None):
         return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCaches)
 
+
 class SignatureGeneratorOEBasicHashMixIn(object):
     supports_multiconfig_datacaches = True
 
@@ -301,9 +313,11 @@ class SignatureGeneratorOEBasicHashMixIn(object):
         if error_msgs:
             bb.fatal("\n".join(error_msgs))
 
+
 class SignatureGeneratorOEBasicHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorBasicHash):
     name = "OEBasicHash"
 
+
 class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorUniHashMixIn, bb.siggen.SignatureGeneratorBasicHash):
     name = "OEEquivHash"
 
@@ -316,6 +330,7 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.sigge
         if not self.method:
             bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set")
 
+
 # Insert these classes into siggen's namespace so it can see and select them
 bb.siggen.SignatureGeneratorOEBasic = SignatureGeneratorOEBasic
 bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash
@@ -415,6 +430,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
     else:
         return filedates
 
+
 bb.siggen.find_siginfo = find_siginfo
 
 
@@ -429,6 +445,7 @@ def sstate_get_manifest_filename(task, d):
         d2.setVar("SSTATE_MANMACH", extrainf)
     return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2)
 
+
 def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
     d2 = d
     variant = ''
@@ -467,6 +484,7 @@ def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
     bb.fatal("Manifest %s not found in %s (variant '%s')?" % (manifest, d2.expand(" ".join(pkgarchs)), variant))
     return None, d2
 
+
 def OEOuthashBasic(path, sigfile, task, d):
     """
     Basic output hash function
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 4b9c71eea1..965789c14b 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -13,6 +13,7 @@ logger = logging.getLogger('BitBake.OE.Terminal')
 class UnsupportedTerminal(Exception):
     pass
 
+
 class NoSupportedTerminals(Exception):
     def __init__(self, terms):
         self.terms = terms
@@ -48,12 +49,14 @@ class Terminal(Popen, metaclass=Registry):
         else:
             return [element.format(**fmt) for element in self.command]
 
+
 class XTerminal(Terminal):
     def __init__(self, sh_cmd, title=None, env=None, d=None):
         Terminal.__init__(self, sh_cmd, title, env, d)
         if not os.environ.get('DISPLAY'):
             raise UnsupportedTerminal(self.name)
 
+
 class Gnome(XTerminal):
     command = 'gnome-terminal -t "{title}" -- {command}'
     priority = 2
@@ -68,18 +71,22 @@ class Gnome(XTerminal):
 
         XTerminal.__init__(self, sh_cmd, title, env, d)
 
+
 class Mate(XTerminal):
     command = 'mate-terminal --disable-factory -t "{title}" -x {command}'
     priority = 2
 
+
 class Xfce(XTerminal):
     command = 'xfce4-terminal -T "{title}" -e "{command}"'
     priority = 2
 
+
 class Terminology(XTerminal):
     command = 'terminology -T="{title}" -e {command}'
     priority = 2
 
+
 class Konsole(XTerminal):
     command = 'konsole --separate --workdir . -p tabtitle="{title}" -e {command}'
     priority = 2
@@ -95,14 +102,17 @@ class Konsole(XTerminal):
             self.command = 'konsole --nofork --workdir . -p tabtitle="{title}" -e {command}'
         XTerminal.__init__(self, sh_cmd, title, env, d)
 
+
 class XTerm(XTerminal):
     command = 'xterm -T "{title}" -e {command}'
     priority = 1
 
+
 class Rxvt(XTerminal):
     command = 'rxvt -T "{title}" -e {command}'
     priority = 1
 
+
 class Screen(Terminal):
     command = 'screen -D -m -t "{title}" -S devshell {command}'
 
@@ -118,6 +128,7 @@ class Screen(Terminal):
         else:
             logger.warning(msg)
 
+
 class TmuxRunning(Terminal):
     """Open a new pane in the current running tmux window"""
     name = 'tmux-running'
@@ -136,6 +147,7 @@ class TmuxRunning(Terminal):
 
         Terminal.__init__(self, sh_cmd, title, env, d)
 
+
 class TmuxNewWindow(Terminal):
     """Open a new window in the current running tmux session"""
     name = 'tmux-new-window'
@@ -151,6 +163,7 @@ class TmuxNewWindow(Terminal):
 
         Terminal.__init__(self, sh_cmd, title, env, d)
 
+
 class Tmux(Terminal):
     """Start a new tmux session and window"""
     command = 'tmux new -c "{cwd}" -d -s devshell -n devshell "{command}"'
@@ -179,6 +192,7 @@ class Tmux(Terminal):
         else:
             logger.warning(msg)
 
+
 class Custom(Terminal):
     command = 'false' # This is a placeholder
     priority = 3
@@ -198,6 +212,7 @@ class Custom(Terminal):
 def prioritized():
     return Registry.prioritized()
 
+
 def get_cmd_list():
     terms = Registry.prioritized()
     cmds = []
@@ -206,6 +221,7 @@ def get_cmd_list():
             cmds.append(term.command)
     return cmds
 
+
 def spawn_preferred(sh_cmd, title=None, env=None, d=None):
     """Spawn the first supported terminal, by priority"""
     for terminal in prioritized():
@@ -220,6 +236,7 @@ def spawn_preferred(sh_cmd, title=None, env=None, d=None):
     else:
         raise NoSupportedTerminals(get_cmd_list())
 
+
 def spawn(name, sh_cmd, title=None, env=None, d=None):
     """Spawn the specified terminal, by name"""
     logger.debug('Attempting to spawn terminal "%s"', name)
@@ -259,12 +276,14 @@ def spawn(name, sh_cmd, title=None, env=None, d=None):
         except OSError:
            return
 
+
 def check_tmux_version(desired):
     vernum = check_terminal_version("tmux")
     if vernum and LooseVersion(vernum) < desired:
         return False
     return vernum
 
+
 def check_tmux_pane_size(tmux):
     import subprocess as sub
     # On older tmux versions (<1.9), return false. The reason
@@ -286,6 +305,7 @@ def check_tmux_pane_size(tmux):
 
     return size / 2 >= 19
 
+
 def check_terminal_version(terminalName):
     import subprocess as sub
     try:
@@ -317,6 +337,7 @@ def check_terminal_version(terminalName):
             vernum = ver.split()[-1][5:]
     return vernum
 
+
 def distro_name():
     try:
         p = Popen(['lsb_release', '-i'])
diff --git a/meta/lib/oe/types.py b/meta/lib/oe/types.py
index ee7cc0e659..01328537f4 100644
--- a/meta/lib/oe/types.py
+++ b/meta/lib/oe/types.py
@@ -31,6 +31,7 @@ class OEList(list):
     def __str__(self):
         return self.separator.join(self)
 
+
 def choice(value, choices):
     """OpenEmbedded 'choice' type
 
@@ -47,8 +48,10 @@ def choice(value, choices):
                          (value, choices))
     return value
 
+
 class NoMatch(object):
     """Stub python regex pattern object which never matches anything"""
+
     def findall(self, string, flags=0):
         return None
 
@@ -70,8 +73,10 @@ class NoMatch(object):
     def subn(pattern, repl, string, count=0):
         return None
 
+
 NoMatch = NoMatch()
 
+
 def regex(value, regexflags=None):
     """OpenEmbedded 'regex' type
 
@@ -103,6 +108,7 @@ def regex(value, regexflags=None):
         raise ValueError("Invalid regex value '%s': %s" %
                          (value, exc.args[0]))
 
+
 def boolean(value):
     """OpenEmbedded 'boolean' type
 
@@ -125,6 +131,7 @@ def boolean(value):
         return False
     raise ValueError("Invalid boolean value '%s'" % value)
 
+
 def integer(value, numberbase=10):
     """OpenEmbedded 'integer' type
 
@@ -133,7 +140,10 @@ def integer(value, numberbase=10):
 
     return int(value, int(numberbase))
 
+
 _float = float
+
+
 def float(value, fromhex='false'):
     """OpenEmbedded floating point type
 
@@ -146,6 +156,7 @@ def float(value, fromhex='false'):
     else:
         return _float(value)
 
+
 def path(value, relativeto='', normalize='true', mustexist='false'):
     value = os.path.join(relativeto, value)
 
@@ -162,6 +173,7 @@ def path(value, relativeto='', normalize='true', mustexist='false'):
 
     return value
 
+
 def is_x86(arch):
     """
     Check whether arch is x86 or x86_64
@@ -171,6 +183,7 @@ def is_x86(arch):
     else:
         return False
 
+
 def qemu_use_kvm(kvm, target_arch):
     """
     Enable kvm if target_arch == build_arch or both of them are x86 archs.
diff --git a/meta/lib/oe/useradd.py b/meta/lib/oe/useradd.py
index 8fc77568ff..fea843834a 100644
--- a/meta/lib/oe/useradd.py
+++ b/meta/lib/oe/useradd.py
@@ -4,6 +4,7 @@
 import argparse
 import re
 
+
 class myArgumentParser(argparse.ArgumentParser):
     def _print_message(self, message, file=None):
         bb.warn("%s - %s: %s" % (d.getVar('PN'), pkg, message))
@@ -16,16 +17,19 @@ class myArgumentParser(argparse.ArgumentParser):
     def error(self, message):
         bb.fatal(message)
 
+
 def split_commands(params):
     params = re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params.strip())
     # Remove any empty items
     return [x for x in params if x]
 
+
 def split_args(params):
     params = re.split('''[ \t]+(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params.strip())
     # Remove any empty items
     return [x for x in params if x]
 
+
 def build_useradd_parser():
     # The following comes from --help on useradd from shadow
     parser = myArgumentParser(prog='useradd')
@@ -55,6 +59,7 @@ def build_useradd_parser():
 
     return parser
 
+
 def build_groupadd_parser():
     # The following comes from --help on groupadd from shadow
     parser = myArgumentParser(prog='groupadd')
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 929ca9c5b1..60cd4cb446 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -6,6 +6,7 @@ import subprocess
 import multiprocessing
 import traceback
 
+
 def read_file(filename):
     try:
         f = open(filename, "r")
@@ -17,18 +18,21 @@ def read_file(filename):
         return data
     return None
 
+
 def ifelse(condition, iftrue=True, iffalse=False):
     if condition:
         return iftrue
     else:
         return iffalse
 
+
 def conditional(variable, checkvalue, truevalue, falsevalue, d):
     if d.getVar(variable) == checkvalue:
         return truevalue
     else:
         return falsevalue
 
+
 def vartrue(var, iftrue, iffalse, d):
     import oe.types
     if oe.types.boolean(d.getVar(var)):
@@ -36,12 +40,14 @@ def vartrue(var, iftrue, iffalse, d):
     else:
         return iffalse
 
+
 def less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
     if float(d.getVar(variable)) <= float(checkvalue):
         return truevalue
     else:
         return falsevalue
 
+
 def version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
     result = bb.utils.vercmp_string(d.getVar(variable), checkvalue)
     if result <= 0:
@@ -49,6 +55,7 @@ def version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
     else:
         return falsevalue
 
+
 def both_contain(variable1, variable2, checkvalue, d):
     val1 = d.getVar(variable1)
     val2 = d.getVar(variable2)
@@ -63,6 +70,7 @@ def both_contain(variable1, variable2, checkvalue, d):
     else:
         return ""
 
+
 def set_intersect(variable1, variable2, d):
     """
     Expand both variables, interpret them as lists of strings, and return the
@@ -78,6 +86,7 @@ def set_intersect(variable1, variable2, d):
     val2 = set(d.getVar(variable2).split())
     return " ".join(val1 & val2)
 
+
 def prune_suffix(var, suffixes, d):
     # See if var ends with any of the suffixes listed and
     # remove it if found
@@ -91,22 +100,27 @@ def prune_suffix(var, suffixes, d):
 
     return var
 
+
 def str_filter(f, str, d):
     from re import match
     return " ".join([x for x in str.split() if match(f, x, 0)])
 
+
 def str_filter_out(f, str, d):
     from re import match
     return " ".join([x for x in str.split() if not match(f, x, 0)])
 
+
 def build_depends_string(depends, task):
     """Append a taskname to a string of dependencies as used by the [depends] flag"""
     return " ".join(dep + ":" + task for dep in depends.split())
 
+
 def inherits(d, *classes):
     """Return True if the metadata inherits any of the specified classes"""
     return any(bb.data.inherits_class(cls, d) for cls in classes)
 
+
 def features_backfill(var, d):
     # This construct allows the addition of new features to variable specified
     # as var
@@ -128,6 +142,7 @@ def features_backfill(var, d):
     if addfeatures:
         d.appendVar(var, " " + " ".join(addfeatures))
 
+
 def all_distro_features(d, features, truevalue="1", falsevalue=""):
     """
     Returns truevalue if *all* given features are set in DISTRO_FEATURES,
@@ -148,6 +163,7 @@ def all_distro_features(d, features, truevalue="1", falsevalue=""):
     """
     return bb.utils.contains("DISTRO_FEATURES", features, truevalue, falsevalue, d)
 
+
 def any_distro_features(d, features, truevalue="1", falsevalue=""):
     """
     Returns truevalue if at least *one* of the given features is set in DISTRO_FEATURES,
@@ -169,6 +185,7 @@ def any_distro_features(d, features, truevalue="1", falsevalue=""):
     """
     return bb.utils.contains_any("DISTRO_FEATURES", features, truevalue, falsevalue, d)
 
+
 def parallel_make(d, makeinst=False):
     """
     Return the integer value for the number of parallel threads to use when
@@ -195,6 +212,7 @@ def parallel_make(d, makeinst=False):
 
     return ''
 
+
 def parallel_make_argument(d, fmt, limit=None, makeinst=False):
     """
     Helper utility to construct a parallel make argument from the number of
@@ -215,6 +233,7 @@ def parallel_make_argument(d, fmt, limit=None, makeinst=False):
         return fmt % v
     return ''
 
+
 def packages_filter_out_system(d):
     """
     Return a list of packages from PACKAGES with the "system" packages such as
@@ -230,6 +249,7 @@ def packages_filter_out_system(d):
             pkgs.append(pkg)
     return pkgs
 
+
 def getstatusoutput(cmd):
     return subprocess.getstatusoutput(cmd)
 
@@ -248,10 +268,12 @@ def trim_version(version, num_parts=2):
     trimmed = ".".join(parts[:num_parts])
     return trimmed
 
+
 def cpu_count(at_least=1):
     cpus = len(os.sched_getaffinity(0))
     return max(cpus, at_least)
 
+
 def execute_pre_post_process(d, cmds):
     if cmds is None:
         return
@@ -265,6 +287,8 @@ def execute_pre_post_process(d, cmds):
 # For each item in items, call the function 'target' with item as the first 
 # argument, extraargs as the other arguments and handle any exceptions in the
 # parent thread
+
+
 def multiprocess_launch(target, items, d, extraargs=None):
 
     class ProcessLaunch(multiprocessing.Process):
@@ -340,10 +364,12 @@ def multiprocess_launch(target, items, d, extraargs=None):
         bb.fatal("Fatal errors occurred in subprocesses:\n%s" % msg)
     return results
 
+
 def squashspaces(string):
     import re
     return re.sub(r"\s+", " ", string).strip()
 
+
 def format_pkg_list(pkg_dict, ret_format=None):
     output = []
 
@@ -452,11 +478,14 @@ def get_multilib_datastore(variant, d):
 # so implement a version here
 #
 
+
 from queue import Queue
 from threading import Thread
 
+
 class ThreadedWorker(Thread):
     """Thread executing tasks from a given tasks queue"""
+
     def __init__(self, tasks, worker_init, worker_end):
         Thread.__init__(self)
         self.tasks = tasks
@@ -486,8 +515,10 @@ class ThreadedWorker(Thread):
             finally:
                 self.tasks.task_done()
 
+
 class ThreadedPool:
     """Pool of threads consuming tasks from a queue"""
+
     def __init__(self, num_workers, num_tasks, worker_init=None,
             worker_end=None):
         self.tasks = Queue(num_tasks)
@@ -511,6 +542,7 @@ class ThreadedPool:
         for worker in self.workers:
             worker.join()
 
+
 def write_ld_so_conf(d):
     # Some utils like prelink may not have the correct target library paths
     # so write an ld.so.conf to help them
@@ -522,6 +554,7 @@ def write_ld_so_conf(d):
         f.write(d.getVar("base_libdir") + '\n')
         f.write(d.getVar("libdir") + '\n')
 
+
 class ImageQAFailed(Exception):
     def __init__(self, description, name=None, logfile=None):
         self.description = description
@@ -535,10 +568,12 @@ class ImageQAFailed(Exception):
 
         return msg
 
+
 def sh_quote(string):
     import shlex
     return shlex.quote(string)
 
+
 def directory_size(root, blocksize=4096):
     """
     Calculate the size of the directory, taking into account hard links,
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index 5f1805d86c..5c2a87a649 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -142,7 +142,6 @@ class BuildPerfTestResult(unittest.TextTestResult):
                    [('SKIPPED', t, m) for t, m in self.skipped]
         return sorted(compound, key=lambda info: info[1].start_time)
 
-
     def write_buildstats_json(self):
         """Write buildstats file"""
         buildstats = OrderedDict()
@@ -152,7 +151,6 @@ class BuildPerfTestResult(unittest.TextTestResult):
         with open(os.path.join(self.out_dir, 'buildstats.json'), 'w') as fobj:
             json.dump(buildstats, fobj, cls=ResultsJsonEncoder)
 
-
     def write_results_json(self):
         """Write test results into a json-formatted file"""
         results = OrderedDict([('tester_host', self.hostname),
diff --git a/meta/lib/oeqa/buildperf/test_basic.py b/meta/lib/oeqa/buildperf/test_basic.py
index 2104617ba3..0d4537ca24 100644
--- a/meta/lib/oeqa/buildperf/test_basic.py
+++ b/meta/lib/oeqa/buildperf/test_basic.py
@@ -10,6 +10,7 @@ import oe.path
 from oeqa.buildperf import BuildPerfTestCase
 from oeqa.utils.commands import get_bb_var, get_bb_vars
 
+
 class Test1P1(BuildPerfTestCase):
     build_target = 'core-image-sato'
 
diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py
index c22bc2833d..fab9cde8bd 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -24,6 +24,7 @@ from oeqa.utils import CommandError
 
 from abc import ABCMeta, abstractmethod
 
+
 class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta):
 
     supported_image_fstypes = ['tar.gz', 'tar.bz2']
diff --git a/meta/lib/oeqa/controllers/testtargetloader.py b/meta/lib/oeqa/controllers/testtargetloader.py
index 9ef039050e..038d29bd39 100644
--- a/meta/lib/oeqa/controllers/testtargetloader.py
+++ b/meta/lib/oeqa/controllers/testtargetloader.py
@@ -7,6 +7,8 @@ import bb
 import os
 
 # This class is responsible for loading a test target controller
+
+
 class TestTargetLoader:
 
     # Search oeqa.controllers module directory for and return a controller  
diff --git a/meta/lib/oeqa/core/case.py b/meta/lib/oeqa/core/case.py
index 7ddfd07677..afb34a35cf 100644
--- a/meta/lib/oeqa/core/case.py
+++ b/meta/lib/oeqa/core/case.py
@@ -10,6 +10,7 @@ import unittest
 
 from oeqa.core.exception import OEQAMissingVariable
 
+
 def _validate_td_vars(td, td_vars, type_msg):
     if td_vars:
         for v in td_vars:
@@ -17,6 +18,7 @@ def _validate_td_vars(td, td_vars, type_msg):
                 raise OEQAMissingVariable("Test %s need %s variable but"
                         " isn't into td" % (type_msg, v))
 
+
 class OETestCase(unittest.TestCase):
     # TestContext and Logger instance set by OETestLoader.
     tc = None
@@ -57,6 +59,7 @@ class OETestCase(unittest.TestCase):
             d.tearDownDecorator()
         self.tearDownMethod()
 
+
 class OEPTestResultTestCase:
     """
     Mix-in class to provide functions to make interacting with extraresults for
diff --git a/meta/lib/oeqa/core/cases/example/test_basic.py b/meta/lib/oeqa/core/cases/example/test_basic.py
index d77edcdcec..686fbca09e 100644
--- a/meta/lib/oeqa/core/cases/example/test_basic.py
+++ b/meta/lib/oeqa/core/cases/example/test_basic.py
@@ -6,6 +6,7 @@
 from oeqa.core.case import OETestCase
 from oeqa.core.decorator.depends import OETestDepends
 
+
 class OETestExample(OETestCase):
     def test_example(self):
         self.logger.info('IMAGE: %s' % self.td.get('IMAGE'))
@@ -13,6 +14,7 @@ class OETestExample(OETestCase):
         self.logger.info('ARCH: %s' % self.td.get('ARCH'))
         self.assertEqual('x86', self.td.get('ARCH'))
 
+
 class OETestExampleDepend(OETestCase):
     @OETestDepends(['OETestExample.test_example'])
     def test_example_depends(self):
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index 5e647d11c8..995c8ab521 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -15,6 +15,7 @@ from oeqa.core.loader import OETestLoader
 from oeqa.core.runner import OETestRunner
 from oeqa.core.exception import OEQAMissingManifest, OEQATestNotFound
 
+
 class OETestContext(object):
     loaderClass = OETestLoader
     runnerClass = OETestRunner
@@ -49,6 +50,7 @@ class OETestContext(object):
     def skipTests(self, skips):
         if not skips:
             return
+
         def skipfuncgen(skipmsg):
             def func():
                 raise unittest.SkipTest(skipmsg)
@@ -97,6 +99,7 @@ class OETestContext(object):
         self.runner = self.runnerClass(self, verbosity=2)
         return self.runner.list_tests(self.suites, display_type)
 
+
 class OETestContextExecutor(object):
     _context_class = OETestContext
     _script_executor = 'oe-test'
@@ -243,4 +246,5 @@ class OETestContextExecutor(object):
 
         return rc
 
+
 _executor_class = OETestContextExecutor
diff --git a/meta/lib/oeqa/core/decorator/__init__.py b/meta/lib/oeqa/core/decorator/__init__.py
index 1a82518ab6..d581597aba 100644
--- a/meta/lib/oeqa/core/decorator/__init__.py
+++ b/meta/lib/oeqa/core/decorator/__init__.py
@@ -10,10 +10,12 @@ from oeqa.core.utils.misc import strToList
 
 decoratorClasses = set()
 
+
 def registerDecorator(cls):
     decoratorClasses.add(cls)
     return cls
 
+
 class OETestDecorator(object, metaclass=ABCMeta):
     case = None # Reference of OETestCase decorated
     attrs = None # Attributes to be loaded by decorator implementation
@@ -56,6 +58,7 @@ class OETestDecorator(object, metaclass=ABCMeta):
     def tearDownDecorator(self):
         pass
 
+
 class OETestDiscover(OETestDecorator):
 
     # OETestLoader call it after discover test cases
@@ -64,10 +67,12 @@ class OETestDiscover(OETestDecorator):
     def discover(registry):
         return registry['cases']
 
+
 def OETestTag(*tags):
     expandedtags = []
     for tag in tags:
         expandedtags += strToList(tag)
+
     def decorator(item):
         if hasattr(item, "__oeqa_testtags"):
             # do not append, create a new list (to handle classes with inheritance)
diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py
index 23555bc8d3..82aac0b873 100644
--- a/meta/lib/oeqa/core/decorator/data.py
+++ b/meta/lib/oeqa/core/decorator/data.py
@@ -8,6 +8,7 @@ from oeqa.core.exception import OEQAMissingVariable
 
 from . import OETestDecorator, registerDecorator
 
+
 def has_feature(td, feature):
     """
         Checks for feature in DISTRO_FEATURES or IMAGE_FEATURES.
@@ -18,6 +19,7 @@ def has_feature(td, feature):
         return True
     return False
 
+
 def has_machine(td, machine):
     """
         Checks for MACHINE.
@@ -27,6 +29,7 @@ def has_machine(td, machine):
         return True
     return False
 
+
 def is_qemu(td, qemu):
     """
         Checks if MACHINE is qemu.
@@ -38,6 +41,7 @@ def is_qemu(td, qemu):
         return True
     return False
 
+
 @registerDecorator
 class skipIfDataVar(OETestDecorator):
     """
@@ -57,6 +61,7 @@ class skipIfDataVar(OETestDecorator):
         if self.case.td.get(self.var) == self.value:
             self.case.skipTest(self.msg)
 
+
 @registerDecorator
 class skipIfNotDataVar(OETestDecorator):
     """
@@ -76,6 +81,7 @@ class skipIfNotDataVar(OETestDecorator):
         if not self.case.td.get(self.var) == self.value:
             self.case.skipTest(self.msg)
 
+
 @registerDecorator
 class skipIfInDataVar(OETestDecorator):
     """
@@ -83,6 +89,7 @@ class skipIfInDataVar(OETestDecorator):
     """
 
     attrs = ('var', 'value', 'msg')
+
     def setUpDecorator(self):
         msg = ('Checking if %r value contains %r to skip '
               'the test' % (self.var, self.value))
@@ -90,6 +97,7 @@ class skipIfInDataVar(OETestDecorator):
         if self.value in (self.case.td.get(self.var)):
             self.case.skipTest(self.msg)
 
+
 @registerDecorator
 class skipIfNotInDataVar(OETestDecorator):
     """
@@ -97,6 +105,7 @@ class skipIfNotInDataVar(OETestDecorator):
     """
 
     attrs = ('var', 'value', 'msg')
+
     def setUpDecorator(self):
         msg = ('Checking if %r value contains %r to run '
               'the test' % (self.var, self.value))
@@ -104,6 +113,7 @@ class skipIfNotInDataVar(OETestDecorator):
         if not self.value in (self.case.td.get(self.var) or ""):
             self.case.skipTest(self.msg)
 
+
 @registerDecorator
 class OETestDataDepends(OETestDecorator):
     attrs = ('td_depends',)
@@ -116,6 +126,7 @@ class OETestDataDepends(OETestDecorator):
                 raise OEQAMissingVariable("Test case need %s variable but"
                         " isn't into td" % v)
 
+
 @registerDecorator
 class skipIfNotFeature(OETestDecorator):
     """
@@ -134,6 +145,7 @@ class skipIfNotFeature(OETestDecorator):
         if not has_feature(self.case.td, self.value):
             self.case.skipTest(self.msg)
 
+
 @registerDecorator
 class skipIfFeature(OETestDecorator):
     """
@@ -152,6 +164,7 @@ class skipIfFeature(OETestDecorator):
         if has_feature(self.case.td, self.value):
             self.case.skipTest(self.msg)
 
+
 @registerDecorator
 class skipIfNotMachine(OETestDecorator):
     """
@@ -169,6 +182,7 @@ class skipIfNotMachine(OETestDecorator):
         if not has_machine(self.case.td, self.value):
             self.case.skipTest(self.msg)
 
+
 @registerDecorator
 class skipIfMachine(OETestDecorator):
     """
@@ -186,6 +200,7 @@ class skipIfMachine(OETestDecorator):
         if has_machine(self.case.td, self.value):
             self.case.skipTest(self.msg)
 
+
 @registerDecorator
 class skipIfNotQemu(OETestDecorator):
     """
@@ -203,6 +218,7 @@ class skipIfNotQemu(OETestDecorator):
         if not is_qemu(self.case.td, self.value):
             self.case.skipTest(self.msg)
 
+
 @registerDecorator
 class skipIfQemu(OETestDecorator):
     """
diff --git a/meta/lib/oeqa/core/decorator/depends.py b/meta/lib/oeqa/core/decorator/depends.py
index eef5c8f7ab..c75407e419 100644
--- a/meta/lib/oeqa/core/decorator/depends.py
+++ b/meta/lib/oeqa/core/decorator/depends.py
@@ -10,6 +10,7 @@ from oeqa.core.exception import OEQADependency
 
 from . import OETestDiscover, registerDecorator
 
+
 def _add_depends(registry, case, depends):
     module_name = case.__module__
     class_name = case.__class__.__name__
@@ -31,6 +32,7 @@ def _add_depends(registry, case, depends):
         if not depend_id in registry[case_id]:
             registry[case_id].append(depend_id)
 
+
 def _validate_test_case_depends(cases, depends):
     for case in depends:
         if not case in cases:
@@ -40,6 +42,7 @@ def _validate_test_case_depends(cases, depends):
                 raise OEQADependency("TestCase %s depends on %s and isn't available"
                        ", cases available %s." % (case, dep, str(cases.keys())))
 
+
 def _order_test_case_by_depends(cases, depends):
     def _dep_resolve(graph, node, resolved, seen):
         seen.append(node)
@@ -65,6 +68,7 @@ def _order_test_case_by_depends(cases, depends):
 
     return [cases[case_id] for case_id in cases_ordered]
 
+
 def _skipTestDependency(case, depends):
     for dep in depends:
         found = False
@@ -76,6 +80,7 @@ def _skipTestDependency(case, depends):
             raise SkipTest("Test case %s depends on %s but it didn't pass/run."
                         % (case.id(), dep))
 
+
 @registerDecorator
 class OETestDepends(OETestDiscover):
     attrs = ('depends',)
diff --git a/meta/lib/oeqa/core/decorator/oetimeout.py b/meta/lib/oeqa/core/decorator/oetimeout.py
index 5e6873ad48..d2442352f8 100644
--- a/meta/lib/oeqa/core/decorator/oetimeout.py
+++ b/meta/lib/oeqa/core/decorator/oetimeout.py
@@ -8,12 +8,14 @@ import signal
 from . import OETestDecorator, registerDecorator
 from oeqa.core.exception import OEQATimeoutError
 
+
 @registerDecorator
 class OETimeout(OETestDecorator):
     attrs = ('oetimeout',)
 
     def setUpDecorator(self):
         timeout = self.oetimeout
+
         def _timeoutHandler(signum, frame):
             raise OEQATimeoutError("Timed out after %s "
                     "seconds of execution" % timeout)
diff --git a/meta/lib/oeqa/core/exception.py b/meta/lib/oeqa/core/exception.py
index 05be0ed21f..1e649caee4 100644
--- a/meta/lib/oeqa/core/exception.py
+++ b/meta/lib/oeqa/core/exception.py
@@ -4,23 +4,30 @@
 # SPDX-License-Identifier: MIT
 #
 
+
 class OEQAException(Exception):
     pass
 
+
 class OEQATimeoutError(OEQAException):
     pass
 
+
 class OEQAMissingVariable(OEQAException):
     pass
 
+
 class OEQADependency(OEQAException):
     pass
 
+
 class OEQAMissingManifest(OEQAException):
     pass
 
+
 class OEQAPreRun(OEQAException):
     pass
 
+
 class OEQATestNotFound(OEQAException):
     pass
diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
index 7f7c96cdd6..3cc1d6b669 100644
--- a/meta/lib/oeqa/core/loader.py
+++ b/meta/lib/oeqa/core/loader.py
@@ -31,12 +31,14 @@ _failed_test_args = inspect.getfullargspec(unittest.loader._make_failed_test).ar
 exec("""def _make_failed_test(%s): raise exception""" % ', '.join(_failed_test_args))
 unittest.loader._make_failed_test = _make_failed_test
 
+
 def _find_duplicated_modules(suite, directory):
     for module in getSuiteModules(suite):
         path = findFile('%s.py' % module, directory)
         if path:
             raise ImportError("Duplicated %s module found in %s" % (module, path))
 
+
 def _built_modules_dict(modules):
     modules_dict = {}
 
@@ -61,6 +63,7 @@ def _built_modules_dict(modules):
 
     return modules_dict
 
+
 class OETestLoader(unittest.TestLoader):
     caseClass = OETestCase
 
@@ -313,7 +316,6 @@ class OETestLoader(unittest.TestLoader):
 
         return (load_module, load_underscore)
 
-
     # XXX After Python 3.5, remove backward compatibility hacks for
     # use_load_tests deprecation via *args and **kws.  See issue 16662.
     if sys.version_info >= (3, 5):
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index d2e7ab5462..5672f17adc 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -15,6 +15,7 @@ import sys
 from unittest import TextTestResult as _TestResult
 from unittest import TextTestRunner as _TestRunner
 
+
 class OEStreamLogger(object):
     def __init__(self, logger):
         self.logger = logger
@@ -35,6 +36,7 @@ class OEStreamLogger(object):
         for handler in self.logger.handlers:
             handler.flush()
 
+
 class OETestResult(_TestResult):
     def __init__(self, tc, *args, **kwargs):
         super(OETestResult, self).__init__(*args, **kwargs)
@@ -229,10 +231,12 @@ class OETestResult(_TestResult):
         # Override as we unexpected successes aren't failures for us
         return (len(self.failures) == len(self.errors) == 0)
 
+
 class OEListTestsResult(object):
     def wasSuccessful(self):
         return True
 
+
 class OETestRunner(_TestRunner):
     streamLoggerClass = OEStreamLogger
 
@@ -279,6 +283,7 @@ class OETestRunner(_TestRunner):
         self._walked_cases = 0
 
         curr = {}
+
         def _list_classes(logger, case):
             if not 'module' in curr or curr['module'] != case.__module__:
                 curr['module'] = case.__module__
@@ -298,6 +303,7 @@ class OETestRunner(_TestRunner):
         self._walked_cases = 0
 
         listed = []
+
         def _list_modules(logger, case):
             if not case.__module__ in listed:
                 if case.__module__.startswith('_'):
@@ -319,6 +325,7 @@ class OETestRunner(_TestRunner):
 
         return OEListTestsResult()
 
+
 class OETestResultJSONHelper(object):
 
     testresult_filename = 'testresults.json'
diff --git a/meta/lib/oeqa/core/target/__init__.py b/meta/lib/oeqa/core/target/__init__.py
index 1382aa9b52..765f842938 100644
--- a/meta/lib/oeqa/core/target/__init__.py
+++ b/meta/lib/oeqa/core/target/__init__.py
@@ -6,6 +6,7 @@
 
 from abc import abstractmethod
 
+
 class OETarget(object):
 
     def __init__(self, logger, *args, **kwargs):
diff --git a/meta/lib/oeqa/core/target/qemu.py b/meta/lib/oeqa/core/target/qemu.py
index bb93b4ee99..6d6561333b 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -19,6 +19,7 @@ from oeqa.utils.dump import TargetDumper
 
 supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
 
+
 class OEQemuTarget(OESSHTarget):
     def __init__(self, logger, server_ip, timeout=300, user='root',
             port=None, machine='', rootfs='', kernel='', kvm=False, slirp=False,
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 67bbe639d9..c9edf1f602 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -13,6 +13,7 @@ import codecs
 
 from . import OETarget
 
+
 class OESSHTarget(OETarget):
     def __init__(self, logger, ip, server_ip, timeout=300, user='root',
                  port=None, server_port=0, **kwargs):
@@ -169,7 +170,6 @@ class OESSHTarget(OETarget):
 
         self.run(cmd)
 
-
     def deleteDir(self, remotePath):
         """
             Deletes target's remotePath directory.
@@ -178,7 +178,6 @@ class OESSHTarget(OETarget):
         cmd = "rmdir %s" % remotePath
         self.run(cmd)
 
-
     def deleteDirStructure(self, localPath, remotePath):
         """
         Delete recursively localPath structure directory in target's remotePath.
@@ -217,6 +216,7 @@ class OESSHTarget(OETarget):
                 remoteDir = os.path.join(remotePath, tmpDir.lstrip("/"))
                 self.deleteDir(remoteDir)
 
+
 def SSHCall(command, logger, timeout=None, **opts):
 
     def run():
diff --git a/meta/lib/oeqa/core/tests/cases/data.py b/meta/lib/oeqa/core/tests/cases/data.py
index 42baa708bf..c933f9e081 100644
--- a/meta/lib/oeqa/core/tests/cases/data.py
+++ b/meta/lib/oeqa/core/tests/cases/data.py
@@ -8,6 +8,7 @@ from oeqa.core.case import OETestCase
 from oeqa.core.decorator import OETestTag
 from oeqa.core.decorator.data import OETestDataDepends
 
+
 class DataTest(OETestCase):
     data_vars = ['IMAGE', 'ARCH']
 
diff --git a/meta/lib/oeqa/core/tests/cases/depends.py b/meta/lib/oeqa/core/tests/cases/depends.py
index 46e7db900d..a7032ce1dc 100644
--- a/meta/lib/oeqa/core/tests/cases/depends.py
+++ b/meta/lib/oeqa/core/tests/cases/depends.py
@@ -7,6 +7,7 @@
 from oeqa.core.case import OETestCase
 from oeqa.core.decorator.depends import OETestDepends
 
+
 class DependsTest(OETestCase):
 
     def testDependsFirst(self):
diff --git a/meta/lib/oeqa/core/tests/cases/loader/valid/another.py b/meta/lib/oeqa/core/tests/cases/loader/valid/another.py
index bedc20c8a6..834a8b6132 100644
--- a/meta/lib/oeqa/core/tests/cases/loader/valid/another.py
+++ b/meta/lib/oeqa/core/tests/cases/loader/valid/another.py
@@ -6,6 +6,7 @@
 
 from oeqa.core.case import OETestCase
 
+
 class AnotherTest(OETestCase):
 
     def testAnother(self):
diff --git a/meta/lib/oeqa/core/tests/cases/oetag.py b/meta/lib/oeqa/core/tests/cases/oetag.py
index 52f97dfda6..6b89e011e6 100644
--- a/meta/lib/oeqa/core/tests/cases/oetag.py
+++ b/meta/lib/oeqa/core/tests/cases/oetag.py
@@ -7,6 +7,7 @@
 from oeqa.core.case import OETestCase
 from oeqa.core.decorator import OETestTag
 
+
 class TagTest(OETestCase):
     @OETestTag('goodTag')
     def testTagGood(self):
@@ -23,6 +24,7 @@ class TagTest(OETestCase):
     def testTagNone(self):
         self.assertTrue(True, msg='How is this possible?')
 
+
 @OETestTag('classTag')
 class TagClassTest(OETestCase):
     @OETestTag('otherTag')
diff --git a/meta/lib/oeqa/core/tests/cases/timeout.py b/meta/lib/oeqa/core/tests/cases/timeout.py
index 69cf969a67..b793fbfaf9 100644
--- a/meta/lib/oeqa/core/tests/cases/timeout.py
+++ b/meta/lib/oeqa/core/tests/cases/timeout.py
@@ -10,6 +10,7 @@ from oeqa.core.case import OETestCase
 from oeqa.core.decorator.oetimeout import OETimeout
 from oeqa.core.decorator.depends import OETestDepends
 
+
 class TimeoutTest(OETestCase):
 
     @OETimeout(1)
@@ -21,7 +22,6 @@ class TimeoutTest(OETestCase):
         sleep(2)
         self.assertTrue(True, msg='How is this possible?')
 
-
     def testTimeoutSkip(self):
         self.skipTest("This test needs to be skipped, so that testTimeoutDepends()'s OETestDepends kicks in")
 
diff --git a/meta/lib/oeqa/core/tests/common.py b/meta/lib/oeqa/core/tests/common.py
index 88cc758ad3..e513b5b602 100644
--- a/meta/lib/oeqa/core/tests/common.py
+++ b/meta/lib/oeqa/core/tests/common.py
@@ -18,12 +18,14 @@ formatter = logging.Formatter('OEQATest: %(message)s')
 consoleHandler.setFormatter(formatter)
 logger.addHandler(consoleHandler)
 
+
 def setup_sys_path():
     directory = os.path.dirname(os.path.abspath(__file__))
     oeqa_lib = os.path.realpath(os.path.join(directory, '../../../'))
     if not oeqa_lib in sys.path:
         sys.path.insert(0, oeqa_lib)
 
+
 class TestBase(unittest.TestCase):
     def setUp(self):
         self.logger = logger
diff --git a/meta/lib/oeqa/core/tests/test_data.py b/meta/lib/oeqa/core/tests/test_data.py
index 6fddbb4e96..59f0ee4364 100755
--- a/meta/lib/oeqa/core/tests/test_data.py
+++ b/meta/lib/oeqa/core/tests/test_data.py
@@ -15,6 +15,7 @@ setup_sys_path()
 from oeqa.core.exception import OEQAMissingVariable
 from oeqa.core.utils.test import getCaseMethod, getSuiteCasesNames
 
+
 class TestData(TestBase):
     modules = ['data']
 
@@ -51,5 +52,6 @@ class TestData(TestBase):
         tc = self._testLoader(d=d, modules=self.modules)
         self.assertEqual(True, tc.runTests().wasSuccessful())
 
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/meta/lib/oeqa/core/tests/test_decorators.py b/meta/lib/oeqa/core/tests/test_decorators.py
index 5853aa0027..54a2638ba8 100755
--- a/meta/lib/oeqa/core/tests/test_decorators.py
+++ b/meta/lib/oeqa/core/tests/test_decorators.py
@@ -14,6 +14,7 @@ setup_sys_path()
 from oeqa.core.exception import OEQADependency
 from oeqa.core.utils.test import getCaseMethod, getSuiteCasesNames, getSuiteCasesIDs
 
+
 class TestTagDecorator(TestBase):
     def _runTest(self, modules, filterfn, expect):
         tc = self._testLoader(modules=modules, tags_filter=filterfn)
@@ -67,6 +68,7 @@ class TestTagDecorator(TestBase):
                 'oetag.TagClassTest.testTagNone',
                 })
 
+
 class TestDependsDecorator(TestBase):
     modules = ['depends']
 
@@ -112,6 +114,7 @@ class TestDependsDecorator(TestBase):
             msg = 'Expected OEQADependency exception having a circular dependency'
             self.assertTrue(result, msg=msg)
 
+
 class TestTimeoutDecorator(TestBase):
     modules = ['timeout']
 
@@ -139,5 +142,6 @@ class TestTimeoutDecorator(TestBase):
         tc = self._testLoader(modules=self.modules, tests=tests)
         self.assertTrue(tc.runTests().wasSuccessful(), msg=msg)
 
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/meta/lib/oeqa/core/tests/test_loader.py b/meta/lib/oeqa/core/tests/test_loader.py
index cb38ac845e..0f687be480 100755
--- a/meta/lib/oeqa/core/tests/test_loader.py
+++ b/meta/lib/oeqa/core/tests/test_loader.py
@@ -14,6 +14,7 @@ setup_sys_path()
 from oeqa.core.exception import OEQADependency
 from oeqa.core.utils.test import getSuiteModules, getSuiteCasesIDs
 
+
 class TestLoader(TestBase):
     @unittest.skip("invalid directory is missing oetag.py")
     def test_fail_duplicated_module(self):
@@ -59,5 +60,6 @@ class TestLoader(TestBase):
         msg = 'Expected modules from two different paths'
         self.assertEqual(modules, expected_modules, msg=msg)
 
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/meta/lib/oeqa/core/tests/test_runner.py b/meta/lib/oeqa/core/tests/test_runner.py
index 205464cfae..b6bbc08c52 100755
--- a/meta/lib/oeqa/core/tests/test_runner.py
+++ b/meta/lib/oeqa/core/tests/test_runner.py
@@ -14,6 +14,7 @@ setup_sys_path()
 
 from oeqa.core.runner import OEStreamLogger
 
+
 class TestRunner(TestBase):
     def test_stream_logger(self):
         fp = tempfile.TemporaryFile(mode='w+')
@@ -36,5 +37,6 @@ class TestRunner(TestBase):
 
         fp.close()
 
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py b/meta/lib/oeqa/core/utils/concurrencytest.py
index 98067c0e8c..089ee8e665 100644
--- a/meta/lib/oeqa/core/utils/concurrencytest.py
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -46,6 +46,8 @@ _all__ = [
 # Patch the version from testtools to allow access to _test_start and allow
 # computation of timing information and threading progress
 #
+
+
 class BBThreadsafeForwardingResult(ThreadsafeForwardingResult):
 
     def __init__(self, target, semaphore, threadnum, totalinprocess, totaltests, output, finalresult):
@@ -79,6 +81,7 @@ class BBThreadsafeForwardingResult(ThreadsafeForwardingResult):
         self.finalresult._stdout_buffer = io.StringIO()
         super(BBThreadsafeForwardingResult, self)._add_result_with_semaphore(method, test, *args, **kwargs)
 
+
 class ProxyTestResult:
     # a very basic TestResult proxy, in order to modify add* calls
     def __init__(self, target):
@@ -111,6 +114,7 @@ class ProxyTestResult:
     def __getattr__(self, attr):
         return getattr(self.result, attr)
 
+
 class ExtraResultsDecoderTestResult(ProxyTestResult):
     def _addResult(self, method, test, *args, exception=False, **kwargs):
         if "details" in kwargs and "extraresults" in kwargs["details"]:
@@ -125,6 +129,7 @@ class ExtraResultsDecoderTestResult(ProxyTestResult):
                 kwargs["details"]["extraresults"] = extraresults
         return method(test, *args, **kwargs)
 
+
 class ExtraResultsEncoderTestResult(ProxyTestResult):
     def _addResult(self, method, test, *args, exception=False, **kwargs):
         if hasattr(test, "extraresults"):
@@ -147,6 +152,8 @@ class ExtraResultsEncoderTestResult(ProxyTestResult):
 # outside of a running test case. This can happen if classSetUp() fails
 # for a class of tests. This unfortunately has horrible internal knowledge.
 #
+
+
 def outSideTestaddError(self, offset, line):
     """An 'error:' directive has been read."""
     test_name = line[offset:-1].decode('utf8')
@@ -156,12 +163,15 @@ def outSideTestaddError(self, offset, line):
     self.parser._reading_error_details.set_simple()
     self.parser.subunitLineReceived(line)
 
+
 subunit._OutSideTest.addError = outSideTestaddError
 
 # Like outSideTestaddError above, we need an equivalent for skips
 # happening at the setUpClass() level, otherwise we will see "UNKNOWN"
 # as a result for concurrent tests
 #
+
+
 def outSideTestaddSkip(self, offset, line):
     """A 'skip:' directive has been read."""
     test_name = line[offset:-1].decode('utf8')
@@ -171,6 +181,7 @@ def outSideTestaddSkip(self, offset, line):
     self.parser._reading_skip_details.set_simple()
     self.parser.subunitLineReceived(line)
 
+
 subunit._OutSideTest.addSkip = outSideTestaddSkip
 
 #
@@ -178,15 +189,20 @@ subunit._OutSideTest.addSkip = outSideTestaddSkip
 # is available and accepts writes. This allows unittest with buffer=True
 # to interact ok with subunit which wants to access sys.stdout.buffer.
 #
+
+
 class dummybuf(object):
    def __init__(self, parent):
        self.p = parent
+
    def write(self, data):
        self.p.write(data.decode("utf-8"))
 
 #
 # Taken from testtools.ConncurrencyTestSuite but modified for OE use
 #
+
+
 class ConcurrentTestSuite(unittest.TestSuite):
 
     def __init__(self, suite, processes, setupfunc, removefunc):
@@ -236,6 +252,7 @@ class ConcurrentTestSuite(unittest.TestSuite):
         finally:
             queue.put(testserver)
 
+
 def fork_for_tests(concurrency_num, suite):
     testservers = []
     if 'BUILDDIR' in os.environ:
@@ -311,6 +328,7 @@ def fork_for_tests(concurrency_num, suite):
             testservers.append((testserver, numtests, output))
     return testservers, totaltests
 
+
 def partition_tests(suite, count):
     # Keep tests from the same class together but allow tests from modules
     # to go to different processes to aid parallelisation.
diff --git a/meta/lib/oeqa/core/utils/misc.py b/meta/lib/oeqa/core/utils/misc.py
index e1a59588eb..5f1e63a1dc 100644
--- a/meta/lib/oeqa/core/utils/misc.py
+++ b/meta/lib/oeqa/core/utils/misc.py
@@ -4,6 +4,7 @@
 # SPDX-License-Identifier: MIT
 #
 
+
 def toList(obj, obj_type, obj_name="Object"):
     if isinstance(obj, obj_type):
         return [obj]
@@ -12,6 +13,7 @@ def toList(obj, obj_type, obj_name="Object"):
     else:
         raise TypeError("%s must be %s or list" % (obj_name, obj_type))
 
+
 def toSet(obj, obj_type, obj_name="Object"):
     if isinstance(obj, obj_type):
         return {obj}
@@ -22,15 +24,19 @@ def toSet(obj, obj_type, obj_name="Object"):
     else:
         raise TypeError("%s must be %s or set" % (obj_name, obj_type))
 
+
 def strToList(obj, obj_name="Object"):
     return toList(obj, str, obj_name)
 
+
 def strToSet(obj, obj_name="Object"):
     return toSet(obj, str, obj_name)
 
+
 def intToList(obj, obj_name="Object"):
     return toList(obj, int, obj_name)
 
+
 def dataStoteToDict(d, variables):
     data = {}
 
@@ -39,6 +45,7 @@ def dataStoteToDict(d, variables):
 
     return data
 
+
 def updateTestData(d, td, variables):
     """
     Updates variables with values of data store to test data.
diff --git a/meta/lib/oeqa/core/utils/path.py b/meta/lib/oeqa/core/utils/path.py
index c086dcb0b0..803601ddf7 100644
--- a/meta/lib/oeqa/core/utils/path.py
+++ b/meta/lib/oeqa/core/utils/path.py
@@ -7,6 +7,7 @@
 import os
 import sys
 
+
 def findFile(file_name, directory):
     """
         Search for a file in directory and returns its complete path.
@@ -16,6 +17,7 @@ def findFile(file_name, directory):
             return os.path.join(r, file_name)
     return None
 
+
 def remove_safe(path):
     if os.path.exists(path):
         os.remove(path)
diff --git a/meta/lib/oeqa/core/utils/test.py b/meta/lib/oeqa/core/utils/test.py
index d38cab8a51..21d5e5ed04 100644
--- a/meta/lib/oeqa/core/utils/test.py
+++ b/meta/lib/oeqa/core/utils/test.py
@@ -8,6 +8,7 @@ import os
 import inspect
 import unittest
 
+
 def getSuiteCases(suite):
     """
         Returns individual test from a test suite.
@@ -22,6 +23,7 @@ def getSuiteCases(suite):
 
     return tests
 
+
 def getSuiteModules(suite):
     """
         Returns modules in a test suite.
@@ -31,6 +33,7 @@ def getSuiteModules(suite):
         modules.add(getCaseModule(test))
     return modules
 
+
 def getSuiteCasesInfo(suite, func):
     """
         Returns test case info from suite. Info is fetched from func.
@@ -40,48 +43,56 @@ def getSuiteCasesInfo(suite, func):
         tests.append(func(test))
     return tests
 
+
 def getSuiteCasesNames(suite):
     """
         Returns test case names from suite.
     """
     return getSuiteCasesInfo(suite, getCaseMethod)
 
+
 def getSuiteCasesIDs(suite):
     """
         Returns test case ids from suite.
     """
     return getSuiteCasesInfo(suite, getCaseID)
 
+
 def getSuiteCasesFiles(suite):
     """
         Returns test case files paths from suite.
     """
     return getSuiteCasesInfo(suite, getCaseFile)
 
+
 def getCaseModule(test_case):
     """
         Returns test case module name.
     """
     return test_case.__module__
 
+
 def getCaseClass(test_case):
     """
         Returns test case class name.
     """
     return test_case.__class__.__name__
 
+
 def getCaseID(test_case):
     """
         Returns test case complete id.
     """
     return test_case.id()
 
+
 def getCaseFile(test_case):
     """
         Returns test case file path.
     """
     return inspect.getsourcefile(test_case.__class__)
 
+
 def getCaseMethod(test_case):
     """
         Returns test case method name.
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 815f2a4c02..0776b54d2a 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -34,6 +34,7 @@ from oeqa.utils.decorators import LogResults, gettag, getResults
 
 logger = logging.getLogger("BitBake")
 
+
 def getVar(obj):
     #extend form dict, if a variable didn't exists, need find it in testcase
     class VarDict(dict):
@@ -41,9 +42,11 @@ def getVar(obj):
             return gettag(obj, key)
     return VarDict()
 
+
 def checkTags(tc, tagexp):
     return eval(tagexp, None, getVar(tc))
 
+
 def filterByTagExp(testsuite, tagexp):
     if not tagexp:
         return testsuite
@@ -56,6 +59,7 @@ def filterByTagExp(testsuite, tagexp):
             caseList.append(filterByTagExp(each, tagexp))
     return testsuite.__class__(caseList)
 
+
 @LogResults
 class oeTest(unittest.TestCase):
 
@@ -88,6 +92,7 @@ class oeTest(unittest.TestCase):
         else:
             return False
 
+
 class oeRuntimeTest(oeTest):
     def __init__(self, methodName='runTest'):
         self.target = oeRuntimeTest.tc.target
@@ -132,6 +137,7 @@ class oeRuntimeTest(oeTest):
     def tearDownLocal(self):
         pass
 
+
 def getmodule(pos=2):
     # stack returns a list of tuples containg frame information
     # First element of the list the is current frame, caller is 1
@@ -140,6 +146,7 @@ def getmodule(pos=2):
     #modname = inspect.getmodule(frameinfo[0]).__name__
     return modname
 
+
 def skipModule(reason, pos=2):
     modname = getmodule(pos)
     if modname not in oeTest.tc.testsrequired:
@@ -149,17 +156,22 @@ def skipModule(reason, pos=2):
                 "\nTest was required in TEST_SUITES, so either the condition for skipping is wrong"
                 "\nor the image really doesn't have the required feature/package when it should." % (modname, reason))
 
+
 def skipModuleIf(cond, reason):
 
     if cond:
         skipModule(reason, 3)
 
+
 def skipModuleUnless(cond, reason):
 
     if not cond:
         skipModule(reason, 3)
 
+
 _buffer_logger = ""
+
+
 def custom_verbose(msg, *args, **kwargs):
     global _buffer_logger
     if msg[-1] != "\n":
@@ -172,6 +184,7 @@ def custom_verbose(msg, *args, **kwargs):
             logger.info(_buffer_logger.rstrip("\n"), *args, **kwargs)
         _buffer_logger = ""
 
+
 class TestContext(object):
     def __init__(self, d, exported=False):
         self.d = d
@@ -361,6 +374,7 @@ class TestContext(object):
 
         return runner.run(self.suite)
 
+
 class RuntimeTestContext(TestContext):
     def __init__(self, d, target, exported=False):
         super(RuntimeTestContext, self).__init__(d, exported)
@@ -569,6 +583,7 @@ class RuntimeTestContext(TestContext):
             elif not install and rm:
                 self.target.connection.delete_dir_structure(src_dir, "/")
 
+
 class ImageTestContext(RuntimeTestContext):
     def __init__(self, d, target, host_dumper):
         super(ImageTestContext, self).__init__(d, target)
@@ -594,6 +609,7 @@ class ImageTestContext(RuntimeTestContext):
         pkg_dir = self.d.getVar("TEST_EXTRACTED_DIR")
         super(ImageTestContext, self).install_uninstall_packages(test_id, pkg_dir, install)
 
+
 class ExportTestContext(RuntimeTestContext):
     def __init__(self, d, target, exported=False, parsedArgs={}):
         """
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index fa0ec0ccf6..84276be8a0 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -37,6 +37,8 @@ from oeqa.utils.sshcontrol import SSHControl
 # this isn't pretty but we need a fake target object
 # for running the tests externally as we don't care
 # about deploy/start we only care about the connection methods (run, copy)
+
+
 class FakeTarget(object):
     def __init__(self, d):
         self.connection = None
@@ -69,6 +71,7 @@ class MyDataDict(dict):
     def getVar(self, key, unused=None):
         return self.get(key, "")
 
+
 def main():
 
     parser = argparse.ArgumentParser()
@@ -124,6 +127,7 @@ def main():
 
     return 0
 
+
 def extract_sdk(d):
     """
     Extract SDK if needed
@@ -143,6 +147,7 @@ def extract_sdk(d):
                 env_file = os.path.join(extract_path, f)
                 updateEnv(env_file)
 
+
 if __name__ == "__main__":
     try:
         ret = main()
diff --git a/meta/lib/oeqa/runtime/case.py b/meta/lib/oeqa/runtime/case.py
index f036982e1f..db463ef1d6 100644
--- a/meta/lib/oeqa/runtime/case.py
+++ b/meta/lib/oeqa/runtime/case.py
@@ -7,6 +7,7 @@
 from oeqa.core.case import OETestCase
 from oeqa.utils.package_manager import install_package, uninstall_package
 
+
 class OERuntimeTestCase(OETestCase):
     # target instance set by OERuntimeTestLoader.
     target = None
diff --git a/meta/lib/oeqa/runtime/cases/_qemutiny.py b/meta/lib/oeqa/runtime/cases/_qemutiny.py
index 6886e36502..cb2a115872 100644
--- a/meta/lib/oeqa/runtime/cases/_qemutiny.py
+++ b/meta/lib/oeqa/runtime/cases/_qemutiny.py
@@ -4,6 +4,7 @@
 
 from oeqa.runtime.case import OERuntimeTestCase
 
+
 class QemuTinyTest(OERuntimeTestCase):
 
     def test_boot_tiny(self):
diff --git a/meta/lib/oeqa/runtime/cases/apt.py b/meta/lib/oeqa/runtime/cases/apt.py
index 1e01138760..7842540423 100644
--- a/meta/lib/oeqa/runtime/cases/apt.py
+++ b/meta/lib/oeqa/runtime/cases/apt.py
@@ -8,6 +8,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class AptTest(OERuntimeTestCase):
 
     def pkg(self, command, expected=0):
@@ -17,6 +18,7 @@ class AptTest(OERuntimeTestCase):
         self.assertEqual(status, expected, message)
         return output
 
+
 class AptRepoTest(AptTest):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/boot.py b/meta/lib/oeqa/runtime/cases/boot.py
index 03a1d4b501..286dd7bc7d 100644
--- a/meta/lib/oeqa/runtime/cases/boot.py
+++ b/meta/lib/oeqa/runtime/cases/boot.py
@@ -10,6 +10,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.oetimeout import OETimeout
 from oeqa.core.decorator.data import skipIfQemu
 
+
 class BootTest(OERuntimeTestCase):
 
     @OETimeout(120)
diff --git a/meta/lib/oeqa/runtime/cases/buildcpio.py b/meta/lib/oeqa/runtime/cases/buildcpio.py
index 095a82c10b..01f7400a72 100644
--- a/meta/lib/oeqa/runtime/cases/buildcpio.py
+++ b/meta/lib/oeqa/runtime/cases/buildcpio.py
@@ -8,6 +8,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
 
+
 class BuildCpioTest(OERuntimeTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/buildgalculator.py b/meta/lib/oeqa/runtime/cases/buildgalculator.py
index f7af48c3be..5066d15cf3 100644
--- a/meta/lib/oeqa/runtime/cases/buildgalculator.py
+++ b/meta/lib/oeqa/runtime/cases/buildgalculator.py
@@ -8,6 +8,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
 
+
 class GalculatorTest(OERuntimeTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/buildlzip.py b/meta/lib/oeqa/runtime/cases/buildlzip.py
index ef4c9cebac..78c1661968 100644
--- a/meta/lib/oeqa/runtime/cases/buildlzip.py
+++ b/meta/lib/oeqa/runtime/cases/buildlzip.py
@@ -8,6 +8,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
 
+
 class BuildLzipTest(OERuntimeTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/connman.py b/meta/lib/oeqa/runtime/cases/connman.py
index f0d15fac9b..919905a22b 100644
--- a/meta/lib/oeqa/runtime/cases/connman.py
+++ b/meta/lib/oeqa/runtime/cases/connman.py
@@ -6,6 +6,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class ConnmanTest(OERuntimeTestCase):
 
     def service_status(self, service):
diff --git a/meta/lib/oeqa/runtime/cases/date.py b/meta/lib/oeqa/runtime/cases/date.py
index e14322911d..aeb3e15560 100644
--- a/meta/lib/oeqa/runtime/cases/date.py
+++ b/meta/lib/oeqa/runtime/cases/date.py
@@ -8,6 +8,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class DateTest(OERuntimeTestCase):
 
     def setUp(self):
diff --git a/meta/lib/oeqa/runtime/cases/df.py b/meta/lib/oeqa/runtime/cases/df.py
index e7822af3b4..87687c3850 100644
--- a/meta/lib/oeqa/runtime/cases/df.py
+++ b/meta/lib/oeqa/runtime/cases/df.py
@@ -7,6 +7,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfDataVar, skipIfInDataVar
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class DfTest(OERuntimeTestCase):
 
     @OETestDepends(['ssh.SSHTest.test_ssh'])
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
index 18d562176f..70fbd270f2 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -12,6 +12,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature, skipIfInDataVar, skipIfNotInDataVar
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class DnfTest(OERuntimeTestCase):
 
     def dnf(self, command, expected=0):
@@ -21,6 +22,7 @@ class DnfTest(OERuntimeTestCase):
         self.assertEqual(status, expected, message)
         return output
 
+
 class DnfBasicTest(DnfTest):
 
     @skipIfNotFeature('package-management',
@@ -48,6 +50,7 @@ class DnfBasicTest(DnfTest):
     def test_dnf_history(self):
         self.dnf('history')
 
+
 class DnfRepoTest(DnfTest):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py b/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
index 40ac36493b..3c71a7c600 100644
--- a/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
+++ b/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
@@ -2,6 +2,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfQemu
 
+
 class Ethernet_Test(OERuntimeTestCase):
 
     def set_ip(self, x): 
diff --git a/meta/lib/oeqa/runtime/cases/gcc.py b/meta/lib/oeqa/runtime/cases/gcc.py
index 1b6e431bf4..ab5b9001d4 100644
--- a/meta/lib/oeqa/runtime/cases/gcc.py
+++ b/meta/lib/oeqa/runtime/cases/gcc.py
@@ -8,6 +8,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class GccCompileTest(OERuntimeTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/gi.py b/meta/lib/oeqa/runtime/cases/gi.py
index 42bd100a31..de84873638 100644
--- a/meta/lib/oeqa/runtime/cases/gi.py
+++ b/meta/lib/oeqa/runtime/cases/gi.py
@@ -8,6 +8,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class GObjectIntrospectionTest(OERuntimeTestCase):
 
     @OETestDepends(["ssh.SSHTest.test_ssh"])
diff --git a/meta/lib/oeqa/runtime/cases/gstreamer.py b/meta/lib/oeqa/runtime/cases/gstreamer.py
index f735f82e3b..2647d8a8d3 100644
--- a/meta/lib/oeqa/runtime/cases/gstreamer.py
+++ b/meta/lib/oeqa/runtime/cases/gstreamer.py
@@ -5,6 +5,7 @@
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class GstreamerCliTest(OERuntimeTestCase):
 
     @OEHasPackage(['gstreamer1.0'])
diff --git a/meta/lib/oeqa/runtime/cases/kernelmodule.py b/meta/lib/oeqa/runtime/cases/kernelmodule.py
index 47fd2f850c..88ec39e7a0 100644
--- a/meta/lib/oeqa/runtime/cases/kernelmodule.py
+++ b/meta/lib/oeqa/runtime/cases/kernelmodule.py
@@ -9,6 +9,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfNotFeature
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class KernelModuleTest(OERuntimeTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/ksample.py b/meta/lib/oeqa/runtime/cases/ksample.py
index 1ad6ba8fc8..7508bbf596 100644
--- a/meta/lib/oeqa/runtime/cases/ksample.py
+++ b/meta/lib/oeqa/runtime/cases/ksample.py
@@ -11,6 +11,8 @@ from oeqa.core.decorator.data import skipIfNotFeature
 
 # need some kernel fragments
 # echo "KERNEL_FEATURES_append += \" features\/kernel\-sample\/kernel\-sample.scc\"" >> local.conf
+
+
 class KSample(OERuntimeTestCase):
     def cmd_and_check(self, cmd='', match_string=''):
         status, output = self.target.run(cmd)
@@ -97,6 +99,7 @@ class KSample(OERuntimeTestCase):
         # rmmod
         self.cmd_and_check("rmmod %s" % module_prename)
 
+
 class KSampleTest(KSample):
     # kfifo
     @OETestDepends(['ssh.SSHTest.test_ssh'])
diff --git a/meta/lib/oeqa/runtime/cases/ldd.py b/meta/lib/oeqa/runtime/cases/ldd.py
index 9c2caa8f65..48aa0770e3 100644
--- a/meta/lib/oeqa/runtime/cases/ldd.py
+++ b/meta/lib/oeqa/runtime/cases/ldd.py
@@ -7,6 +7,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfNotFeature
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class LddTest(OERuntimeTestCase):
 
     @OEHasPackage(["ldd"])
diff --git a/meta/lib/oeqa/runtime/cases/logrotate.py b/meta/lib/oeqa/runtime/cases/logrotate.py
index 7d7dbb7afb..9f88f2dbc0 100644
--- a/meta/lib/oeqa/runtime/cases/logrotate.py
+++ b/meta/lib/oeqa/runtime/cases/logrotate.py
@@ -9,6 +9,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class LogrotateTest(OERuntimeTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py
index 9fe9cb8def..4bf2f11a19 100644
--- a/meta/lib/oeqa/runtime/cases/ltp.py
+++ b/meta/lib/oeqa/runtime/cases/ltp.py
@@ -14,6 +14,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 from oeqa.utils.logparser import LtpParser
 
+
 class LtpTestBase(OERuntimeTestCase):
 
     @classmethod
@@ -42,7 +43,6 @@ class LtpTestBase(OERuntimeTestCase):
         cls.extras = cls.tc.extraresults
         cls.extras['ltpresult.rawlogs'] = {'log': ""}
 
- 
     @classmethod
     def ltp_finishup(cls):
         cls.extras['ltpresult.sections'] = cls.sections
@@ -55,6 +55,7 @@ class LtpTestBase(OERuntimeTestCase):
         if cls.failmsg:
             cls.fail(cls.failmsg)
 
+
 class LtpTest(LtpTestBase):
 
     ltp_groups = ["math", "syscalls", "dio", "io", "mm", "ipc", "sched", "nptl", "pty", "containers", "controllers", "filecaps", "cap_bounds", "fcntl-locktests", "connectors", "commands", "net.ipv6_lib", "input", "fs_perms_simple"]
diff --git a/meta/lib/oeqa/runtime/cases/ltp_compliance.py b/meta/lib/oeqa/runtime/cases/ltp_compliance.py
index c56c3e6fcf..8b0f8a2cdd 100644
--- a/meta/lib/oeqa/runtime/cases/ltp_compliance.py
+++ b/meta/lib/oeqa/runtime/cases/ltp_compliance.py
@@ -14,6 +14,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 from oeqa.utils.logparser import LtpComplianceParser
 
+
 class LtpPosixBase(OERuntimeTestCase):
 
     @classmethod
@@ -42,7 +43,6 @@ class LtpPosixBase(OERuntimeTestCase):
         cls.extras = cls.tc.extraresults
         cls.extras['ltpposixresult.rawlogs'] = {'log': ""}
 
- 
     @classmethod
     def ltp_finishup(cls):
         cls.extras['ltpposixresult.sections'] = cls.sections
@@ -56,6 +56,7 @@ class LtpPosixBase(OERuntimeTestCase):
         if cls.failmsg:
             cls.fail(cls.failmsg)
 
+
 class LtpPosixTest(LtpPosixBase):
     posix_groups = ["AIO", "MEM", "MSG", "SEM", "SIG", "THR", "TMR", "TPS"]
 
diff --git a/meta/lib/oeqa/runtime/cases/ltp_stress.py b/meta/lib/oeqa/runtime/cases/ltp_stress.py
index d97595e94e..beb47710e4 100644
--- a/meta/lib/oeqa/runtime/cases/ltp_stress.py
+++ b/meta/lib/oeqa/runtime/cases/ltp_stress.py
@@ -15,6 +15,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 from oeqa.core.decorator.data import skipIfQemu
 from oeqa.utils.logparser import LtpParser
 
+
 class LtpStressBase(OERuntimeTestCase):
 
     @classmethod
@@ -43,7 +44,6 @@ class LtpStressBase(OERuntimeTestCase):
         cls.extras = cls.tc.extraresults
         cls.extras['ltpstressresult.rawlogs'] = {'log': ""}
 
- 
     @classmethod
     def ltp_finishup(cls):
         cls.extras['ltpstressresult.sections'] = cls.sections
@@ -57,6 +57,7 @@ class LtpStressBase(OERuntimeTestCase):
         if cls.failmsg:
             cls.fail(cls.failmsg)
 
+
 class LtpStressTest(LtpStressBase):
 
     def runltp(self, stress_group):
@@ -90,7 +91,6 @@ class LtpStressTest(LtpStressBase):
     # LTP stress runtime tests
     #
     @skipIfQemu('qemuall', 'Test only runs on real hardware')
-
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     @OEHasPackage(["ltp"])
     def test_ltp_stress(self):
diff --git a/meta/lib/oeqa/runtime/cases/multilib.py b/meta/lib/oeqa/runtime/cases/multilib.py
index 0d1b9ae2c9..9dffb0401a 100644
--- a/meta/lib/oeqa/runtime/cases/multilib.py
+++ b/meta/lib/oeqa/runtime/cases/multilib.py
@@ -9,6 +9,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 import subprocess
 
+
 class MultilibTest(OERuntimeTestCase):
 
     def archtest(self, binary, arch):
diff --git a/meta/lib/oeqa/runtime/cases/oe_syslog.py b/meta/lib/oeqa/runtime/cases/oe_syslog.py
index 2e1a8f153d..45d815baf7 100644
--- a/meta/lib/oeqa/runtime/cases/oe_syslog.py
+++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -8,6 +8,7 @@ from oeqa.core.decorator.data import skipIfDataVar
 from oeqa.runtime.decorator.package import OEHasPackage
 import time
 
+
 class SyslogTest(OERuntimeTestCase):
 
     @OETestDepends(['ssh.SSHTest.test_ssh'])
@@ -20,6 +21,7 @@ class SyslogTest(OERuntimeTestCase):
         hasdaemon = "syslogd" in output or "syslog-ng" in output or "svlogd" in output
         self.assertTrue(hasdaemon, msg=msg)
 
+
 class SyslogTestConfig(OERuntimeTestCase):
 
     def verif_not_running(self, pids):
@@ -39,7 +41,6 @@ class SyslogTestConfig(OERuntimeTestCase):
             pids.append(pid)
         return 0, pids
 
-
     def restart_sanity(self, names, restart_cmd, pidchange=True):
         status, original_pids = self.verify_running(names)
         if status:
@@ -98,7 +99,6 @@ class SyslogTestConfig(OERuntimeTestCase):
                ' Output: %s ' % output)
         self.assertEqual(status, 0, msg=msg)
 
-
     @OETestDepends(['oe_syslog.SyslogTest.test_syslog_running'])
     def test_syslog_restart(self):
         if self.restart_sanity(['systemd-journald'], 'systemctl restart syslog.service', pidchange=False):
@@ -110,7 +110,6 @@ class SyslogTestConfig(OERuntimeTestCase):
         else:
             self.logger.info("No syslog found to restart, ignoring")
 
-
     @OETestDepends(['oe_syslog.SyslogTestConfig.test_syslog_logger'])
     @OEHasPackage(["busybox-syslog"])
     @skipIfDataVar('VIRTUAL-RUNTIME_init_manager', 'systemd',
diff --git a/meta/lib/oeqa/runtime/cases/opkg.py b/meta/lib/oeqa/runtime/cases/opkg.py
index de96b3ff3a..c810575180 100644
--- a/meta/lib/oeqa/runtime/cases/opkg.py
+++ b/meta/lib/oeqa/runtime/cases/opkg.py
@@ -8,6 +8,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature, skipIfFeature
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class OpkgTest(OERuntimeTestCase):
 
     def pkg(self, command, expected=0):
@@ -17,6 +18,7 @@ class OpkgTest(OERuntimeTestCase):
         self.assertEqual(status, expected, message)
         return output
 
+
 class OpkgRepoTest(OpkgTest):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/pam.py b/meta/lib/oeqa/runtime/cases/pam.py
index 4cd5325201..250c0f9c71 100644
--- a/meta/lib/oeqa/runtime/cases/pam.py
+++ b/meta/lib/oeqa/runtime/cases/pam.py
@@ -10,6 +10,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfNotFeature
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class PamBasicTest(OERuntimeTestCase):
 
     @skipIfNotFeature('pam', 'Test requires pam to be in DISTRO_FEATURES')
diff --git a/meta/lib/oeqa/runtime/cases/parselogs.py b/meta/lib/oeqa/runtime/cases/parselogs.py
index c61969d3f2..2d24090c9e 100644
--- a/meta/lib/oeqa/runtime/cases/parselogs.py
+++ b/meta/lib/oeqa/runtime/cases/parselogs.py
@@ -197,6 +197,7 @@ ignore_errors = {
 
 log_locations = ["/var/log/", "/var/log/dmesg", "/tmp/dmesg_output.log"]
 
+
 class ParseLogsTest(OERuntimeTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/perl.py b/meta/lib/oeqa/runtime/cases/perl.py
index 2c6b3b7846..5b6facd08f 100644
--- a/meta/lib/oeqa/runtime/cases/perl.py
+++ b/meta/lib/oeqa/runtime/cases/perl.py
@@ -8,6 +8,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class PerlTest(OERuntimeTestCase):
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     @OEHasPackage(['perl'])
diff --git a/meta/lib/oeqa/runtime/cases/ping.py b/meta/lib/oeqa/runtime/cases/ping.py
index da40204614..9e5a8dc722 100644
--- a/meta/lib/oeqa/runtime/cases/ping.py
+++ b/meta/lib/oeqa/runtime/cases/ping.py
@@ -7,6 +7,7 @@ from subprocess import Popen, PIPE
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.oetimeout import OETimeout
 
+
 class PingTest(OERuntimeTestCase):
 
     @OETimeout(30)
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
index a8a4d17003..0c42ea995b 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -13,6 +13,7 @@ from oeqa.core.decorator.data import skipIfNotFeature
 from oeqa.runtime.decorator.package import OEHasPackage
 from oeqa.utils.logparser import PtestParser
 
+
 class PtestRunnerTest(OERuntimeTestCase):
 
     @skipIfNotFeature('ptest', 'Test requires ptest to be in DISTRO_FEATURES')
diff --git a/meta/lib/oeqa/runtime/cases/python.py b/meta/lib/oeqa/runtime/cases/python.py
index ec54f1e1db..043bc22442 100644
--- a/meta/lib/oeqa/runtime/cases/python.py
+++ b/meta/lib/oeqa/runtime/cases/python.py
@@ -6,6 +6,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class PythonTest(OERuntimeTestCase):
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     @OEHasPackage(['python3-core'])
diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py
index df0a373c59..9c7a50c567 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -12,6 +12,7 @@ from oeqa.core.decorator.data import skipIfDataVar
 from oeqa.runtime.decorator.package import OEHasPackage
 from oeqa.core.utils.path import findFile
 
+
 class RpmBasicTest(OERuntimeTestCase):
 
     @OEHasPackage(['rpm'])
diff --git a/meta/lib/oeqa/runtime/cases/rtc.py b/meta/lib/oeqa/runtime/cases/rtc.py
index c4e6681324..43de30a23f 100644
--- a/meta/lib/oeqa/runtime/cases/rtc.py
+++ b/meta/lib/oeqa/runtime/cases/rtc.py
@@ -4,6 +4,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 import re
 
+
 class RTCTest(OERuntimeTestCase):
 
     def setUp(self):
diff --git a/meta/lib/oeqa/runtime/cases/runlevel.py b/meta/lib/oeqa/runtime/cases/runlevel.py
index aa31adf0b7..8dbb2e4f13 100644
--- a/meta/lib/oeqa/runtime/cases/runlevel.py
+++ b/meta/lib/oeqa/runtime/cases/runlevel.py
@@ -3,6 +3,7 @@ from oeqa.core.decorator.depends import OETestDepends
 
 import time
 
+
 class RunLevel_Test(OERuntimeTestCase):
     
     @OETestDepends(['ssh.SSHTest.test_ssh'])
diff --git a/meta/lib/oeqa/runtime/cases/scons.py b/meta/lib/oeqa/runtime/cases/scons.py
index 3c7c7f7270..60f77c499b 100644
--- a/meta/lib/oeqa/runtime/cases/scons.py
+++ b/meta/lib/oeqa/runtime/cases/scons.py
@@ -8,6 +8,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class SconsCompileTest(OERuntimeTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/scp.py b/meta/lib/oeqa/runtime/cases/scp.py
index fdf058d948..faee8852dc 100644
--- a/meta/lib/oeqa/runtime/cases/scp.py
+++ b/meta/lib/oeqa/runtime/cases/scp.py
@@ -9,6 +9,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class ScpTest(OERuntimeTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/skeletoninit.py b/meta/lib/oeqa/runtime/cases/skeletoninit.py
index 5f3b6b353a..2da4b4e340 100644
--- a/meta/lib/oeqa/runtime/cases/skeletoninit.py
+++ b/meta/lib/oeqa/runtime/cases/skeletoninit.py
@@ -10,6 +10,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfDataVar
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class SkeletonBasicTest(OERuntimeTestCase):
 
     @OETestDepends(['ssh.SSHTest.test_ssh'])
diff --git a/meta/lib/oeqa/runtime/cases/ssh.py b/meta/lib/oeqa/runtime/cases/ssh.py
index 60a5fbbfbf..d946bf58a9 100644
--- a/meta/lib/oeqa/runtime/cases/ssh.py
+++ b/meta/lib/oeqa/runtime/cases/ssh.py
@@ -6,6 +6,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class SSHTest(OERuntimeTestCase):
 
     @OETestDepends(['ping.PingTest.test_ping'])
diff --git a/meta/lib/oeqa/runtime/cases/stap.py b/meta/lib/oeqa/runtime/cases/stap.py
index 5342f6ac34..df4afe58fc 100644
--- a/meta/lib/oeqa/runtime/cases/stap.py
+++ b/meta/lib/oeqa/runtime/cases/stap.py
@@ -9,6 +9,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfNotFeature
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class StapTest(OERuntimeTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/storage.py b/meta/lib/oeqa/runtime/cases/storage.py
index f6f9130d20..cd640e214e 100644
--- a/meta/lib/oeqa/runtime/cases/storage.py
+++ b/meta/lib/oeqa/runtime/cases/storage.py
@@ -9,6 +9,7 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfQemu
 
+
 class StorageBase(OERuntimeTestCase):
     def storage_mount(cls, tmo=1):
 
@@ -29,7 +30,6 @@ class StorageBase(OERuntimeTestCase):
         msg = ('Failed to cleanup files @ %s/*' % cls.test_dir)
         cls.assertFalse(output, msg=msg)
 
-
     def storage_basic(cls):
         # create file on device
         (status, output) = cls.target.run('touch %s/%s' % (cls.test_dir, cls.test_file))
diff --git a/meta/lib/oeqa/runtime/cases/suspend.py b/meta/lib/oeqa/runtime/cases/suspend.py
index 708e6ac7e5..84e2e3f710 100644
--- a/meta/lib/oeqa/runtime/cases/suspend.py
+++ b/meta/lib/oeqa/runtime/cases/suspend.py
@@ -4,6 +4,7 @@ from oeqa.core.decorator.data import skipIfQemu
 import threading
 import time
 
+
 class Suspend_Test(OERuntimeTestCase):
 
     def test_date(self): 
diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py
index a465eaa0b7..7328bb439c 100644
--- a/meta/lib/oeqa/runtime/cases/systemd.py
+++ b/meta/lib/oeqa/runtime/cases/systemd.py
@@ -11,6 +11,7 @@ from oeqa.core.decorator.data import skipIfDataVar, skipIfNotDataVar
 from oeqa.runtime.decorator.package import OEHasPackage
 from oeqa.core.decorator.data import skipIfNotFeature, skipIfFeature
 
+
 class SystemdTest(OERuntimeTestCase):
 
     def systemctl(self, action='', target='', expected=0, verbose=False):
@@ -53,6 +54,7 @@ class SystemdTest(OERuntimeTestCase):
                     % l_match_units)
         return output
 
+
 class SystemdBasicTests(SystemdTest):
 
     def settle(self):
@@ -134,6 +136,7 @@ class SystemdServiceTests(SystemdTest):
             status = self.target.run('mount -oro,remount /')[0]
             self.assertTrue(status == 0, msg='Remounting / as r/o failed')
 
+
 class SystemdJournalTests(SystemdTest):
 
     @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic'])
diff --git a/meta/lib/oeqa/runtime/cases/terminal.py b/meta/lib/oeqa/runtime/cases/terminal.py
index 8fcca99f47..fe1cd68118 100644
--- a/meta/lib/oeqa/runtime/cases/terminal.py
+++ b/meta/lib/oeqa/runtime/cases/terminal.py
@@ -5,6 +5,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 import threading
 import time
 
+
 class TerminalTest(OERuntimeTestCase):
 
     @OEHasPackage(['matchbox-terminal'])
diff --git a/meta/lib/oeqa/runtime/cases/usb_hid.py b/meta/lib/oeqa/runtime/cases/usb_hid.py
index a42c856f6a..e8451b4658 100644
--- a/meta/lib/oeqa/runtime/cases/usb_hid.py
+++ b/meta/lib/oeqa/runtime/cases/usb_hid.py
@@ -3,6 +3,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfQemu
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class USB_HID_Test(OERuntimeTestCase):
 
     def keyboard_mouse_simulation(self): 
diff --git a/meta/lib/oeqa/runtime/cases/weston.py b/meta/lib/oeqa/runtime/cases/weston.py
index 3456803adb..6e8fa0e3f6 100644
--- a/meta/lib/oeqa/runtime/cases/weston.py
+++ b/meta/lib/oeqa/runtime/cases/weston.py
@@ -9,6 +9,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 import threading
 import time
 
+
 class WestonTest(OERuntimeTestCase):
     weston_log_file = '/tmp/weston.log'
 
diff --git a/meta/lib/oeqa/runtime/cases/x32lib.py b/meta/lib/oeqa/runtime/cases/x32lib.py
index f419c8f181..1ffe2388b9 100644
--- a/meta/lib/oeqa/runtime/cases/x32lib.py
+++ b/meta/lib/oeqa/runtime/cases/x32lib.py
@@ -8,6 +8,7 @@ from oeqa.core.decorator.data import skipIfNotInDataVar
 
 import subprocess
 
+
 class X32libTest(OERuntimeTestCase):
 
     @skipIfNotInDataVar('DEFAULTTUNE', 'x86-64-x32',
diff --git a/meta/lib/oeqa/runtime/cases/xorg.py b/meta/lib/oeqa/runtime/cases/xorg.py
index 0bbef023d9..65b8f3ae30 100644
--- a/meta/lib/oeqa/runtime/cases/xorg.py
+++ b/meta/lib/oeqa/runtime/cases/xorg.py
@@ -7,6 +7,7 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfNotFeature
 from oeqa.runtime.decorator.package import OEHasPackage
 
+
 class XorgTest(OERuntimeTestCase):
 
     @skipIfNotFeature('x11-base',
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index 0ea67bee2f..af5639b3b8 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -13,6 +13,7 @@ from oeqa.utils.dump import HostDumper
 
 from oeqa.runtime.loader import OERuntimeTestLoader
 
+
 class OERuntimeTestContext(OETestContext):
     loaderClass = OERuntimeTestLoader
     runtime_files_dir = os.path.join(
@@ -35,6 +36,7 @@ class OERuntimeTestContext(OETestContext):
         if 'procps' in self.image_packages:
             self.target_cmds['ps'] = self.target_cmds['ps'] + ' -ef'
 
+
 class OERuntimeTestContextExecutor(OETestContextExecutor):
     _context_class = OERuntimeTestContext
 
@@ -224,4 +226,5 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
                         args.packages_manifest)
         self.tc_kwargs['init']['extract_dir'] = args.extract_dir
 
+
 _executor_class = OERuntimeTestContextExecutor
diff --git a/meta/lib/oeqa/runtime/decorator/package.py b/meta/lib/oeqa/runtime/decorator/package.py
index 2d7e174dbf..687556a6d7 100644
--- a/meta/lib/oeqa/runtime/decorator/package.py
+++ b/meta/lib/oeqa/runtime/decorator/package.py
@@ -7,6 +7,7 @@
 from oeqa.core.decorator import OETestDecorator, registerDecorator
 from oeqa.core.utils.misc import strToSet
 
+
 @registerDecorator
 class OEHasPackage(OETestDecorator):
     """
@@ -58,6 +59,7 @@ class OEHasPackage(OETestDecorator):
     def _decorator_fail(self, msg):
         self.case.skipTest(msg)
 
+
 @registerDecorator
 class OERequirePackage(OEHasPackage):
     """
diff --git a/meta/lib/oeqa/runtime/loader.py b/meta/lib/oeqa/runtime/loader.py
index 7041ddfde8..ecad20087f 100644
--- a/meta/lib/oeqa/runtime/loader.py
+++ b/meta/lib/oeqa/runtime/loader.py
@@ -7,6 +7,7 @@
 from oeqa.core.loader import OETestLoader
 from oeqa.runtime.case import OERuntimeTestCase
 
+
 class OERuntimeTestLoader(OETestLoader):
     caseClass = OERuntimeTestCase
 
diff --git a/meta/lib/oeqa/runtime/utils/targetbuildproject.py b/meta/lib/oeqa/runtime/utils/targetbuildproject.py
index f4f4816a9b..214f4cce55 100644
--- a/meta/lib/oeqa/runtime/utils/targetbuildproject.py
+++ b/meta/lib/oeqa/runtime/utils/targetbuildproject.py
@@ -6,6 +6,7 @@
 
 from oeqa.utils.buildproject import BuildProject
 
+
 class TargetBuildProject(BuildProject):
 
     def __init__(self, target, uri, foldername=None, dl_dir=None):
diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
index 6b8eab3258..9b05f33dfb 100644
--- a/meta/lib/oeqa/sdk/case.py
+++ b/meta/lib/oeqa/sdk/case.py
@@ -9,6 +9,7 @@ import subprocess
 
 from oeqa.core.case import OETestCase
 
+
 class OESDKTestCase(OETestCase):
     def _run(self, cmd):
         return subprocess.check_output(". %s > /dev/null; %s;" %
diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/assimp.py
index f166758e49..3afe203141 100644
--- a/meta/lib/oeqa/sdk/cases/assimp.py
+++ b/meta/lib/oeqa/sdk/cases/assimp.py
@@ -11,6 +11,7 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
 
+
 class BuildAssimp(OESDKTestCase):
     """
     Test case to build a project using cmake.
diff --git a/meta/lib/oeqa/sdk/cases/buildcpio.py b/meta/lib/oeqa/sdk/cases/buildcpio.py
index e7fc211a47..6ad4bb3404 100644
--- a/meta/lib/oeqa/sdk/cases/buildcpio.py
+++ b/meta/lib/oeqa/sdk/cases/buildcpio.py
@@ -11,10 +11,12 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
 
+
 class BuildCpioTest(OESDKTestCase):
     """
     Check that autotools will cross-compile correctly.
     """
+
     def test_cpio(self):
         with tempfile.TemporaryDirectory(prefix="cpio-", dir=self.tc.sdk_dir) as testdir:
             tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.gz")
diff --git a/meta/lib/oeqa/sdk/cases/buildepoxy.py b/meta/lib/oeqa/sdk/cases/buildepoxy.py
index 385f8ccca8..6f4b430030 100644
--- a/meta/lib/oeqa/sdk/cases/buildepoxy.py
+++ b/meta/lib/oeqa/sdk/cases/buildepoxy.py
@@ -11,10 +11,12 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
 
+
 class EpoxyTest(OESDKTestCase):
     """
     Test that Meson builds correctly.
     """
+
     def setUp(self):
         if not (self.tc.hasHostPackage("nativesdk-meson")):
             raise unittest.SkipTest("GalculatorTest class: SDK doesn't contain Meson")
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/buildgalculator.py
index c6de032b29..b7fe32be2b 100644
--- a/meta/lib/oeqa/sdk/cases/buildgalculator.py
+++ b/meta/lib/oeqa/sdk/cases/buildgalculator.py
@@ -11,10 +11,12 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
 
+
 class GalculatorTest(OESDKTestCase):
     """
     Test that autotools and GTK+ 3 compiles correctly.
     """
+
     def setUp(self):
         if not (self.tc.hasTargetPackage("gtk+3", multilib=True) or
                 self.tc.hasTargetPackage("libgtk-3.0", multilib=True)):
diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py b/meta/lib/oeqa/sdk/cases/buildlzip.py
index 04c4a0ec16..fb894d4183 100644
--- a/meta/lib/oeqa/sdk/cases/buildlzip.py
+++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
@@ -10,10 +10,12 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
 
+
 class BuildLzipTest(OESDKTestCase):
     """
     Test that "plain" compilation works, using just $CC $CFLAGS etc.
     """
+
     def test_lzip(self):
         with tempfile.TemporaryDirectory(prefix="lzip", dir=self.tc.sdk_dir) as testdir:
             tarball = self.fetch(testdir, self.td["DL_DIR"], "http://downloads.yoctoproject.org/mirror/sources/lzip-1.19.tar.gz")
diff --git a/meta/lib/oeqa/sdk/cases/gcc.py b/meta/lib/oeqa/sdk/cases/gcc.py
index 7146f368e9..f943cd3fe3 100644
--- a/meta/lib/oeqa/sdk/cases/gcc.py
+++ b/meta/lib/oeqa/sdk/cases/gcc.py
@@ -12,6 +12,7 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
 
+
 class GccCompileTest(OESDKTestCase):
     td_vars = ['MACHINE']
 
diff --git a/meta/lib/oeqa/sdk/cases/perl.py b/meta/lib/oeqa/sdk/cases/perl.py
index 14d76d820f..1259a09963 100644
--- a/meta/lib/oeqa/sdk/cases/perl.py
+++ b/meta/lib/oeqa/sdk/cases/perl.py
@@ -8,6 +8,7 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
 
+
 class PerlTest(OESDKTestCase):
     def setUp(self):
         if not (self.tc.hasHostPackage("nativesdk-perl") or
diff --git a/meta/lib/oeqa/sdk/cases/python.py b/meta/lib/oeqa/sdk/cases/python.py
index 2848481f33..76d3dbabed 100644
--- a/meta/lib/oeqa/sdk/cases/python.py
+++ b/meta/lib/oeqa/sdk/cases/python.py
@@ -9,6 +9,7 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
 
+
 class Python2Test(OESDKTestCase):
     def setUp(self):
         if not (self.tc.hasHostPackage("nativesdk-python-core") or
@@ -20,6 +21,7 @@ class Python2Test(OESDKTestCase):
         output = self._run(cmd)
         self.assertEqual(output, "Hello, world\n")
 
+
 class Python3Test(OESDKTestCase):
     def setUp(self):
         if not (self.tc.hasHostPackage("nativesdk-python3-core") or
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py
index b3cd7d0a5b..4e4eb8e5fa 100644
--- a/meta/lib/oeqa/sdk/context.py
+++ b/meta/lib/oeqa/sdk/context.py
@@ -11,6 +11,7 @@ import re
 
 from oeqa.core.context import OETestContext, OETestContextExecutor
 
+
 class OESDKTestContext(OETestContext):
     sdk_files_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files")
 
@@ -48,6 +49,7 @@ class OESDKTestContext(OETestContext):
                     pkg = ml + '-' + pkg
         return self._hasPackage(self.target_pkg_manifest, pkg, regex=regex)
 
+
 class OESDKTestContextExecutor(OETestContextExecutor):
     _context_class = OESDKTestContext
 
@@ -150,4 +152,5 @@ class OESDKTestContextExecutor(OETestContextExecutor):
         self.sdk_env = sdk_envs[args.sdk_env]
         return super(OESDKTestContextExecutor, self).run(logger, args)
 
+
 _executor_class = OESDKTestContextExecutor
diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
index 18e03cb8ef..80c2002ecd 100644
--- a/meta/lib/oeqa/sdk/testsdk.py
+++ b/meta/lib/oeqa/sdk/testsdk.py
@@ -6,6 +6,7 @@
 
 from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
 
+
 class TestSDKBase(object):
     @staticmethod
     def get_sdk_configuration(d, test_type):
@@ -34,6 +35,7 @@ class TestSDKBase(object):
     def get_sdk_result_id(configuration):
         return '%s_%s_%s_%s_%s' % (configuration['TEST_TYPE'], configuration['IMAGE_BASENAME'], configuration['SDKMACHINE'], configuration['MACHINE'], configuration['STARTTIME'])
 
+
 class TestSDK(TestSDKBase):
     context_executor_class = OESDKTestContextExecutor
     context_class = OESDKTestContext
diff --git a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
index 32f5e3310d..aaaeebf762 100644
--- a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
+++ b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
@@ -9,6 +9,7 @@ import subprocess
 
 from oeqa.utils.buildproject import BuildProject
 
+
 class SDKBuildProject(BuildProject):
     def __init__(self, testpath, sdkenv, uri, testlogdir, builddatetime,
             foldername=None, dl_dir=None):
diff --git a/meta/lib/oeqa/sdkext/case.py b/meta/lib/oeqa/sdkext/case.py
index 8a36c1f8ce..bf832cf8c8 100644
--- a/meta/lib/oeqa/sdkext/case.py
+++ b/meta/lib/oeqa/sdkext/case.py
@@ -10,6 +10,7 @@ import subprocess
 from oeqa.utils import avoid_paths_in_environ
 from oeqa.sdk.case import OESDKTestCase
 
+
 class OESDKExtTestCase(OESDKTestCase):
     def _run(self, cmd):
         # extensible sdk shows a warning if found bitbake in the path
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py
index 4567795027..f0fb75a3af 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -14,6 +14,7 @@ from oeqa.utils.httpserver import HTTPService
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
 
+
 class DevtoolTest(OESDKExtTestCase):
     @classmethod
     def setUpClass(cls):
@@ -95,6 +96,7 @@ class DevtoolTest(OESDKExtTestCase):
         finally:
             self._run('devtool reset %s ' % package_nodejs)
 
+
 class SdkUpdateTest(OESDKExtTestCase):
     @classmethod
     def setUpClass(self):
diff --git a/meta/lib/oeqa/sdkext/context.py b/meta/lib/oeqa/sdkext/context.py
index 2ac2bf6ff7..63a7cd7c6b 100644
--- a/meta/lib/oeqa/sdkext/context.py
+++ b/meta/lib/oeqa/sdkext/context.py
@@ -7,6 +7,7 @@
 import os
 from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
 
+
 class OESDKExtTestContext(OESDKTestContext):
     esdk_files_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files")
 
@@ -18,6 +19,7 @@ class OESDKExtTestContext(OESDKTestContext):
             return True
         return self._hasPackage(self.host_pkg_manifest, pkg)
 
+
 class OESDKExtTestContextExecutor(OESDKTestContextExecutor):
     _context_class = OESDKExtTestContext
 
@@ -29,4 +31,5 @@ class OESDKExtTestContextExecutor(OESDKTestContextExecutor):
             [os.path.join(os.path.abspath(os.path.dirname(__file__)), 'cases')]
     default_test_data = None
 
+
 _executor_class = OESDKExtTestContextExecutor
diff --git a/meta/lib/oeqa/sdkext/testsdk.py b/meta/lib/oeqa/sdkext/testsdk.py
index 963531dfc6..6d552a8edf 100644
--- a/meta/lib/oeqa/sdkext/testsdk.py
+++ b/meta/lib/oeqa/sdkext/testsdk.py
@@ -6,6 +6,7 @@
 
 from oeqa.sdk.testsdk import TestSDKBase
 
+
 class TestSDKExt(TestSDKBase):
     def run(self, d):
         import os
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index 3d30618b97..b084831e0d 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -16,6 +16,7 @@ from oeqa.core.case import OETestCase
 
 import bb.utils
 
+
 class OESelftestTestCase(OETestCase):
     def __init__(self, methodName="runTest"):
         self._extra_tear_down_commands = []
@@ -229,6 +230,7 @@ class OESelftestTestCase(OETestCase):
         except OSError as e:
             if e.errno != errno.ENOENT:
                 raise
+
     def write_bblayers_config(self, data):
         """Write to <builddir>/conf/bblayers.inc"""
         self.logger.debug("Writing to: %s\n%s\n" % (self.testinc_bblayers_path, data))
diff --git a/meta/lib/oeqa/selftest/cases/archiver.py b/meta/lib/oeqa/selftest/cases/archiver.py
index dce77281c9..e283163dc9 100644
--- a/meta/lib/oeqa/selftest/cases/archiver.py
+++ b/meta/lib/oeqa/selftest/cases/archiver.py
@@ -7,6 +7,7 @@ import glob
 from oeqa.utils.commands import bitbake, get_bb_vars
 from oeqa.selftest.case import OESelftestTestCase
 
+
 class Archiver(OESelftestTestCase):
 
     def test_archiver_allows_to_filter_on_recipe_name(self):
@@ -117,8 +118,6 @@ class Archiver(OESelftestTestCase):
         excluded_present = len(glob.glob(src_path_target + '/%s-*' % target_recipes[1]))
         self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % target_recipes[1])
 
-
-
     def test_archiver_srpm_mode(self):
         """
         Test that in srpm mode, the added recipe dependencies at least exist/work [YOCTO #11121]
diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py
index 139c65978f..0fe0971193 100644
--- a/meta/lib/oeqa/selftest/cases/bblayers.py
+++ b/meta/lib/oeqa/selftest/cases/bblayers.py
@@ -10,6 +10,7 @@ from oeqa.utils.commands import runCmd, get_bb_var, get_bb_vars
 
 from oeqa.selftest.case import OESelftestTestCase
 
+
 class BitbakeLayers(OESelftestTestCase):
 
     def test_bitbakelayers_layerindexshowdepends(self):
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index d196bb16cf..4eb5cb1cad 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -10,6 +10,7 @@ from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
 
 from oeqa.selftest.case import OESelftestTestCase
 
+
 class BitbakeTests(OESelftestTestCase):
 
     def getline(self, res, line):
@@ -36,7 +37,6 @@ class BitbakeTests(OESelftestTestCase):
         os.chdir("/tmp/")
         self.assertEqual(bitbake('-e', env=my_env).status, 0, msg="bitbake couldn't run from /tmp/")
 
-
     def test_event_handler(self):
         self.write_config("INHERIT += \"test_events\"")
         result = bitbake('m4-native')
diff --git a/meta/lib/oeqa/selftest/cases/binutils.py b/meta/lib/oeqa/selftest/cases/binutils.py
index 2f6aeadffc..87b0e8b438 100644
--- a/meta/lib/oeqa/selftest/cases/binutils.py
+++ b/meta/lib/oeqa/selftest/cases/binutils.py
@@ -8,6 +8,7 @@ from oeqa.core.case import OEPTestResultTestCase
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars
 
+
 def parse_values(content):
     for i in content:
         for v in ["PASS", "FAIL", "XPASS", "XFAIL", "UNRESOLVED", "UNSUPPORTED", "UNTESTED", "ERROR", "WARNING"]:
@@ -15,6 +16,7 @@ def parse_values(content):
                 yield i[len(v) + 2:].strip(), v
                 break
 
+
 @OETestTag("toolchain-user", "toolchain-system")
 class BinutilsCrossSelfTest(OESelftestTestCase, OEPTestResultTestCase):
     def test_binutils(self):
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py
index dcc95e38ff..77740d98e8 100644
--- a/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -12,6 +12,7 @@ from oeqa.selftest.cases.buildhistory import BuildhistoryBase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
 import oeqa.utils.ftools as ftools
 
+
 class ImageOptionsTests(OESelftestTestCase):
 
     def test_incremental_image_generation(self):
@@ -55,6 +56,7 @@ class ImageOptionsTests(OESelftestTestCase):
         bitbake("core-image-sato core-image-weston")
         # do_image will fail if there are any pending postinsts
 
+
 class DiskMonTest(OESelftestTestCase):
 
     def test_stoptask_behavior(self):
@@ -70,6 +72,7 @@ class DiskMonTest(OESelftestTestCase):
         res = bitbake("delay -c delay")
         self.assertTrue('WARNING: The free space' in res.output, msg="A warning should have been displayed for disk monitor is set to WARN: %s" % res.output)
 
+
 class SanityOptionsTest(OESelftestTestCase):
     def getline(self, res, line):
         for l in res.output.split('\n'):
@@ -148,6 +151,7 @@ class BuildhistoryTests(BuildhistoryBase):
         self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True)
         self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True, error_regex=error)
 
+
 class ArchiverTest(OESelftestTestCase):
     def test_arch_work_dir_and_export_source(self):
         """
@@ -162,6 +166,7 @@ class ArchiverTest(OESelftestTestCase):
         tar_file_glob = str(pkgs_path[0]) + "/xcursor*.tar.gz"
         self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under %s/allarch*/xcursor*" % deploy_dir_src)
 
+
 class ToolchainOptions(OESelftestTestCase):
     def test_toolchain_fortran(self):
         """
@@ -172,6 +177,7 @@ class ToolchainOptions(OESelftestTestCase):
         self.write_config(features)
         bitbake('fortran-helloworld')
 
+
 class SourceMirroring(OESelftestTestCase):
     # Can we download everything from the Yocto Sources Mirror over http only
     def test_yocto_source_mirror(self):
diff --git a/meta/lib/oeqa/selftest/cases/containerimage.py b/meta/lib/oeqa/selftest/cases/containerimage.py
index 730ffe42c9..9911b19d2e 100644
--- a/meta/lib/oeqa/selftest/cases/containerimage.py
+++ b/meta/lib/oeqa/selftest/cases/containerimage.py
@@ -20,6 +20,8 @@ from oeqa.utils.commands import bitbake, get_bb_vars, runCmd
 # of them, but this test is more to catch if other packages get added by
 # default other than what is in ROOTFS_BOOTSTRAP_INSTALL.
 #
+
+
 class ContainerImageTests(OESelftestTestCase):
 
     # Verify that when specifying a IMAGE_TYPEDEP_ of the form "foo.bar" that
diff --git a/meta/lib/oeqa/selftest/cases/cve_check.py b/meta/lib/oeqa/selftest/cases/cve_check.py
index bd89e9335f..c843b19d04 100644
--- a/meta/lib/oeqa/selftest/cases/cve_check.py
+++ b/meta/lib/oeqa/selftest/cases/cve_check.py
@@ -1,6 +1,7 @@
 from oe.cve_check import Version
 from oeqa.selftest.case import OESelftestTestCase
 
+
 class CVECheck(OESelftestTestCase):
 
     def test_version_compare(self):
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index b90aac72bd..d79e705963 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -16,6 +16,7 @@ from oeqa.utils.commands import get_bb_vars, runqemu, get_test_layer
 
 oldmetapath = None
 
+
 def setUpModule():
     import bb.utils
 
@@ -67,9 +68,11 @@ def setUpModule():
             return layerpath
     bb.utils.edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb)
 
+
 def tearDownModule():
     if oldmetapath:
         edited_layers = []
+
         def bblayers_edit_cb(layerpath, canonical_layerpath):
             if not edited_layers and canonical_layerpath.endswith('/meta'):
                 edited_layers.append(layerpath)
@@ -80,6 +83,7 @@ def tearDownModule():
         bb.utils.edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb)
     shutil.rmtree(templayerdir)
 
+
 class DevtoolBase(OESelftestTestCase):
 
     @classmethod
@@ -173,7 +177,6 @@ class DevtoolBase(OESelftestTestCase):
                             value = set(value.split())
                     self.assertEqual(value, needvalue, 'values for %s do not match' % var)
 
-
         missingvars = {}
         for var, value in checkvars.items():
             if value is not None:
@@ -261,6 +264,7 @@ class DevtoolTests(DevtoolBase):
         self.assertNotIn(tempdir, result.output)
         self.assertIn(self.workspacedir, result.output)
 
+
 class DevtoolAddTests(DevtoolBase):
 
     def test_devtool_add(self):
@@ -536,6 +540,7 @@ class DevtoolAddTests(DevtoolBase):
         # Test devtool build
         result = runCmd('devtool build %s' % pn)
 
+
 class DevtoolModifyTests(DevtoolBase):
 
     def test_devtool_modify(self):
@@ -599,6 +604,7 @@ class DevtoolModifyTests(DevtoolBase):
         def assertFile(path, *paths):
             f = os.path.join(path, *paths)
             self.assertExists(f)
+
         def assertNoFile(path, *paths):
             f = os.path.join(path, *paths)
             self.assertNotExists(f)
@@ -697,6 +703,7 @@ class DevtoolModifyTests(DevtoolBase):
 
         self.assertTrue(bbclassextended, 'None of these recipes are BBCLASSEXTENDed to native - need to adjust testrecipes list: %s' % ', '.join(testrecipes))
         self.assertTrue(inheritnative, 'None of these recipes do "inherit native" - need to adjust testrecipes list: %s' % ', '.join(testrecipes))
+
     def test_devtool_modify_localfiles_only(self):
         # Check preconditions
         testrecipe = 'base-files'
@@ -824,6 +831,7 @@ class DevtoolModifyTests(DevtoolBase):
 
         self._check_src_repo(tempdir)
         source = os.path.join(tempdir, "source")
+
         def check(branch, expected):
             runCmd('git -C %s checkout %s' % (tempdir, branch))
             with open(source, "rt") as f:
@@ -834,6 +842,7 @@ class DevtoolModifyTests(DevtoolBase):
         check('devtool-override-qemuarm', 'This is a test for qemuarm\n')
         check('devtool-override-qemux86', 'This is a test for qemux86\n')
 
+
 class DevtoolUpdateTests(DevtoolBase):
 
     def test_devtool_update_recipe(self):
@@ -1295,6 +1304,7 @@ class DevtoolUpdateTests(DevtoolBase):
         expected_status = []
         self._check_repo_status(os.path.dirname(recipefile), expected_status)
 
+
 class DevtoolExtractTests(DevtoolBase):
 
     def test_devtool_extract(self):
@@ -1461,6 +1471,7 @@ class DevtoolExtractTests(DevtoolBase):
         if reqpkgs:
             self.fail('The following packages were not present in the image as expected: %s' % ', '.join(reqpkgs))
 
+
 class DevtoolUpgradeTests(DevtoolBase):
 
     def test_devtool_upgrade(self):
@@ -1667,7 +1678,6 @@ class DevtoolUpgradeTests(DevtoolBase):
         self.assertIn("0002-Add-a-comment-to-the-code.patch", newcontent, "New patch should have been added to the recipe but wasn't")
         self.assertIn("http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz", newcontent, "New recipe no longer has upstream source in SRC_URI")
 
-
     def test_devtool_finish_upgrade_otherlayer(self):
         recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn = self._setup_test_devtool_finish_upgrade()
         # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
@@ -1789,6 +1799,7 @@ class DevtoolUpgradeTests(DevtoolBase):
         recipever = '3.1.2'
         recipefile = os.path.join(self.workspacedir, 'recipes', recipename, '%s_%s.bb' % (recipename, recipever))
         url = 'http://downloads.yoctoproject.org/mirror/sources/i2c-tools-%s.tar.bz2' % recipever
+
         def add_recipe():
             result = runCmd('devtool add %s' % url)
             self.assertExists(recipefile, 'Expected recipe file not created')
diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py b/meta/lib/oeqa/selftest/cases/distrodata.py
index 0ad6e1ef91..186b3e19e7 100644
--- a/meta/lib/oeqa/selftest/cases/distrodata.py
+++ b/meta/lib/oeqa/selftest/cases/distrodata.py
@@ -9,6 +9,7 @@ from oeqa.utils.ftools import write_file
 
 import oe.recipeutils
 
+
 class Distrodata(OESelftestTestCase):
 
     def test_checkpkg(self):
diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py b/meta/lib/oeqa/selftest/cases/eSDK.py
index 1d185935e4..d40ff86c4a 100644
--- a/meta/lib/oeqa/selftest/cases/eSDK.py
+++ b/meta/lib/oeqa/selftest/cases/eSDK.py
@@ -10,6 +10,7 @@ import time
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
 
+
 class oeSDKExtSelfTest(OESelftestTestCase):
     """
     # Bugzilla Test Plan: 6033
diff --git a/meta/lib/oeqa/selftest/cases/efibootpartition.py b/meta/lib/oeqa/selftest/cases/efibootpartition.py
index a61cf9bcb3..189f5193cb 100644
--- a/meta/lib/oeqa/selftest/cases/efibootpartition.py
+++ b/meta/lib/oeqa/selftest/cases/efibootpartition.py
@@ -10,6 +10,7 @@ import re
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake, runqemu, get_bb_var
 
+
 class GenericEFITest(OESelftestTestCase):
     """EFI booting test class"""
 
diff --git a/meta/lib/oeqa/selftest/cases/fetch.py b/meta/lib/oeqa/selftest/cases/fetch.py
index cd15f65129..561b581618 100644
--- a/meta/lib/oeqa/selftest/cases/fetch.py
+++ b/meta/lib/oeqa/selftest/cases/fetch.py
@@ -9,6 +9,7 @@ import oe.path
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake
 
+
 class Fetch(OESelftestTestCase):
     def test_git_mirrors(self):
         """
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py
index 67000bb1c1..42f6756996 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -8,6 +8,7 @@ import os
 import json
 import re
 
+
 class FitImageTests(OESelftestTestCase):
 
     def test_fit_image(self):
@@ -87,7 +88,6 @@ FIT_DESC = "A model description"
                 "Fields in Image Tree Source File %s did not match, error in finding %s"
                 % (fitimage_its_path, its_field_check[field_index]))
 
-
     def test_sign_fit_image(self):
         """
         Summary:     Check if FIT image and Image Tree Source (its) are created
@@ -397,7 +397,6 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart U-Boot comment'"
                 "Fields in Image Tree Source File %s did not match, error in finding %s"
                 % (fitimage_its_path, its_field_check[field_index]))
 
-
     def test_sign_standalone_uboot_fit_image(self):
         """
         Summary:     Check if U-Boot FIT image and Image Tree Source (its) are
@@ -697,8 +696,6 @@ FIT_SIGN_INDIVIDUAL = "1"
         result = runCmd('grep "### uboot-mkimage signing wrapper message" %s/log.do_uboot_assemble_fitimage' % tempdir, ignore_status=True)
         self.assertEqual(result.status, 0, 'UBOOT_MKIMAGE_SIGN did not work')
 
-
-
     def test_initramfs_bundle(self):
         """
         Summary:     Verifies the content of the initramfs bundle node in the FIT Image Tree Source (its)
diff --git a/meta/lib/oeqa/selftest/cases/gcc.py b/meta/lib/oeqa/selftest/cases/gcc.py
index 46fd9813d6..843746418f 100644
--- a/meta/lib/oeqa/selftest/cases/gcc.py
+++ b/meta/lib/oeqa/selftest/cases/gcc.py
@@ -5,6 +5,7 @@ from oeqa.core.case import OEPTestResultTestCase
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu, Command
 
+
 def parse_values(content):
     for i in content:
         for v in ["PASS", "FAIL", "XPASS", "XFAIL", "UNRESOLVED", "UNSUPPORTED", "UNTESTED", "ERROR", "WARNING"]:
@@ -12,6 +13,7 @@ def parse_values(content):
                 yield i[len(v) + 2:].strip(), v
                 break
 
+
 class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
     def check_skip(self, suite):
         targets = get_bb_var("RUNTIMETARGET", "gcc-runtime").split()
@@ -76,74 +78,88 @@ class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
 
             return self.run_check(*args, ssh=qemu.ip, **kwargs)
 
+
 @OETestTag("toolchain-user")
 class GccCrossSelfTest(GccSelfTestBase):
     def test_cross_gcc(self):
         self.run_check("gcc")
 
+
 @OETestTag("toolchain-user")
 class GxxCrossSelfTest(GccSelfTestBase):
     def test_cross_gxx(self):
         self.run_check("g++")
 
+
 @OETestTag("toolchain-user")
 class GccLibAtomicSelfTest(GccSelfTestBase):
     def test_libatomic(self):
         self.run_check("libatomic")
 
+
 @OETestTag("toolchain-user")
 class GccLibGompSelfTest(GccSelfTestBase):
     def test_libgomp(self):
         self.run_check("libgomp")
 
+
 @OETestTag("toolchain-user")
 class GccLibStdCxxSelfTest(GccSelfTestBase):
     def test_libstdcxx(self):
         self.run_check("libstdc++-v3")
 
+
 @OETestTag("toolchain-user")
 class GccLibSspSelfTest(GccSelfTestBase):
     def test_libssp(self):
         self.check_skip("libssp")
         self.run_check("libssp")
 
+
 @OETestTag("toolchain-user")
 class GccLibItmSelfTest(GccSelfTestBase):
     def test_libitm(self):
         self.check_skip("libitm")
         self.run_check("libitm")
 
+
 @OETestTag("toolchain-system")
 class GccCrossSelfTestSystemEmulated(GccSelfTestBase):
     def test_cross_gcc(self):
         self.run_check_emulated("gcc")
 
+
 @OETestTag("toolchain-system")
 class GxxCrossSelfTestSystemEmulated(GccSelfTestBase):
     def test_cross_gxx(self):
         self.run_check_emulated("g++")
 
+
 @OETestTag("toolchain-system")
 class GccLibAtomicSelfTestSystemEmulated(GccSelfTestBase):
     def test_libatomic(self):
         self.run_check_emulated("libatomic")
 
+
 @OETestTag("toolchain-system")
 class GccLibGompSelfTestSystemEmulated(GccSelfTestBase):
     def test_libgomp(self):
         self.run_check_emulated("libgomp")
 
+
 @OETestTag("toolchain-system")
 class GccLibStdCxxSelfTestSystemEmulated(GccSelfTestBase):
     def test_libstdcxx(self):
         self.run_check_emulated("libstdc++-v3")
 
+
 @OETestTag("toolchain-system")
 class GccLibSspSelfTestSystemEmulated(GccSelfTestBase):
     def test_libssp(self):
         self.check_skip("libssp")
         self.run_check_emulated("libssp")
 
+
 @OETestTag("toolchain-system")
 class GccLibItmSelfTestSystemEmulated(GccSelfTestBase):
     def test_libitm(self):
diff --git a/meta/lib/oeqa/selftest/cases/glibc.py b/meta/lib/oeqa/selftest/cases/glibc.py
index 852c8635df..842b663bdc 100644
--- a/meta/lib/oeqa/selftest/cases/glibc.py
+++ b/meta/lib/oeqa/selftest/cases/glibc.py
@@ -7,6 +7,7 @@ from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu, Command
 from oeqa.utils.nfs import unfs_server
 
+
 def parse_values(content):
     for i in content:
         for v in ["PASS", "FAIL", "XPASS", "XFAIL", "UNRESOLVED", "UNSUPPORTED", "UNTESTED", "ERROR", "WARNING"]:
@@ -14,6 +15,7 @@ def parse_values(content):
                 yield i[len(v) + 2:].strip(), v
                 break
 
+
 class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
     def run_check(self, ssh=None):
         # configure ssh target
@@ -77,11 +79,13 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
 
             self.run_check(ssh=qemu.ip)
 
+
 @OETestTag("toolchain-user")
 class GlibcSelfTest(GlibcSelfTestBase):
     def test_glibc(self):
         self.run_check()
 
+
 @OETestTag("toolchain-system")
 class GlibcSelfTestSystemEmulated(GlibcSelfTestBase):
     def test_glibc(self):
diff --git a/meta/lib/oeqa/selftest/cases/image_typedep.py b/meta/lib/oeqa/selftest/cases/image_typedep.py
index 269fd556b7..13bddd10d2 100644
--- a/meta/lib/oeqa/selftest/cases/image_typedep.py
+++ b/meta/lib/oeqa/selftest/cases/image_typedep.py
@@ -7,6 +7,7 @@ import os
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake
 
+
 class ImageTypeDepTests(OESelftestTestCase):
 
     # Verify that when specifying a IMAGE_TYPEDEP_ of the form "foo.bar" that
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 07e46d5cfd..6f982b52c2 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -9,6 +9,7 @@ import glob
 import os
 import json
 
+
 class ImageFeatures(OESelftestTestCase):
 
     test_user = 'tester'
@@ -67,7 +68,6 @@ class ImageFeatures(OESelftestTestCase):
                 else:
                     self.assertEqual(status, 0, 'ssh to user tester failed with %s' % output)
 
-
     def test_wayland_support_in_image(self):
         """
         Summary:     Check Wayland support in image
diff --git a/meta/lib/oeqa/selftest/cases/incompatible_lic.py b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
index 152da6332a..22a38a3f1a 100644
--- a/meta/lib/oeqa/selftest/cases/incompatible_lic.py
+++ b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
@@ -1,6 +1,7 @@
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake
 
+
 class IncompatibleLicenseTests(OESelftestTestCase):
 
     def lic_test(self, pn, pn_lic, lic):
@@ -82,6 +83,7 @@ class IncompatibleLicenseTests(OESelftestTestCase):
     def test_incompatible_nonspdx_license(self):
         self.lic_test('incompatible-nonspdx-license', 'FooLicense', 'FooLicense')
 
+
 class IncompatibleLicensePerImageTests(OESelftestTestCase):
     def default_config(self):
         return """
@@ -115,6 +117,7 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
 
         bitbake('core-image-minimal')
 
+
 class NoGPL3InImagesTests(OESelftestTestCase):
     def test_core_image_minimal(self):
         self.write_config("""
diff --git a/meta/lib/oeqa/selftest/cases/kerneldevelopment.py b/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
index 697f6a94a5..5e35a0ba82 100644
--- a/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
+++ b/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
@@ -3,6 +3,7 @@ from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, get_bb_var
 from oeqa.utils.git import GitRepo
 
+
 class KernelDev(OESelftestTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/selftest/cases/layerappend.py b/meta/lib/oeqa/selftest/cases/layerappend.py
index 05e9426fc6..96f02f38d5 100644
--- a/meta/lib/oeqa/selftest/cases/layerappend.py
+++ b/meta/lib/oeqa/selftest/cases/layerappend.py
@@ -8,6 +8,7 @@ from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 import oeqa.utils.ftools as ftools
 
+
 class LayerAppendTests(OESelftestTestCase):
     layerconf = """
 # We have a conf and classes directory, append to BBPATH
diff --git a/meta/lib/oeqa/selftest/cases/liboe.py b/meta/lib/oeqa/selftest/cases/liboe.py
index afe8f8809f..40b049782d 100644
--- a/meta/lib/oeqa/selftest/cases/liboe.py
+++ b/meta/lib/oeqa/selftest/cases/liboe.py
@@ -7,6 +7,7 @@ from oeqa.utils.commands import get_bb_var, get_bb_vars, bitbake, runCmd
 import oe.path
 import os
 
+
 class LibOE(OESelftestTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/selftest/cases/lic_checksum.py b/meta/lib/oeqa/selftest/cases/lic_checksum.py
index bae935d697..9264ab048b 100644
--- a/meta/lib/oeqa/selftest/cases/lic_checksum.py
+++ b/meta/lib/oeqa/selftest/cases/lic_checksum.py
@@ -9,6 +9,7 @@ from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake
 from oeqa.utils import CommandError
 
+
 class LicenseTests(OESelftestTestCase):
 
     # Verify that changing a license file that has an absolute path causes
diff --git a/meta/lib/oeqa/selftest/cases/manifest.py b/meta/lib/oeqa/selftest/cases/manifest.py
index c7ba0ae5b7..f29cf4ae91 100644
--- a/meta/lib/oeqa/selftest/cases/manifest.py
+++ b/meta/lib/oeqa/selftest/cases/manifest.py
@@ -7,12 +7,15 @@ import os
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import get_bb_var, get_bb_vars, bitbake
 
+
 class ManifestEntry:
     '''A manifest item of a collection able to list missing packages'''
+
     def __init__(self, entry):
         self.file = entry
         self.missing = []
 
+
 class VerifyManifest(OESelftestTestCase):
     '''Tests for the manifest files and contents of an image'''
 
@@ -77,7 +80,6 @@ class VerifyManifest(OESelftestTestCase):
             self.skipTest("{}: Cannot setup testing scenario"
                     .format(self.classname))
 
-
         pkgdata_dir = reverse_dir = {}
         mfilename = mpath = m_entry = {}
         # get manifest location based on target to query about
diff --git a/meta/lib/oeqa/selftest/cases/meta_ide.py b/meta/lib/oeqa/selftest/cases/meta_ide.py
index 3c6371fba8..cf111fa781 100644
--- a/meta/lib/oeqa/selftest/cases/meta_ide.py
+++ b/meta/lib/oeqa/selftest/cases/meta_ide.py
@@ -9,6 +9,7 @@ from oeqa.core.decorator import OETestTag
 import tempfile
 import shutil
 
+
 @OETestTag("machine")
 class MetaIDE(OESelftestTestCase):
 
diff --git a/meta/lib/oeqa/selftest/cases/multiconfig.py b/meta/lib/oeqa/selftest/cases/multiconfig.py
index 39b92f2439..0b95cbc7ff 100644
--- a/meta/lib/oeqa/selftest/cases/multiconfig.py
+++ b/meta/lib/oeqa/selftest/cases/multiconfig.py
@@ -7,6 +7,7 @@ import textwrap
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake
 
+
 class MultiConfig(OESelftestTestCase):
 
     def test_multiconfig(self):
diff --git a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
index ad4ae8ccef..18a877ee72 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
@@ -8,6 +8,7 @@ import tempfile
 import operator
 from oeqa.utils.commands import get_bb_var
 
+
 class TestBlobParsing(OESelftestTestCase):
 
     def setUp(self):
@@ -99,6 +100,7 @@ class TestBlobParsing(OESelftestTestCase):
 
         self.assertEqual(defaultmap, var_changes, "Defaults not set properly")
 
+
 class TestFileListCompare(OESelftestTestCase):
 
     def test_compare_file_lists(self):
diff --git a/meta/lib/oeqa/selftest/cases/oelib/elf.py b/meta/lib/oeqa/selftest/cases/oelib/elf.py
index 5a5f9b4fdf..7788e82fd7 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/elf.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/elf.py
@@ -5,6 +5,7 @@
 from unittest.case import TestCase
 import oe.qa
 
+
 class TestElf(TestCase):
     def test_machine_name(self):
         """
diff --git a/meta/lib/oeqa/selftest/cases/oelib/license.py b/meta/lib/oeqa/selftest/cases/oelib/license.py
index 6ebbee589f..8536a80bfe 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/license.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/license.py
@@ -5,6 +5,7 @@
 from unittest.case import TestCase
 import oe.license
 
+
 class SeenVisitor(oe.license.LicenseVisitor):
     def __init__(self):
         self.seen = []
@@ -13,6 +14,7 @@ class SeenVisitor(oe.license.LicenseVisitor):
     def visit_Str(self, node):
         self.seen.append(node.s)
 
+
 class TestSingleLicense(TestCase):
     licenses = [
         "GPLv2",
@@ -41,6 +43,7 @@ class TestSingleLicense(TestCase):
                 self.parse(license)
             self.assertEqual(cm.exception.license, license)
 
+
 class TestSimpleCombinations(TestCase):
     tests = {
         "FOO&BAR": ["FOO", "BAR"],
@@ -62,6 +65,7 @@ class TestSimpleCombinations(TestCase):
             licenses = oe.license.flattened_licenses(license, choose)
             self.assertListEqual(licenses, expected)
 
+
 class TestComplexCombinations(TestSimpleCombinations):
     tests = {
         "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"],
@@ -71,6 +75,7 @@ class TestComplexCombinations(TestSimpleCombinations):
     }
     preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"]
 
+
 class TestIsIncluded(TestCase):
     tests = {
         ("FOO | BAR", None, None):
diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py b/meta/lib/oeqa/selftest/cases/oelib/path.py
index 5cfacfbd35..b5c8ea9ff4 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/path.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
@@ -10,6 +10,7 @@ import os
 import errno
 import shutil
 
+
 class TestRealPath(TestCase):
     DIRS = ["a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX", "usr/sbin", "usr/include", "usr/include/gdbm"]
     FILES = ["etc/passwd", "b/file"]
diff --git a/meta/lib/oeqa/selftest/cases/oelib/types.py b/meta/lib/oeqa/selftest/cases/oelib/types.py
index 7eb49e6f95..edaf7a3e01 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/types.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/types.py
@@ -5,6 +5,7 @@
 from unittest.case import TestCase
 from oe.maketype import create
 
+
 class TestBooleanType(TestCase):
     def test_invalid(self):
         self.assertRaises(ValueError, create, '', 'boolean')
@@ -35,6 +36,7 @@ class TestBooleanType(TestCase):
         self.assertEqual(create('y', 'boolean'), True)
         self.assertNotEqual(create('y', 'boolean'), False)
 
+
 class TestList(TestCase):
     def assertListEqual(self, value, valid, sep=None):
         obj = create(value, 'list', separator=sep)
diff --git a/meta/lib/oeqa/selftest/cases/oelib/utils.py b/meta/lib/oeqa/selftest/cases/oelib/utils.py
index a7214beb4c..426f94b258 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/utils.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/utils.py
@@ -8,6 +8,7 @@ from contextlib import contextmanager
 from io import StringIO
 from oe.utils import packages_filter_out_system, trim_version, multiprocess_launch
 
+
 class TestPackagesFilterOutSystem(TestCase):
     def test_filter(self):
         """
@@ -70,6 +71,7 @@ class TestMultiprocessLaunch(TestCase):
 
         def dummyerror(msg):
             print("ERROR: %s" % msg)
+
         def dummyfatal(msg):
             print("ERROR: %s" % msg)
             raise bb.BBHandledException()
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
index 7b20d374dd..cf432d9d35 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -11,6 +11,7 @@ from oeqa.selftest.cases.buildhistory import BuildhistoryBase
 from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
 from oeqa.utils import CommandError
 
+
 class BuildhistoryDiffTests(BuildhistoryBase):
 
     def test_buildhistory_diff(self):
@@ -34,6 +35,7 @@ class BuildhistoryDiffTests(BuildhistoryBase):
         if expected_endlines:
             self.fail('Missing expected line endings:\n  %s' % '\n  '.join(expected_endlines))
 
+
 @unittest.skipUnless(importlib.util.find_spec("cairo"), "Python cairo module is not present")
 class OEScriptTests(OESelftestTestCase):
 
@@ -47,6 +49,7 @@ class OEScriptTests(OESelftestTestCase):
 
     scripts_dir = os.path.join(get_bb_var('COREBASE'), 'scripts')
 
+
 class OEPybootchartguyTests(OEScriptTests):
 
     def test_pybootchartguy_help(self):
@@ -122,12 +125,14 @@ class OEGitproxyTests(OESelftestTestCase):
             self.skipTest("No \"dash\" found on test system.")
         self.run_oegitproxy(custom_shell=dash)
 
+
 class OeRunNativeTest(OESelftestTestCase):
     def test_oe_run_native(self):
         bitbake("qemu-helper-native -c addto_recipe_sysroot")
         result = runCmd("oe-run-native qemu-helper-native tunctl -h")
         self.assertIn("Delete: tunctl -d device-name [-f tun-clone-device]", result.output)
 
+
 class OEListPackageconfigTests(OEScriptTests):
     #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags
     def check_endlines(self, results, expected_endlines): 
@@ -140,8 +145,8 @@ class OEListPackageconfigTests(OEScriptTests):
         if expected_endlines:
             self.fail('Missing expected listings:\n  %s' % '\n  '.join(expected_endlines))
 
-
     #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags
+
     def test_packageconfig_flags_help(self):
         runCmd('%s/contrib/list-packageconfig-flags.py -h' % self.scripts_dir)
 
@@ -154,7 +159,6 @@ class OEListPackageconfigTests(OEScriptTests):
 
         self.check_endlines(results, expected_endlines)
 
-
     def test_packageconfig_flags_option_flags(self):
         results = runCmd('%s/contrib/list-packageconfig-flags.py -f' % self.scripts_dir)
         expected_endlines = []
diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py
index eb39136b43..6770dcaea1 100644
--- a/meta/lib/oeqa/selftest/cases/package.py
+++ b/meta/lib/oeqa/selftest/cases/package.py
@@ -10,6 +10,7 @@ import os
 import oe.path
 import re
 
+
 class VersionOrdering(OESelftestTestCase):
     # version1, version2, sort order
     tests = (
@@ -88,6 +89,7 @@ class VersionOrdering(OESelftestTestCase):
             self.assertIn(status, (99, 100, 101))
             self.assertEqual(status - 100, sort, "%s %s (%d) failed" % (ver1, ver2, sort))
 
+
 class PackageTests(OESelftestTestCase):
     # Verify that a recipe which sets up hardlink files has those preserved into split packages
     # Also test file sparseness is preserved
@@ -159,6 +161,7 @@ class PackageTests(OESelftestTestCase):
         bitbake("core-image-minimal")
 
         sysconfdir = get_bb_var('sysconfdir', 'selftest-chown')
+
         def check_ownership(qemu, gid, uid, path):
             self.logger.info("Check ownership of %s", path)
             status, output = qemu.run_serial(r'/bin/stat -c "%U %G" ' + path, timeout=60)
diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
index fb8b412848..c1a12cb438 100644
--- a/meta/lib/oeqa/selftest/cases/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -9,6 +9,7 @@ import fnmatch
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
 
+
 class OePkgdataUtilTests(OESelftestTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/selftest/cases/prservice.py b/meta/lib/oeqa/selftest/cases/prservice.py
index 578b2b4dd9..0b248addda 100644
--- a/meta/lib/oeqa/selftest/cases/prservice.py
+++ b/meta/lib/oeqa/selftest/cases/prservice.py
@@ -12,6 +12,7 @@ from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 from oeqa.utils.network import get_free_port
 
+
 class BitbakePrTests(OESelftestTestCase):
 
     @classmethod
diff --git a/meta/lib/oeqa/selftest/cases/pseudo.py b/meta/lib/oeqa/selftest/cases/pseudo.py
index 33593d5ce9..6b705d6261 100644
--- a/meta/lib/oeqa/selftest/cases/pseudo.py
+++ b/meta/lib/oeqa/selftest/cases/pseudo.py
@@ -8,6 +8,7 @@ import shutil
 from oeqa.utils.commands import bitbake, get_test_layer
 from oeqa.selftest.case import OESelftestTestCase
 
+
 class Pseudo(OESelftestTestCase):
 
     def test_pseudo_pyc_creation(self):
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index 9d56e9e1e3..679a3b61dc 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -13,6 +13,7 @@ from oeqa.selftest.cases import devtool
 
 templayerdir = None
 
+
 def setUpModule():
     global templayerdir
     templayerdir = tempfile.mkdtemp(prefix='recipetoolqa')
@@ -652,8 +653,6 @@ class RecipetoolAppendsrcBase(RecipetoolBase):
         self.assertIn(filesdir, filesextrapaths)
 
 
-
-
 class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
 
     def test_recipetool_appendsrcfile_basic(self):
diff --git a/meta/lib/oeqa/selftest/cases/recipeutils.py b/meta/lib/oeqa/selftest/cases/recipeutils.py
index 747870383b..4883d15b51 100644
--- a/meta/lib/oeqa/selftest/cases/recipeutils.py
+++ b/meta/lib/oeqa/selftest/cases/recipeutils.py
@@ -61,7 +61,6 @@ class RecipeUtilsTests(OESelftestTestCase):
         self.maxDiff = None
         self.assertEqual(''.join(patchlines).strip(), expected_patch.strip())
 
-
     def test_patch_recipe_singleappend(self):
         import oe.recipeutils
         rd = tinfoil.parse_recipe('recipeutils-test')
@@ -88,7 +87,6 @@ class RecipeUtilsTests(OESelftestTestCase):
                 patchlines.append(line)
         self.assertEqual(''.join(patchlines).strip(), expected_patch.strip())
 
-
     def test_patch_recipe_appends(self):
         import oe.recipeutils
         rd = tinfoil.parse_recipe('recipeutils-test')
@@ -113,7 +111,6 @@ class RecipeUtilsTests(OESelftestTestCase):
                 patchlines.append(line)
         self.assertEqual(''.join(patchlines).strip(), expected_patch.strip())
 
-
     def test_validate_pn(self):
         import oe.recipeutils
         expected_results = {
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index a62757399b..d2053b1473 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -36,6 +36,7 @@ exclude_packages = [
 	'ruby-ri-docs'
 	]
 
+
 def is_excluded(package):
     package_name = os.path.basename(package)
     for i in exclude_packages:
@@ -43,10 +44,12 @@ def is_excluded(package):
             return i
     return None
 
+
 MISSING = 'MISSING'
 DIFFERENT = 'DIFFERENT'
 SAME = 'SAME'
 
+
 @functools.total_ordering
 class CompareResult(object):
     def __init__(self):
@@ -60,6 +63,7 @@ class CompareResult(object):
     def __lt__(self, other):
         return (self.status, self.test) < (other.status, other.test)
 
+
 class PackageCompareResults(object):
     def __init__(self):
         self.total = []
@@ -96,6 +100,7 @@ class PackageCompareResults(object):
     def unused_exclusions(self):
         return sorted(set(exclude_packages) - self.active_exclusions)
 
+
 def compare_file(reference, test, diffutils_sysroot):
     result = CompareResult()
     result.reference = reference
@@ -114,10 +119,12 @@ def compare_file(reference, test, diffutils_sysroot):
     result.status = SAME
     return result
 
+
 def run_diffoscope(a_dir, b_dir, html_dir, **kwargs):
     return runCmd(['diffoscope', '--no-default-limits', '--exclude-directory-metadata', 'yes', '--html-dir', html_dir, a_dir, b_dir],
                 **kwargs)
 
+
 class DiffoscopeTests(OESelftestTestCase):
     diffoscope_test_files = os.path.join(os.path.dirname(os.path.abspath(__file__)), "diffoscope")
 
@@ -140,6 +147,7 @@ class DiffoscopeTests(OESelftestTestCase):
             self.assertNotEqual(r.status, 0, msg="diffoscope was successful when an error was expected")
             self.assertTrue(os.path.exists(os.path.join(tmpdir, 'index.html')), "HTML index not found!")
 
+
 class ReproducibleTests(OESelftestTestCase):
     # Test the reproducibility of whatever is built between sstate_targets and targets
 
diff --git a/meta/lib/oeqa/selftest/cases/resulttooltests.py b/meta/lib/oeqa/selftest/cases/resulttooltests.py
index dac5c46801..aa3b87c031 100644
--- a/meta/lib/oeqa/selftest/cases/resulttooltests.py
+++ b/meta/lib/oeqa/selftest/cases/resulttooltests.py
@@ -12,6 +12,7 @@ from resulttool import regression as regression
 from resulttool import resultutils as resultutils
 from oeqa.selftest.case import OESelftestTestCase
 
+
 class ResultToolTests(OESelftestTestCase):
     base_results_data = {'base_result1': {'configuration': {"TEST_TYPE": "runtime",
                                                             "TESTSERIES": "series1",
diff --git a/meta/lib/oeqa/selftest/cases/runcmd.py b/meta/lib/oeqa/selftest/cases/runcmd.py
index fa6113d7fa..bef723c588 100644
--- a/meta/lib/oeqa/selftest/cases/runcmd.py
+++ b/meta/lib/oeqa/selftest/cases/runcmd.py
@@ -11,6 +11,7 @@ import threading
 import time
 import signal
 
+
 class MemLogger(object):
     def __init__(self):
         self.info_msgs = []
@@ -22,6 +23,7 @@ class MemLogger(object):
     def error(self, msg):
         self.error_msgs.append(msg)
 
+
 class RunCmdTests(OESelftestTestCase):
     """ Basic tests for runCmd() utility function """
 
diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py
index b7656296f2..0b2ed88a1a 100644
--- a/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -12,6 +12,7 @@ from oeqa.core.decorator import OETestTag
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd
 
+
 class RunqemuTests(OESelftestTestCase):
     """Runqemu test class"""
 
@@ -72,7 +73,6 @@ SYSLINUX_TIMEOUT = "10"
             with open(qemu.qemurunnerlog) as f:
                 self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read()))
 
-
     def test_boot_recipe_image_vmdk(self):
         """Test runqemu recipe-image vmdk"""
         cmd = "%s %s wic.vmdk" % (self.cmd_common, self.recipe)
@@ -94,7 +94,6 @@ SYSLINUX_TIMEOUT = "10"
             with open(qemu.qemurunnerlog) as f:
                 self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read()))
 
-
     def test_boot_deploy_hddimg(self):
         """Test runqemu deploy_dir_image hddimg"""
         cmd = "%s %s hddimg" % (self.cmd_common, self.deploy_dir_image)
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 02eaf213cb..95c37e2ec9 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -12,6 +12,7 @@ import shutil
 import oe.lsb
 from oeqa.core.decorator.data import skipIfNotQemu
 
+
 class TestExport(OESelftestTestCase):
 
     def test_testexport_basic(self):
@@ -235,6 +236,7 @@ class TestImage(OESelftestTestCase):
         bitbake('core-image-minimal')
         bitbake('-c testimage core-image-minimal')
 
+
 class Postinst(OESelftestTestCase):
 
     def init_manager_loop(self, init_manager):
@@ -273,8 +275,6 @@ class Postinst(OESelftestTestCase):
                         status, output = qemu.run_serial("test -f %s && echo found" % os.path.join(targettestdir, filename))
                         self.assertIn("found", output, "%s was not present on boot" % filename)
 
-
-
     @skipIfNotQemu('qemuall', 'Test only runs in qemu')
     def test_postinst_rootfs_and_boot_sysvinit(self):
         """
@@ -295,7 +295,6 @@ class Postinst(OESelftestTestCase):
         """
         self.init_manager_loop("sysvinit")
 
-
     @skipIfNotQemu('qemuall', 'Test only runs in qemu')
     def test_postinst_rootfs_and_boot_systemd(self):
         """
@@ -317,7 +316,6 @@ class Postinst(OESelftestTestCase):
 
         self.init_manager_loop("systemd")
 
-
     def test_failing_postinst(self):
         """
         Summary:        The purpose of this test case is to verify that post-installation
@@ -352,6 +350,7 @@ class Postinst(OESelftestTestCase):
                 self.assertFalse(os.path.isfile(os.path.join(hosttestdir, "rootfs-after-failure")),
                                     "rootfs-after-failure file was created")
 
+
 class SystemTap(OESelftestTestCase):
         """
         Summary:        The purpose of this test case is to verify native crosstap
diff --git a/meta/lib/oeqa/selftest/cases/selftest.py b/meta/lib/oeqa/selftest/cases/selftest.py
index af080dcf03..a5d9a06d36 100644
--- a/meta/lib/oeqa/selftest/cases/selftest.py
+++ b/meta/lib/oeqa/selftest/cases/selftest.py
@@ -7,6 +7,7 @@ from oeqa.utils.commands import runCmd
 import oeqa.selftest
 from oeqa.selftest.case import OESelftestTestCase
 
+
 class ExternalLayer(OESelftestTestCase):
 
     def test_list_imported(self):
@@ -33,6 +34,7 @@ class ExternalLayer(OESelftestTestCase):
         found_method = search_method(test_module, method_name)
         self.assertTrue(method_name, msg="Can't find %s method" % method_name)
 
+
 def search_test_file(file_name):
     for layer_path in oeqa.selftest.__path__:
         for _, _, files in os.walk(layer_path):
@@ -41,6 +43,7 @@ def search_test_file(file_name):
                     return True
     return False
 
+
 def search_method(module, method):
     modlib = importlib.import_module(module)
     for var in vars(modlib):
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py
index a28c7eb19a..865a71e93e 100644
--- a/meta/lib/oeqa/selftest/cases/signing.py
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -34,7 +34,6 @@ class Signing(OESelftestTestCase):
         runCmd('gpg --agent-program=`which gpg-agent`\|--auto-expand-secmem --batch --homedir %s --import %s %s' % (self.gpg_dir, self.pub_key_path, self.secret_key_path), native_sysroot=nsysroot)
         return nsysroot + get_bb_var("bindir_native")
 
-
     @contextmanager
     def create_new_builddir(self, builddir, newbuilddir):
         bb.utils.mkdirhier(newbuilddir)
@@ -120,7 +119,6 @@ class Signing(OESelftestTestCase):
         bitbake('-c clean core-image-minimal')
         bitbake('core-image-minimal')
 
-
     def test_signing_sstate_archive(self):
         """
         Summary:     Test that sstate archives can be signed
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index c3846f6771..175ce6a26d 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -14,6 +14,7 @@ from oeqa.selftest.cases.sstate import SStateBase
 
 import bb.siggen
 
+
 class SStateTests(SStateBase):
     def test_autorev_sstate_works(self):
         # Test that a git repository which changes is correctly handled by SRCREV = ${AUTOREV}
@@ -53,8 +54,8 @@ class SStateTests(SStateBase):
         result = runCmd('git add bar.txt; git commit -asm "add bar"', cwd=srcdir)
         bitbake("dbus-wait-test -c unpack")
 
-
     # Test sstate files creation and their location
+
     def run_test_sstate_creation(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True, should_pass=True):
         self.config_sstate(temp_sstate_location, [self.sstate_path])
 
@@ -121,8 +122,8 @@ class SStateTests(SStateBase):
         targets.append('linux-libc-headers')
         self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
 
-
     # Test rebuilding of distro-specific sstate files
+
     def run_test_rebuild_distro_specific_sstate(self, targets, temp_sstate_location=True):
         self.config_sstate(temp_sstate_location, [self.sstate_path])
 
@@ -163,9 +164,9 @@ class SStateTests(SStateBase):
     def test_rebuild_distro_specific_sstate_native_target(self):
         self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True)
 
-
     # Test the sstate-cache-management script. Each element in the global_config list is used with the corresponding element in the target_config list
     # global_config elements are expected to not generate any sstate files that would be removed by sstate-cache-management.sh (such as changing the value of MACHINE)
+
     def run_test_sstate_cache_management_script(self, target, global_config=[''], target_config=[''], ignore_patterns=[]):
         self.assertTrue(global_config)
         self.assertTrue(target_config)
@@ -291,7 +292,6 @@ BB_SIGNATURE_HANDLER = "OEBasicHash"
         self.maxDiff = None
         self.assertCountEqual(files1, files2)
 
-
     def test_sstate_nativelsbstring_same_hash(self):
         """
         The sstate checksums should be independent of whichever NATIVELSBSTRING is
@@ -448,7 +448,6 @@ BB_SIGNATURE_HANDLER = "OEBasicHash"
         self.maxDiff = None
         self.assertCountEqual(files1, files2)
 
-
     def test_sstate_multilib_or_not_native_samesigs(self):
         """The sstate checksums of two native recipes (and their dependencies)
         where the target is using multilib in one but not the other
@@ -488,7 +487,6 @@ BB_SIGNATURE_HANDLER = "OEBasicHash"
         self.maxDiff = None
         self.assertCountEqual(files1, files2)
 
-
     def test_sstate_noop_samesigs(self):
         """
         The sstate checksums of two builds with these variables changed or
diff --git a/meta/lib/oeqa/selftest/cases/sysroot.py b/meta/lib/oeqa/selftest/cases/sysroot.py
index c884488025..937bc49af6 100644
--- a/meta/lib/oeqa/selftest/cases/sysroot.py
+++ b/meta/lib/oeqa/selftest/cases/sysroot.py
@@ -7,6 +7,7 @@ import uuid
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake
 
+
 class SysrootTests(OESelftestTestCase):
     def test_sysroot_cleanup(self):
         """
diff --git a/meta/lib/oeqa/selftest/cases/tinfoil.py b/meta/lib/oeqa/selftest/cases/tinfoil.py
index a51c6048d3..01c2ffe5ee 100644
--- a/meta/lib/oeqa/selftest/cases/tinfoil.py
+++ b/meta/lib/oeqa/selftest/cases/tinfoil.py
@@ -11,6 +11,7 @@ import bb.tinfoil
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd
 
+
 class TinfoilTests(OESelftestTestCase):
     """ Basic tests for the tinfoil API """
 
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index e2b2d28b25..36ab91c4f2 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -44,6 +44,7 @@ def only_for_arch(archs, image='core-image-minimal'):
         return wrapped_f
     return wrapper
 
+
 def extract_files(debugfs_output):
     """
     extract file names from the output of debugfs -R 'ls -p',
@@ -62,6 +63,7 @@ def extract_files(debugfs_output):
     return [line.split('/')[5].strip() for line in
             debugfs_output.strip().split('/\n')]
 
+
 def files_own_by_root(debugfs_output):
     for line in debugfs_output.strip().split('/\n'):
         if line.split('/')[3:5] != ['0', '0']:
@@ -69,6 +71,7 @@ def files_own_by_root(debugfs_output):
             return False
     return True
 
+
 class WicTestCase(OESelftestTestCase):
     """Wic test class."""
 
@@ -110,6 +113,7 @@ class WicTestCase(OESelftestTestCase):
             WicTestCase.wicenv_cache[image] = os.path.join(stdir, machine, 'imgdata')
         return WicTestCase.wicenv_cache[image]
 
+
 class Wic(WicTestCase):
 
     def test_version(self):
@@ -685,6 +689,7 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc
                                       % (wks_file, self.resultdir), ignore_status=True).status)
         os.remove(wks_file)
 
+
 class Wic2(WicTestCase):
 
     def test_bmap_short(self):
@@ -1220,7 +1225,6 @@ class Wic2(WicTestCase):
                     os.path.basename(testfile.name), dest, sysroot))
             self.assertTrue(os.path.exists(dest))
 
-
     def test_wic_rm(self):
         """Test removing files and directories from the the wic image."""
         runCmd("wic create mkefidisk "
@@ -1369,7 +1373,6 @@ class Wic2(WicTestCase):
             runCmd("wic cp %s:2/etc/fstab %s -n %s" % (images[0], testfile.name, sysroot))
             self.assertTrue(os.stat(testfile.name).st_size > 0)
 
-
     def test_wic_rm_ext(self):
         """Test removing files from the ext partition."""
         runCmd("wic create mkefidisk "
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index 21c5004ad7..e4d3d88b54 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -22,6 +22,7 @@ from oeqa.core.exception import OEQAPreRun, OEQATestNotFound
 
 from oeqa.utils.commands import runCmd, get_bb_vars, get_test_layer
 
+
 class NonConcurrentTestSuite(unittest.TestSuite):
     def __init__(self, suite, processes, setupfunc, removefunc):
         super().__init__([suite])
@@ -37,6 +38,7 @@ class NonConcurrentTestSuite(unittest.TestSuite):
         if newbuilddir and ret.wasSuccessful() and self.removefunc:
             self.removefunc(newbuilddir)
 
+
 def removebuilddir(d):
     delay = 5
     while delay and os.path.exists(d + "/bitbake.lock"):
@@ -53,6 +55,7 @@ def removebuilddir(d):
             pass
     bb.utils.prunedir(d, ionice=True)
 
+
 class OESelftestTestContext(OETestContext):
     def __init__(self, td=None, logger=None, machines=None, config_paths=None, newbuilddir=None, keep_builddir=None):
         super(OESelftestTestContext, self).__init__(td, logger)
@@ -140,6 +143,7 @@ class OESelftestTestContext(OETestContext):
     def listTests(self, display_type, machine=None):
         return super(OESelftestTestContext, self).listTests(display_type)
 
+
 class OESelftestTestContextExecutor(OETestContextExecutor):
     _context_class = OESelftestTestContext
     _script_executor = 'oe-selftest'
@@ -409,4 +413,5 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
 
         return rc
 
+
 _executor_class = OESelftestTestContextExecutor
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 49c9f5ad92..ab0dd3fac3 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -21,6 +21,7 @@ from oeqa.utils.dump import MonitorDumper
 from oeqa.controllers.testtargetloader import TestTargetLoader
 from abc import ABCMeta, abstractmethod
 
+
 class BaseTarget(object, metaclass=ABCMeta):
 
     supported_image_fstypes = []
@@ -87,7 +88,6 @@ class BaseTarget(object, metaclass=ABCMeta):
         return self.connection.copy_from(remotepath, localpath)
 
 
-
 class QemuTarget(BaseTarget):
 
     supported_image_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
diff --git a/meta/lib/oeqa/utils/__init__.py b/meta/lib/oeqa/utils/__init__.py
index fb81c136f0..40af6e73f8 100644
--- a/meta/lib/oeqa/utils/__init__.py
+++ b/meta/lib/oeqa/utils/__init__.py
@@ -7,14 +7,17 @@ __path__ = extend_path(__path__, __name__)
 
 # Borrowed from CalledProcessError
 
+
 class CommandError(Exception):
     def __init__(self, retcode, cmd, output=None):
         self.retcode = retcode
         self.cmd = cmd
         self.output = output
+
     def __str__(self):
         return "Command '%s' returned non-zero exit status %d with output: %s" % (self.cmd, self.retcode, self.output)
 
+
 def avoid_paths_in_environ(paths):
     """
         Searches for every path in os.environ['PATH']
@@ -39,6 +42,7 @@ def avoid_paths_in_environ(paths):
     new_path = new_path[:-1]
     return new_path
 
+
 def make_logger_bitbake_compatible(logger):
     import logging
 
@@ -53,6 +57,7 @@ def make_logger_bitbake_compatible(logger):
 
     return logger
 
+
 def load_test_components(logger, executor):
     import sys
     import os
diff --git a/meta/lib/oeqa/utils/buildproject.py b/meta/lib/oeqa/utils/buildproject.py
index e6d80cc8dc..1bea6057b9 100644
--- a/meta/lib/oeqa/utils/buildproject.py
+++ b/meta/lib/oeqa/utils/buildproject.py
@@ -14,6 +14,7 @@ import tempfile
 
 from abc import ABCMeta, abstractmethod
 
+
 class BuildProject(metaclass=ABCMeta):
     def __init__(self, uri, foldername=None, tmpdir=None, dl_dir=None):
         self.uri = uri
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 3f297967ab..1b13c5df22 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -9,7 +9,6 @@
 # It provides a class and methods for running commands on the host in a convienent way for tests.
 
 
-
 import os
 import sys
 import signal
@@ -27,6 +26,7 @@ try:
 except ImportError:
     pass
 
+
 class Command(object):
     def __init__(self, command, bg=False, timeout=None, data=None, output_log=None, **options):
 
@@ -238,6 +238,7 @@ def get_bb_env(target=None, postconfig=None):
     else:
         return bitbake("-e", postconfig=postconfig).output
 
+
 def get_bb_vars(variables=None, target=None, postconfig=None):
     """Get values of multiple bitbake variables"""
     bbenv = get_bb_env(target, postconfig=postconfig)
@@ -277,9 +278,11 @@ def get_bb_vars(variables=None, target=None, postconfig=None):
             values[var] = None
     return values
 
+
 def get_bb_var(var, target=None, postconfig=None):
     return get_bb_vars([var], target, postconfig)[var]
 
+
 def get_test_layer():
     layers = get_bb_var("BBLAYERS").split()
     testlayer = None
@@ -291,6 +294,7 @@ def get_test_layer():
             break
     return testlayer
 
+
 def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec='recipes-*/*'):
     os.makedirs(os.path.join(templayerdir, 'conf'))
     with open(os.path.join(templayerdir, 'conf', 'layer.conf'), 'w') as f:
@@ -303,6 +307,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec=
         f.write('BBFILE_PATTERN_IGNORE_EMPTY_%s = "1"\n' % templayername)
         f.write('LAYERSERIES_COMPAT_%s = "${LAYERSERIES_COMPAT_core}"\n' % templayername)
 
+
 @contextlib.contextmanager
 def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True):
     """
@@ -361,6 +366,7 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None,
         targetlogger.removeHandler(handler)
         qemu.stop()
 
+
 def updateEnv(env_file):
     """
     Source a file and update environment.
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 752e4e6208..498b41dced 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -17,6 +17,8 @@ import signal
 from functools import wraps
 
 #get the "result" object from one of the upper frames provided that one of these upper frames is a unittest.case frame
+
+
 class getResults(object):
     def __init__(self):
         #dynamically determine the unittest.case frame and use it to get the name of the test method
@@ -53,6 +55,7 @@ class getResults(object):
     def getSkipList(self):
         return self.skiplist
 
+
 class skipIfFailure(object):
 
     def __init__(self, testcase):
@@ -68,6 +71,7 @@ class skipIfFailure(object):
         wrapped_f.__name__ = f.__name__
         return wrapped_f
 
+
 class skipIfSkipped(object):
 
     def __init__(self, testcase):
@@ -83,6 +87,7 @@ class skipIfSkipped(object):
         wrapped_f.__name__ = f.__name__
         return wrapped_f
 
+
 class skipUnlessPassed(object):
 
     def __init__(self, testcase):
@@ -101,6 +106,7 @@ class skipUnlessPassed(object):
         wrapped_f._depends_on = self.testcase
         return wrapped_f
 
+
 class testcase(object):
     def __init__(self, test_case):
         self.test_case = test_case
@@ -113,12 +119,15 @@ class testcase(object):
         wrapped_f.__name__ = func.__name__
         return wrapped_f
 
+
 class NoParsingFilter(logging.Filter):
     def filter(self, record):
         return record.levelno == 100
 
+
 import inspect
 
+
 def LogResults(original_class):
     orig_method = original_class.run
 
@@ -215,15 +224,18 @@ def LogResults(original_class):
 
     return original_class
 
+
 class TimeOut(BaseException):
     pass
 
+
 def timeout(seconds):
     def decorator(fn):
         if hasattr(signal, 'alarm'):
             @wraps(fn)
             def wrapped_f(*args, **kw):
                 current_frame = sys._getframe()
+
                 def raiseTimeOut(signal, frame):
                     if frame is not current_frame:
                         raise TimeOut('%s seconds' % seconds)
@@ -239,7 +251,10 @@ def timeout(seconds):
             return fn
     return decorator
 
+
 __tag_prefix = "tag__"
+
+
 def tag(*args, **kwargs):
     """Decorator that adds attributes to classes or functions
     for use with the Attribute (-a) plugin.
@@ -252,6 +267,7 @@ def tag(*args, **kwargs):
         return ob
     return wrap_ob
 
+
 def gettag(obj, key, default=None):
     key = __tag_prefix + key
     if not isinstance(obj, unittest.TestCase):
@@ -260,6 +276,7 @@ def gettag(obj, key, default=None):
     ret = getattr(tc_method, key, getattr(obj, key, default))
     return ret
 
+
 def getAllTags(obj):
     def __gettags(o):
         r = {k[len(__tag_prefix):]: getattr(o, k) for k in dir(o) if k.startswith(__tag_prefix)}
@@ -271,12 +288,14 @@ def getAllTags(obj):
     ret.update(__gettags(tc_method))
     return ret
 
+
 def timeout_handler(seconds):
     def decorator(fn):
         if hasattr(signal, 'alarm'):
             @wraps(fn)
             def wrapped_f(self, *args, **kw):
                 current_frame = sys._getframe()
+
                 def raiseTimeOut(signal, frame):
                     if frame is not current_frame:
                         try:
diff --git a/meta/lib/oeqa/utils/dump.py b/meta/lib/oeqa/utils/dump.py
index 843e19fe8a..5d195dd50c 100644
--- a/meta/lib/oeqa/utils/dump.py
+++ b/meta/lib/oeqa/utils/dump.py
@@ -10,6 +10,7 @@ import datetime
 import itertools
 from .commands import runCmd
 
+
 class BaseDumper(object):
     """ Base class to dump commands from host/target """
 
@@ -68,6 +69,7 @@ class BaseDumper(object):
             with open(fullname, 'w') as dump_file:
                 dump_file.write(output)
 
+
 class HostDumper(BaseDumper):
     """ Class to get dumps from the host running the tests """
 
@@ -84,6 +86,7 @@ class HostDumper(BaseDumper):
             result = runCmd(cmd, ignore_status=True, env=env)
             self._write_dump(cmd.split()[0], result.output)
 
+
 class TargetDumper(BaseDumper):
     """ Class to get dumps from target, it only works with QemuRunner """
 
@@ -104,6 +107,7 @@ class TargetDumper(BaseDumper):
                         "serial console failed")
                 print("Failed CMD: %s" % (cmd))
 
+
 class MonitorDumper(BaseDumper):
     """ Class to get dumps via the Qemu Monitor, it only works with QemuRunner """
 
diff --git a/meta/lib/oeqa/utils/ftools.py b/meta/lib/oeqa/utils/ftools.py
index 3093419cc7..d5f9ce2f59 100644
--- a/meta/lib/oeqa/utils/ftools.py
+++ b/meta/lib/oeqa/utils/ftools.py
@@ -6,6 +6,7 @@ import os
 import re
 import errno
 
+
 def write_file(path, data):
     # In case data is None, return immediately
     if data is None:
@@ -14,6 +15,7 @@ def write_file(path, data):
     with open(path, "w") as f:
         f.write(wdata)
 
+
 def append_file(path, data):
     # In case data is None, return immediately
     if data is None:
@@ -22,12 +24,14 @@ def append_file(path, data):
     with open(path, "a") as f:
             f.write(wdata)
 
+
 def read_file(path):
     data = None
     with open(path) as f:
         data = f.read()
     return data
 
+
 def remove_from_file(path, data):
     # In case data is None, return immediately
     if data is None:
diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py
index ea35a766eb..b3d96d1562 100644
--- a/meta/lib/oeqa/utils/git.py
+++ b/meta/lib/oeqa/utils/git.py
@@ -13,8 +13,10 @@ class GitError(Exception):
     """Git error handling"""
     pass
 
+
 class GitRepo(object):
     """Class representing a Git repository clone"""
+
     def __init__(self, path, is_topdir=False):
         git_dir = self._run_git_cmd_at(['rev-parse', '--git-dir'], path)
         git_dir = git_dir if os.path.isabs(git_dir) else os.path.join(path, git_dir)
diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py
index 271f42770c..13713d9eca 100644
--- a/meta/lib/oeqa/utils/gitarchive.py
+++ b/meta/lib/oeqa/utils/gitarchive.py
@@ -14,9 +14,11 @@ from operator import attrgetter
 from collections import namedtuple
 from oeqa.utils.git import GitRepo, GitError
 
+
 class ArchiveError(Exception):
     """Internal error handling of this script"""
 
+
 def format_str(string, fields):
     """Format string using the given fields (dict)"""
     try:
@@ -127,6 +129,7 @@ def expand_tag_strings(repo, name_pattern, msg_subj_pattern, msg_body_pattern,
     msg_body = format_str(msg_body_pattern, keyws)
     return tag_name, msg_subj + '\n\n' + msg_body
 
+
 def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_msg_body, branch_name, no_tag, tagname, tag_msg_subject, tag_msg_body, exclude, notes, push, keywords, log):
 
     if not os.path.isdir(data_dir):
@@ -166,9 +169,11 @@ def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_ms
         log.info("Pushing data to remote")
         data_repo.run_cmd(cmd)
 
+
 # Container class for tester revisions
 TestedRev = namedtuple('TestedRev', 'commit commit_number tags')
 
+
 def get_test_runs(log, repo, tag_name, **kwargs):
     """Get a sorted list of test runs, matching given pattern"""
     # First, get field names from the tag name pattern
@@ -205,6 +210,7 @@ def get_test_runs(log, repo, tag_name, **kwargs):
     # Return field names and a sorted list of revs
     return undef_fields, sorted(revs)
 
+
 def get_test_revs(log, repo, tag_name, **kwargs):
     """Get list of all tested revisions"""
     fields, runs = get_test_runs(log, repo, tag_name, **kwargs)
@@ -228,6 +234,7 @@ def get_test_revs(log, repo, tag_name, **kwargs):
               "\n    ".join(['{} ({})'.format(rev.commit_number, rev.commit) for rev in revs]))
     return revs
 
+
 def rev_find(revs, attr, val):
     """Search from a list of TestedRev"""
     for i, rev in enumerate(revs):
diff --git a/meta/lib/oeqa/utils/httpserver.py b/meta/lib/oeqa/utils/httpserver.py
index 58d3c3b3f8..3bdccbf2ed 100644
--- a/meta/lib/oeqa/utils/httpserver.py
+++ b/meta/lib/oeqa/utils/httpserver.py
@@ -9,17 +9,20 @@ import traceback
 import signal
 from socketserver import ThreadingMixIn
 
+
 class HTTPServer(ThreadingMixIn, http.server.HTTPServer):
 
     def server_start(self, root_dir, logger):
         os.chdir(root_dir)
         self.serve_forever()
 
+
 class HTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
 
     def log_message(self, format_str, *args):
         pass
 
+
 class HTTPService(object):
 
     def __init__(self, root_dir, host='', port=0, logger=None):
@@ -49,7 +52,6 @@ class HTTPService(object):
         if self.logger:
             self.logger.info("Started HTTPService on %s:%s" % (self.host, self.port))
 
-
     def stop(self):
         if hasattr(self, "server"):
             self.server.server_close()
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index 6da2f6945a..7e78ef74c0 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -7,6 +7,8 @@ import os
 import re
 
 # A parser that can be used to identify weather a line is a test result or a section statement.
+
+
 class PtestParser(object):
     def __init__(self):
         self.results = {}
diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py
index 8013aa684d..32f85410fe 100644
--- a/meta/lib/oeqa/utils/metadata.py
+++ b/meta/lib/oeqa/utils/metadata.py
@@ -47,6 +47,7 @@ def metadata_from_bb():
         info_dict['config'][var] = data_dict[var]
     return info_dict
 
+
 def metadata_from_data_store(d):
     """ Returns test's metadata as OrderedDict.
 
@@ -56,6 +57,7 @@ def metadata_from_data_store(d):
     # be useful when running within bitbake.
     pass
 
+
 def git_rev_info(path):
     """Get git revision information as a dict"""
     info = OrderedDict()
@@ -89,6 +91,7 @@ def git_rev_info(path):
         info['branch'] = '(nobranch)'
     return info
 
+
 def get_layers(layers):
     """Returns layer information in dict format"""
     layer_dict = OrderedDict()
@@ -97,6 +100,7 @@ def get_layers(layers):
         layer_dict[layer_name] = git_rev_info(layer)
     return layer_dict
 
+
 def write_metadata_file(file_path, metadata):
     """ Writes metadata to a XML file in directory. """
 
@@ -105,6 +109,7 @@ def write_metadata_file(file_path, metadata):
     with open(file_path, 'w') as f:
         f.write(xml_doc.toprettyxml())
 
+
 def dict_to_XML(tag, dictionary, **kwargs):
     """ Return XML element converting dicts recursively. """
 
diff --git a/meta/lib/oeqa/utils/network.py b/meta/lib/oeqa/utils/network.py
index 0436d27582..5bf2c68c18 100644
--- a/meta/lib/oeqa/utils/network.py
+++ b/meta/lib/oeqa/utils/network.py
@@ -4,6 +4,7 @@
 
 import socket
 
+
 def get_free_port(udp=False):
     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM if not udp else socket.SOCK_DGRAM)
     s.bind(('', 0))
diff --git a/meta/lib/oeqa/utils/nfs.py b/meta/lib/oeqa/utils/nfs.py
index 1dd65588bb..745168985f 100644
--- a/meta/lib/oeqa/utils/nfs.py
+++ b/meta/lib/oeqa/utils/nfs.py
@@ -7,6 +7,7 @@ import socket
 from oeqa.utils.commands import bitbake, get_bb_var, Command
 from oeqa.utils.network import get_free_port
 
+
 @contextlib.contextmanager
 def unfs_server(directory, logger=None):
     unfs_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "unfs3-native")
diff --git a/meta/lib/oeqa/utils/package_manager.py b/meta/lib/oeqa/utils/package_manager.py
index e763d93c43..8d5e0682d7 100644
--- a/meta/lib/oeqa/utils/package_manager.py
+++ b/meta/lib/oeqa/utils/package_manager.py
@@ -8,6 +8,7 @@ import shutil
 
 from oeqa.core.utils.test import getCaseFile, getCaseMethod
 
+
 def get_package_manager(d, root_path):
     """
     Returns an OE package manager that can install packages in root_path.
@@ -43,6 +44,7 @@ def get_package_manager(d, root_path):
 
     return pm
 
+
 def find_packages_to_extract(test_suite):
     """
     Returns packages to extract required by runtime tests.
@@ -59,6 +61,7 @@ def find_packages_to_extract(test_suite):
 
     return needed_packages
 
+
 def _get_json_file(module_path):
     """
     Returns the path of the JSON file for a module, empty if doesn't exitst.
@@ -70,6 +73,7 @@ def _get_json_file(module_path):
     else:
         return ''
 
+
 def _get_needed_packages(json_file, test=None):
     """
     Returns a dict with needed packages based on a JSON file.
@@ -91,6 +95,7 @@ def _get_needed_packages(json_file, test=None):
 
     return needed_packages
 
+
 def extract_packages(d, needed_packages):
     """
     Extract packages that will be needed during runtime.
@@ -133,6 +138,7 @@ def extract_packages(d, needed_packages):
                 #logger.debug('Copying %s' % pkg)
                 _copy_package(d, pkg)
 
+
 def _extract_in_tmpdir(d, pkg):
     """"
     Returns path to a temp directory where the package was
@@ -148,6 +154,7 @@ def _extract_in_tmpdir(d, pkg):
 
     return extract_dir
 
+
 def _copy_package(d, pkg):
     """
     Copy the RPM, DEB or IPK package to dst_dir
@@ -163,6 +170,7 @@ def _copy_package(d, pkg):
     shutil.copy2(file_path, dst_dir)
     shutil.rmtree(pkg_path)
 
+
 def install_package(test_case):
     """
     Installs package in DUT if required.
@@ -171,6 +179,7 @@ def install_package(test_case):
     if needed_packages:
         _install_uninstall_packages(needed_packages, test_case, True)
 
+
 def uninstall_package(test_case):
     """
     Uninstalls package in DUT if required.
@@ -179,6 +188,7 @@ def uninstall_package(test_case):
     if needed_packages:
         _install_uninstall_packages(needed_packages, test_case, False)
 
+
 def test_needs_package(test_case):
     """
     Checks if a test case requires to install/uninstall packages.
@@ -194,6 +204,7 @@ def test_needs_package(test_case):
 
     return None
 
+
 def _install_uninstall_packages(needed_packages, test_case, install=True):
     """
     Install/Uninstall packages in the DUT without using a package manager
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 0e4fff2346..59caf5b1fc 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -31,6 +31,7 @@ control_chars = [chr(x) for x in control_range
                 if chr(x) not in string.printable]
 re_control_char = re.compile('[%s]' % re.escape("".join(control_chars)))
 
+
 class QemuRunner:
 
     def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, boottime, dump_dir, dump_host_cmds,
@@ -125,7 +126,6 @@ class QemuRunner:
         fcntl.fcntl(o, fcntl.F_SETFL, fl | os.O_NONBLOCK)
         return os.read(o.fileno(), 1000000).decode("utf-8")
 
-
     def handleSIGCHLD(self, signum, frame):
         if self.runqemu and self.runqemu.poll():
             if self.runqemu.returncode:
@@ -653,7 +653,6 @@ class QemuRunner:
                     status = 1
         return (status, str(data))
 
-
     def _dump_host(self):
         self.host_dumper.create_dir("qemu")
         self.logger.warning("Qemu ended unexpectedly, dump data from host"
@@ -664,6 +663,8 @@ class QemuRunner:
 # to be processed. It's completely event driven and has a straightforward
 # event loop. The mechanism for stopping the thread is a simple pipe which
 # will wake up the poll and allow for tearing everything down.
+
+
 class LoggingThread(threading.Thread):
     def __init__(self, logfunc, sock, logger):
         self.connection_established = threading.Event()
diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py
index dc4efae9a0..e77fdd24eb 100644
--- a/meta/lib/oeqa/utils/qemutinyrunner.py
+++ b/meta/lib/oeqa/utils/qemutinyrunner.py
@@ -17,6 +17,7 @@ import select
 import bb
 from .qemurunner import QemuRunner
 
+
 class QemuTinyRunner(QemuRunner):
 
     def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, kernel, boottime, logger, tmpfsdir=None):
@@ -45,7 +46,6 @@ class QemuTinyRunner(QemuRunner):
         self.kernel = kernel
         self.logger = logger
 
-
     def create_socket(self):
         tries = 3
         while tries > 0:
@@ -87,7 +87,6 @@ class QemuTinyRunner(QemuRunner):
         if self.tmpfsdir:
             env["RUNQEMU_TMPFS_DIR"] = self.tmpfsdir
 
-
         # Set this flag so that Qemu doesn't do any grabs as SDL grabs interact
         # badly with screensavers.
         os.environ["QEMU_DONT_GRAB"] = "1"
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index a1f71a8d38..4c5f883c56 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -97,6 +97,7 @@ class SSHProcess(object):
             raise
         return (self.status, self.output)
 
+
 class SSHControl(object):
     def __init__(self, ip, logfile=None, timeout=300, user='root', port=None):
         self.ip = ip
@@ -179,7 +180,6 @@ class SSHControl(object):
                 src_file = os.path.join(root, f)
                 self.copy_to(src_file, dst_file)
 
-
     def delete_files(self, remotepath, files):
         """
         Delete files in target's remote path.
@@ -194,7 +194,6 @@ class SSHControl(object):
 
         self.run(cmd)
 
-
     def delete_dir(self, remotepath):
         """
         Delete remotepath directory in target.
@@ -203,7 +202,6 @@ class SSHControl(object):
         cmd = "rmdir %s" % remotepath
         self.run(cmd)
 
-
     def delete_dir_structure(self, localpath, remotepath):
         """
         Delete recursively localpath structure directory in target's remotepath.
diff --git a/meta/lib/oeqa/utils/subprocesstweak.py b/meta/lib/oeqa/utils/subprocesstweak.py
index b47975a4bc..c5e20c8e5d 100644
--- a/meta/lib/oeqa/utils/subprocesstweak.py
+++ b/meta/lib/oeqa/utils/subprocesstweak.py
@@ -3,6 +3,7 @@
 #
 import subprocess
 
+
 class OETestCalledProcessError(subprocess.CalledProcessError):
     def __str__(self):
         def strify(o):
@@ -18,5 +19,6 @@ class OETestCalledProcessError(subprocess.CalledProcessError):
             s = s + "\nStandard Error: " + strify(self.stderr)
         return s
 
+
 def errors_have_output():
     subprocess.CalledProcessError = OETestCalledProcessError
diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py
index 1055810ca3..0ba14ce0d3 100644
--- a/meta/lib/oeqa/utils/targetbuild.py
+++ b/meta/lib/oeqa/utils/targetbuild.py
@@ -13,6 +13,7 @@ import subprocess
 import tempfile
 from abc import ABCMeta, abstractmethod
 
+
 class BuildProject(metaclass=ABCMeta):
 
     def __init__(self, d, uri, foldername=None, tmpdir=None):
@@ -75,6 +76,7 @@ class BuildProject(metaclass=ABCMeta):
         subprocess.check_call('rm -f %s' % self.localarchive, shell=True)
         pass
 
+
 class TargetBuildProject(BuildProject):
 
     def __init__(self, target, d, uri, foldername=None):
diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py
index 141ba2e25a..ae95ecd34a 100644
--- a/meta/lib/oeqa/utils/testexport.py
+++ b/meta/lib/oeqa/utils/testexport.py
@@ -21,12 +21,15 @@ except ImportError:
     class my_log():
         def __init__(self):
             pass
+
         def plain(self, msg):
             if msg:
                 print(msg)
+
         def warn(self, msg):
             if msg:
                 print("WARNING: " + msg)
+
         def fatal(self, msg):
             if msg:
                 print("FATAL:" + msg)
diff --git a/meta/lib/rootfspostcommands.py b/meta/lib/rootfspostcommands.py
index fdb9f5b850..29c611a5d5 100644
--- a/meta/lib/rootfspostcommands.py
+++ b/meta/lib/rootfspostcommands.py
@@ -4,6 +4,7 @@
 
 import os
 
+
 def sort_file(filename, mapping):
     """
     Sorts a passwd or group file based on the numeric ID in the third column.
@@ -33,6 +34,7 @@ def sort_file(filename, mapping):
         f.write(b''.join(lines))
     return new_mapping
 
+
 def remove_backup(filename):
     """
     Removes the backup file for files like /etc/passwd.
@@ -41,6 +43,7 @@ def remove_backup(filename):
     if os.path.exists(backup_filename):
         os.unlink(backup_filename)
 
+
 def sort_passwd(sysconfdir):
     """
     Sorts passwd and group files in a rootfs /etc directory by ID.
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index e8c3d2d1ee..00ccbcd1b8 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -25,6 +25,7 @@ locations = list()
 
 class SystemdFile():
     """Class representing a single systemd configuration file"""
+
     def __init__(self, root, path):
         self.sections = dict()
         self._parse(root, path)
@@ -95,6 +96,7 @@ class SystemdFile():
 
 class Presets():
     """Class representing all systemd presets"""
+
     def __init__(self, scope, root):
         self.directives = list()
         self._collect_presets(scope, root)
diff --git a/meta/recipes-devtools/meson/meson/meson-setup.py b/meta/recipes-devtools/meson/meson/meson-setup.py
index 7ac4e3ad47..292c95be9b 100755
--- a/meta/recipes-devtools/meson/meson/meson-setup.py
+++ b/meta/recipes-devtools/meson/meson/meson-setup.py
@@ -4,9 +4,11 @@ import os
 import string
 import sys
 
+
 class Template(string.Template):
     delimiter = "@"
 
+
 class Environ():
     def __getitem__(self, name):
         val = os.environ[name]
@@ -19,6 +21,7 @@ class Environ():
             val = "'%s'" % val.pop()
         return val
 
+
 try:
     sysroot = os.environ['OECORE_NATIVE_SYSROOT']
 except KeyError:
diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py
index 9a76e86d47..b936d8406e 100644
--- a/meta/recipes-devtools/python/python3/create_manifest3.py
+++ b/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -70,6 +70,7 @@ wildcards = []
 hasfolders = []
 allfolders = []
 
+
 def isFolder(value):
     value = value.replace('${PYTHON_MAJMIN}', pyversion)
     if os.path.isdir(value.replace('${libdir}', nativelibfolder + '/usr/lib')) or os.path.isdir(value.replace('${libdir}', nativelibfolder + '/usr/lib64')) or os.path.isdir(value.replace('${libdir}', nativelibfolder + '/usr/lib32')):
@@ -77,18 +78,21 @@ def isFolder(value):
     else:
         return False
 
+
 def isCached(item):
     if '__pycache__' in item:
         return True
     else:
         return False
 
+
 def prepend_comments(comments, json_manifest):
     with open(json_manifest, 'r+') as manifest:
         json_contents = manifest.read()
         manifest.seek(0, 0)
         manifest.write(comments + json_contents)
 
+
 def print_indent(msg, offset):
     for l in msg.splitlines():
         msg = ' ' * offset + l
@@ -171,7 +175,6 @@ for filedep in old_manifest['core']['files']:
     print_indent('The following dependencies were found for module %s:\n' % pymodule, 4)
     print_indent(output, 6)
 
-
     for pymodule_dep in output.split():
         pymodule_dep = pymodule_dep.replace(pyversion, '${PYTHON_MAJMIN}')
 
@@ -201,7 +204,6 @@ for pypkg in old_manifest:
                 allfolders.append(filedep)
 
 
-
 # This is the main loop that will handle each package.
 # It works in a similar fashion than the step before, but
 # we will now be updating a new dictionary that will eventually
@@ -282,8 +284,6 @@ for pypkg in old_manifest:
             else:
                 pymodule = path
 
-
-
         # We now know that were dealing with a python module, so we can import it
         # and check what its dependencies are.
         # We launch a separate task for each module for deterministic behavior.
@@ -347,8 +347,6 @@ for pypkg in old_manifest:
             if inFolders:
                 continue
 
-
-
             # No directories beyond this point
             # We might already have this module on the dictionary since it could depend on a (previously checked) module
             if pymodule_dep not in new_manifest[pypkg]['files'] and pymodule_dep not in new_manifest[pypkg]['cached']:
@@ -370,7 +368,6 @@ for pypkg in old_manifest:
                             repeated.append(pymodule_dep)
                 else:
 
-
                     # Last step: Figure out if we this belongs to FILES or RDEPENDS
                     # We check if this module is already contained on another package, so we add that one
                     # as an RDEPENDS, or if its not, it means it should be contained on the current
diff --git a/meta/recipes-devtools/python/python3/get_module_deps3.py b/meta/recipes-devtools/python/python3/get_module_deps3.py
index 62629c6870..b9cf5068df 100644
--- a/meta/recipes-devtools/python/python3/get_module_deps3.py
+++ b/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -25,6 +25,7 @@ import importlib
 
 core_deps = set(sys.modules)
 
+
 def fix_path(dep_path):
     import os
     # We DONT want the path on our HOST system
@@ -140,7 +141,6 @@ for item in dif:
     # Prints out result, which is what will be used by create_manifest
     print(dep_path)
 
-
     cpython_tag = sys.implementation.cache_tag
     cached = ''
     # Theres no naive way to find *.pyc files on python3
diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py
index 0b7dff1712..1980872817 100755
--- a/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -88,6 +88,7 @@ has_hung_task_detection = True
 
 #-------------------------------------------------------------------------------
 
+
 class TestFail(Exception):
         def __init__(self, msg):
                 self.msg = msg
@@ -97,6 +98,7 @@ class TestFail(Exception):
 
 #-------------------------------------------------------------------------------
 
+
 def tc_name(sub_name):
         return "rt_bmark.intlat." + sub_name
 
@@ -104,6 +106,7 @@ def tc_name(sub_name):
 # log() does the same job as print except that a '#' is added at the beginning
 # of each line. This causes TEFEL to ignore it
 
+
 def log(*msg):
         tmp = "".join(map(str, msg)) # 'map(str, ...' allows numbers
         for line in tmp.splitlines():
@@ -112,6 +115,7 @@ def log(*msg):
 #-------------------------------------------------------------------------------
 # Like log(), but with a timestamp added
 
+
 def log_ts(*msg):
         ts = time.localtime()
         stamp = "%2d:%02d:%02d: " % (ts.tm_hour, ts.tm_min, ts.tm_sec)
@@ -119,6 +123,7 @@ def log_ts(*msg):
 
 #-------------------------------------------------------------------------------
 
+
 def log_test_header(seq_no, nr_of_tests, name):
         log("=" * 78)
         log()
@@ -129,6 +134,7 @@ def log_test_header(seq_no, nr_of_tests, name):
 
 #-------------------------------------------------------------------------------
 
+
 def start_stress(*args):
         stress_cmd = ["stress-ng"]
         added_stress_types = []
@@ -177,6 +183,7 @@ def start_stress(*args):
 
 #-------------------------------------------------------------------------------
 
+
 def end_stress(p):
         if p is None:
                 # The value None indicates that no stress scenario was started
@@ -190,6 +197,7 @@ def end_stress(p):
 
 #-------------------------------------------------------------------------------
 
+
 def us2hms_str(us):
         s = (us + 500000) // 1000000 # Round microseconds to s
         m = s // 60
@@ -204,6 +212,7 @@ def us2hms_str(us):
 # cyclictest (cyclictest starves stress). To avoid that, the supervision
 # is temporarily disabled
 
+
 def set_hung_tmo(new_tmo):
         global has_hung_task_detection
 
@@ -229,6 +238,7 @@ def set_hung_tmo(new_tmo):
 
 #-------------------------------------------------------------------------------
 
+
 def gen_minmax_list(max_list):
         res = [min(max_list)]
 
@@ -253,6 +263,7 @@ def gen_minmax_list(max_list):
 #    -t: (without argument) Set number of threads to the number
 #         of cpus
 
+
 interval_core_0 = 100     # Timer interval on core 0 [us]
 interval_delta = 20      # Interval increment for each core [us]
 loop_count = 30000   # Number of loops (on core 0).
@@ -267,6 +278,7 @@ cmd = ("cyclictest",
        )
 rex = re.compile(b"C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)")
 
+
 def run_cyclictest_once():
         res = subprocess.check_output(cmd)
 
@@ -298,12 +310,14 @@ def run_cyclictest_once():
 # A precondition for the tracking of min-max values is that
 # the suite size os a power of 2.
 
+
 N = 5
 suite_size = 2**N
 
 est_exec_time_once = interval_core_0 * loop_count
 est_exec_time_suite = suite_size * est_exec_time_once
 
+
 def run_cyclictest_suite():
         log("Starting cyclictest")
         log("  Command          : ", " ".join(cmd))
@@ -353,6 +367,7 @@ def run_cyclictest_suite():
 
 #-------------------------------------------------------------------------------
 
+
 class cyclictest_runner:
         def run_test(self, seq_no, nr_of_tests, name, stressparams):
 
@@ -397,6 +412,7 @@ class cyclictest_runner:
 
 #-------------------------------------------------------------------------------
 
+
 runner = cyclictest_runner()
 
 tests = (("no_stress", []),
diff --git a/scripts/bitbake-whatchanged b/scripts/bitbake-whatchanged
index 8c4486ee62..51d824c033 100755
--- a/scripts/bitbake-whatchanged
+++ b/scripts/bitbake-whatchanged
@@ -41,6 +41,7 @@ import bb.process
 stamp_re = re.compile("(?P<pv>.*)-(?P<pr>r\d+)\.(?P<task>do_\w+)\.(?P<hash>[^\.]*)")
 sigdata_re = re.compile(".*\.sigdata\..*")
 
+
 def gen_dict(stamps):
     """
     Generate the dict from the stamps dir.
@@ -73,6 +74,8 @@ def gen_dict(stamps):
     return d
 
 # Re-construct the dict
+
+
 def recon_dict(dict_in):
     """
     The output dict format is:
@@ -96,6 +99,7 @@ def recon_dict(dict_in):
 
     return dict_out
 
+
 def split_pntask(s):
     """
     Split the pn_task in to (pn, task) and return it
@@ -137,6 +141,7 @@ def print_added(d_new=None, d_old=None):
 
     return counter
 
+
 def print_vrchanged(d_new=None, d_old=None, vr=None):
     """
     Print the pv or pr changed tasks.
@@ -165,6 +170,7 @@ def print_vrchanged(d_new=None, d_old=None, vr=None):
 
     return counter
 
+
 def print_depchanged(d_new=None, d_old=None, verbose=False):
     """
     Print the dependency changes
@@ -316,5 +322,6 @@ Note:
             print("Removing the newly generated stamps dir ...")
             shutil.rmtree(new_stampsdir)
 
+
 if __name__ == "__main__":
     sys.exit(main())
diff --git a/scripts/buildhistory-collect-srcrevs b/scripts/buildhistory-collect-srcrevs
index 653972a969..c3bf13abbe 100755
--- a/scripts/buildhistory-collect-srcrevs
+++ b/scripts/buildhistory-collect-srcrevs
@@ -14,6 +14,7 @@ import sys
 import optparse
 import logging
 
+
 def logger_create():
     logger = logging.getLogger("buildhistory")
     loggerhandler = logging.StreamHandler()
@@ -22,8 +23,10 @@ def logger_create():
     logger.setLevel(logging.INFO)
     return logger
 
+
 logger = logger_create()
 
+
 def main():
     parser = optparse.OptionParser(
         description="Collects the recorded SRCREV values from buildhistory and reports on them.",
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff
index 025243ea6e..5c9dee6fad 100755
--- a/scripts/buildhistory-diff
+++ b/scripts/buildhistory-diff
@@ -20,6 +20,7 @@ except ImportError:
     print("Please install GitPython (python3-git) 0.3.4 or later in order to use this script")
     sys.exit(1)
 
+
 def get_args_parser():
     description = "Reports significant differences in the buildhistory repository."
 
@@ -68,6 +69,7 @@ def get_args_parser():
                         help=argparse.SUPPRESS)
     return parser
 
+
 def main():
 
     parser = get_args_parser()
@@ -135,5 +137,6 @@ def main():
 
     sys.exit(0)
 
+
 if __name__ == "__main__":
     main()
diff --git a/scripts/buildstats-diff b/scripts/buildstats-diff
index bef1cf9cd7..d304b8a1b7 100755
--- a/scripts/buildstats-diff
+++ b/scripts/buildstats-diff
@@ -269,6 +269,7 @@ Script for comparing buildstats of two separate builds."""
 
     return args
 
+
 def main(argv=None):
     """Script entry point"""
     args = parse_args(argv)
@@ -298,5 +299,6 @@ def main(argv=None):
         return 1
     return 0
 
+
 if __name__ == "__main__":
     sys.exit(main())
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 81d9badbc0..4b44a0d7b4 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -28,6 +28,7 @@ from functools import reduce
 
 __version__ = "0.2.1"
 
+
 def logger_create():
     logger = logging.getLogger("")
     loggerhandler = logging.StreamHandler()
@@ -36,8 +37,10 @@ def logger_create():
     logger.setLevel(logging.INFO)
     return logger
 
+
 logger = logger_create()
 
+
 def get_current_branch(repodir=None):
     try:
         if not os.path.exists(os.path.join(repodir if repodir else '', ".git")):
@@ -50,6 +53,7 @@ def get_current_branch(repodir=None):
     except subprocess.CalledProcessError:
         return ""
 
+
 class Configuration(object):
     """
     Manages the configuration
@@ -57,6 +61,7 @@ class Configuration(object):
     For an example config file, see combo-layer.conf.example
 
     """
+
     def __init__(self, options):
         for key, val in options.__dict__.items():
             setattr(self, key, val)
@@ -169,6 +174,7 @@ class Configuration(object):
             logger.error("ERROR: patchutils package is missing, please install it (e.g. # apt-get install patchutils)")
             sys.exit(1)
 
+
 def runcmd(cmd, destdir=None, printerr=True, out=None, env=None):
     """
         execute command, raise CalledProcessError if fail
@@ -193,6 +199,7 @@ def runcmd(cmd, destdir=None, printerr=True, out=None, env=None):
     logger.debug("output: %s" % output.replace(chr(0), '\\0'))
     return output
 
+
 def action_init(conf, args):
     """
         Clone component repositories
@@ -253,6 +260,7 @@ def action_init(conf, args):
                 extract_dir = os.getcwd()
             file_filter = repo.get('file_filter', "")
             exclude_patterns = repo.get('file_exclude', '').split()
+
             def copy_selected_files(initialrev, extract_dir, file_filter, exclude_patterns, ldir,
                                     subdir=""):
                 # When working inside a filtered branch which had the
@@ -474,6 +482,7 @@ def check_repo_clean(repodir):
         logger.error("git repo %s is dirty, please fix it first", repodir)
         sys.exit(1)
 
+
 def check_patch(patchfile):
     f = open(patchfile, 'rb')
     ln = f.readline()
@@ -511,6 +520,7 @@ def check_patch(patchfile):
         of.close()
         bb.utils.rename(patchfile + '.tmp', patchfile)
 
+
 def drop_to_shell(workdir=None):
     if not sys.stdin.isatty():
         print("Not a TTY so can't drop to shell for resolution, exiting.")
@@ -528,6 +538,7 @@ def drop_to_shell(workdir=None):
     else:
         return True
 
+
 def check_rev_branch(component, repodir, rev, branch):
     try:
         actualbranch = runcmd("git branch --contains %s" % rev, repodir, printerr=False)
@@ -551,6 +562,7 @@ def check_rev_branch(component, repodir, rev, branch):
         return False
     return True
 
+
 def get_repos(conf, repo_names):
     repos = []
     for name in repo_names:
@@ -568,6 +580,7 @@ def get_repos(conf, repo_names):
 
     return repos
 
+
 def action_pull(conf, args):
     """
         update the component repos only
@@ -604,6 +617,7 @@ def action_pull(conf, args):
             runcmd("git checkout %s" % branch, ldir)
             runcmd("git reset --hard FETCH_HEAD", ldir)
 
+
 def action_update(conf, args):
     """
         update the component repos
@@ -653,6 +667,7 @@ def action_update(conf, args):
     else:
         update_with_patches(conf, components, revisions, repos)
 
+
 def update_with_patches(conf, components, revisions, repos):
     import uuid
     patch_dir = "patch-%s" % uuid.uuid4()
@@ -737,6 +752,7 @@ def update_with_patches(conf, components, revisions, repos):
     # Step 7: commit the updated config file if it's being tracked
     commit_conf_file(conf, components)
 
+
 def conf_commit_msg(conf, components):
     # create the "components" string
     component_str = "all components"
@@ -749,6 +765,7 @@ def conf_commit_msg(conf, components):
     msg = template.substitute(components=component_str)
     return msg
 
+
 def commit_conf_file(conf, components, commit=True):
     relpath = os.path.relpath(conf.conffile)
     try:
@@ -767,6 +784,7 @@ def commit_conf_file(conf, components, commit=True):
             return True
     return False
 
+
 def apply_patchlist(conf, repos):
     """
         apply the generated patch list to combo repo
@@ -844,6 +862,7 @@ def apply_patchlist(conf, repos):
         if lastrev != repo['last_revision']:
             conf.update(name, "last_revision", lastrev)
 
+
 def action_splitpatch(conf, args):
     """
         generate the commit patch and
@@ -883,6 +902,7 @@ def action_splitpatch(conf, args):
         else:
             logger.info(patch_filename)
 
+
 def update_with_history(conf, components, revisions, repos):
     '''Update all components with full history.
 
@@ -998,7 +1018,6 @@ def update_with_history(conf, components, revisions, repos):
                 else:
                     index += 1
 
-
         # Generate the revision list.
         logger.info("Analyzing commits from %s..." % name)
         top_revision = revision or branch
@@ -1046,6 +1065,7 @@ def update_with_history(conf, components, revisions, repos):
 
         # Now import each revision.
         logger.info("Importing commits from %s..." % name)
+
         def import_rev(rev):
             global scanned_revs
 
@@ -1198,6 +1218,8 @@ def update_with_history(conf, components, revisions, repos):
 
 
 scanned_revs = False
+
+
 def find_revs(old2new, head):
     '''Construct mapping from original commit hash to commit hash in
     combined repo by looking at the commit messages. Depends on the
@@ -1295,9 +1317,11 @@ def apply_commit(parent, rev, largs, wargs, dest_dir, file_filter=None):
                 path = os.path.join(dest_dir, path)
         runcmd("git rm -f --ignore-unmatch".split() + [os.path.join(dest_dir, x) for x in delete], **wargs)
 
+
 def action_error(conf, args):
     logger.info("invalid action %s" % args[0])
 
+
 actions = {
     "init": action_init,
     "update": action_update,
@@ -1305,6 +1329,7 @@ actions = {
     "splitpatch": action_splitpatch,
 }
 
+
 def main():
     parser = optparse.OptionParser(
         version="Combo Layer Repo Tool version %s" % __version__,
@@ -1357,6 +1382,7 @@ Action:
         confdata.sanity_check(initmode)
         actions.get(args[1], action_error)(confdata, args[1:])
 
+
 if __name__ == "__main__":
     try:
         ret = main()
diff --git a/scripts/contrib/bbvars.py b/scripts/contrib/bbvars.py
index 090133600b..bc518198dc 100755
--- a/scripts/contrib/bbvars.py
+++ b/scripts/contrib/bbvars.py
@@ -19,6 +19,7 @@ import scriptpath
 scriptpath.add_bitbake_lib_path()
 import bb.tinfoil
 
+
 def usage():
     print('Usage: %s -d FILENAME [-d FILENAME]*' % os.path.basename(sys.argv[0]))
     print('  -d FILENAME         documentation file to search')
@@ -26,6 +27,7 @@ def usage():
     print('  -t FILENAME         documentation config file (for doc tags)')
     print('  -T                  Only display variables with doc tags (requires -t)')
 
+
 def bbvar_is_documented(var, documented_vars):
     ''' Check if variable (var) is in the list of documented variables(documented_vars) '''
     if var in documented_vars:
@@ -33,6 +35,7 @@ def bbvar_is_documented(var, documented_vars):
     else:
         return False
 
+
 def collect_documented_vars(docfiles):
     ''' Walk the docfiles and collect the documented variables '''
     documented_vars = []
@@ -44,6 +47,7 @@ def collect_documented_vars(docfiles):
 
     return documented_vars
 
+
 def bbvar_doctag(var, docconf):
     prog = re.compile('^%s\[doc\] *= *"(.*)"' % (var))
     if docconf == "":
@@ -62,6 +66,7 @@ def bbvar_doctag(var, docconf):
     f.close()
     return ""
 
+
 def main():
     docfiles = []
     bbvars = set()
diff --git a/scripts/contrib/devtool-stress.py b/scripts/contrib/devtool-stress.py
index 81046ecf49..35fdf4e10a 100755
--- a/scripts/contrib/devtool-stress.py
+++ b/scripts/contrib/devtool-stress.py
@@ -27,6 +27,7 @@ import scriptutils
 import argparse_oe
 logger = scriptutils.logger_create('devtool-stress')
 
+
 def select_recipes(args):
     import bb.tinfoil
     tinfoil = bb.tinfoil.Tinfoil()
@@ -241,5 +242,6 @@ def main():
 
     ret = args.func(args)
 
+
 if __name__ == "__main__":
     main()
diff --git a/scripts/contrib/graph-tool b/scripts/contrib/graph-tool
index 26488930e0..96cb9f26d1 100755
--- a/scripts/contrib/graph-tool
+++ b/scripts/contrib/graph-tool
@@ -27,6 +27,7 @@ def get_path_networkx(dotfile, fromnode, tonode):
         sys.exit(1)
 
     graph = networkx.DiGraph(networkx.nx_pydot.read_dot(dotfile))
+
     def node_missing(node):
         import difflib
         close_matches = difflib.get_close_matches(node, graph.nodes(), cutoff=0.7)
diff --git a/scripts/contrib/image-manifest b/scripts/contrib/image-manifest
index f342e6b5dd..6868de1dc6 100755
--- a/scripts/contrib/image-manifest
+++ b/scripts/contrib/image-manifest
@@ -39,6 +39,7 @@ import bb.utils
 import oe.utils
 import oe.recipeutils
 
+
 def get_pkg_list(manifest):
     pkglist = []
     with open(manifest, 'r') as f:
@@ -52,11 +53,13 @@ def get_pkg_list(manifest):
                 pkglist.append(linesplit[0])
     return sorted(pkglist)
 
+
 def list_packages(args):
     pkglist = get_pkg_list(args.manifest)
     for pkg in pkglist:
         print('%s' % pkg)
 
+
 def pkg2recipe(tinfoil, pkg):
     if "-native" in pkg:
         logger.info('skipping %s' % pkg)
@@ -75,6 +78,7 @@ def pkg2recipe(tinfoil, pkg):
         logger.warning('%s is missing' % pkgdatafile)
         return None
 
+
 def get_recipe_list(manifest, tinfoil):
     pkglist = get_pkg_list(manifest)
     recipelist = []
@@ -86,6 +90,7 @@ def get_recipe_list(manifest, tinfoil):
 
     return sorted(recipelist)
 
+
 def list_recipes(args):
     import bb.tinfoil
     with bb.tinfoil.Tinfoil() as tinfoil:
@@ -95,6 +100,7 @@ def list_recipes(args):
         for recipe in sorted(recipelist):
             print('%s' % recipe)
 
+
 def list_layers(args):
 
     def find_git_repo(pth):
@@ -173,6 +179,7 @@ def list_layers(args):
 
     json.dump(layers, args.output, indent=2)
 
+
 def get_recipe(args):
     with bb.tinfoil.Tinfoil() as tinfoil:
         tinfoil.logger.setLevel(logger.getEffectiveLevel())
@@ -181,6 +188,7 @@ def get_recipe(args):
         recipe = pkg2recipe(tinfoil, args.package)
         print(' %s package provided by %s' % (args.package, recipe))
 
+
 def pkg_dependencies(args):
     def get_recipe_info(tinfoil, recipe):
         try:
@@ -262,6 +270,7 @@ def pkg_dependencies(args):
                 if "cross" in data.pn:
                     print(" %s(%s)" % (data.pn, p))
 
+
 def default_config():
     vlist = OrderedDict()
     vlist['PV'] = 'yes'
@@ -295,12 +304,14 @@ def default_config():
     clist['packagedir'] = 'no'
     return clist
 
+
 def dump_config(args):
     config = default_config()
     f = open('default_config.json', 'w')
     json.dump(config, f, indent=2)
     logger.info('Default config list dumped to default_config.json')
 
+
 def export_manifest_info(args):
 
     def handle_value(value):
diff --git a/scripts/contrib/list-packageconfig-flags.py b/scripts/contrib/list-packageconfig-flags.py
index fda0b35e9d..5e018b8e7d 100755
--- a/scripts/contrib/list-packageconfig-flags.py
+++ b/scripts/contrib/list-packageconfig-flags.py
@@ -30,6 +30,7 @@ import bb.cooker
 import bb.providers
 import bb.tinfoil
 
+
 def get_fnlist(bbhandler, pkg_pn, preferred):
     ''' Get all recipe file names '''
     if preferred:
@@ -44,6 +45,7 @@ def get_fnlist(bbhandler, pkg_pn, preferred):
 
     return fn_list
 
+
 def get_recipesdata(bbhandler, preferred):
     ''' Get data of all available recipes which have PACKAGECONFIG flags '''
     pkg_pn = bbhandler.cooker.recipecaches[''].pkg_pn
@@ -58,6 +60,7 @@ def get_recipesdata(bbhandler, preferred):
 
     return data_dict
 
+
 def collect_pkgs(data_dict):
     ''' Collect available pkgs in which have PACKAGECONFIG flags '''
     # pkg_dict = {'pkg1': ['flag1', 'flag2',...]}
@@ -70,6 +73,7 @@ def collect_pkgs(data_dict):
 
     return pkg_dict
 
+
 def collect_flags(pkg_dict):
     ''' Collect available PACKAGECONFIG flags and all affected pkgs '''
     # flag_dict = {'flag': ['pkg1', 'pkg2',...]}
@@ -83,6 +87,7 @@ def collect_flags(pkg_dict):
 
     return flag_dict
 
+
 def display_pkgs(pkg_dict):
     ''' Display available pkgs which have PACKAGECONFIG flags '''
     pkgname_len = len("RECIPE NAME") + 1
@@ -109,6 +114,7 @@ def display_flags(flag_dict):
     for flag in sorted(flag_dict):
         print('%-*s%s' % (flag_len, flag, '  '.join(sorted(flag_dict[flag]))))
 
+
 def display_all(data_dict):
     ''' Display all pkgs and PACKAGECONFIG information '''
     print(str("").ljust(50, '='))
@@ -126,6 +132,7 @@ def display_all(data_dict):
             print('PACKAGECONFIG[%s] %s' % (flag, flag_val))
         print('')
 
+
 def main():
     pkg_dict = {}
     flag_dict = {}
@@ -163,5 +170,6 @@ def main():
         elif options.listtype == 'all':
             display_all(data_dict)
 
+
 if __name__ == "__main__":
     main()
diff --git a/scripts/contrib/oe-build-perf-report-email.py b/scripts/contrib/oe-build-perf-report-email.py
index de3862c897..81594309bc 100755
--- a/scripts/contrib/oe-build-perf-report-email.py
+++ b/scripts/contrib/oe-build-perf-report-email.py
@@ -177,6 +177,7 @@ def scrape_html_report(report, outdir, phantomjs_extra_args=None):
     finally:
         shutil.rmtree(tmpdir)
 
+
 def send_email(text_fn, html_fn, image_fns, subject, recipients, copy=[],
                blind_copy=[]):
     """Send email"""
diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
index b987374d57..879814d437 100755
--- a/scripts/contrib/patchreview.py
+++ b/scripts/contrib/patchreview.py
@@ -10,6 +10,7 @@
 
 status_values = ("accepted", "pending", "inappropriate", "backport", "submitted", "denied")
 
+
 class Result:
     # Whether the patch has an Upstream-Status or not
     missing_upstream_status = False
@@ -28,6 +29,7 @@ class Result:
     # Whether a patch looks like a CVE but doesn't have a CVE tag
     missing_cve = False
 
+
 def blame_patch(patch):
     """
     From a patch filename, return a list of "commit summary (author name <author
@@ -39,6 +41,7 @@ def blame_patch(patch):
                                     "--format=%s (%aN <%aE>)",
                                     "--", patch)).decode("utf-8").splitlines()
 
+
 def patchreview(path, patches):
     import re
     import os.path
@@ -71,7 +74,6 @@ def patchreview(path, patches):
         else:
             result.missing_sob = True
 
-
         # Find the Upstream-Status tag
         match = status_re.search(content)
         if match:
@@ -188,7 +190,6 @@ Patches in Pending state: %s""" % (total_patches,
                                    percent(pending_patches)))
 
 
-
 def histogram(results):
     from toolz import recipes, dicttoolz
     import math
diff --git a/scripts/contrib/verify-homepage.py b/scripts/contrib/verify-homepage.py
index 84503b84d1..e2f8cbccc7 100755
--- a/scripts/contrib/verify-homepage.py
+++ b/scripts/contrib/verify-homepage.py
@@ -26,6 +26,7 @@ import bb.tinfoil
 
 logger = scriptutils.logger_create('verify_homepage')
 
+
 def wgetHomepage(pn, homepage):
     result = subprocess.call('wget ' + '-q -T 5 -t 1 --spider ' + homepage, shell=True)
     if result:
@@ -34,6 +35,7 @@ def wgetHomepage(pn, homepage):
     else:
         return 0
 
+
 def verifyHomepage(bbhandler):
     pkg_pn = bbhandler.cooker.recipecaches[''].pkg_pn
     pnlist = sorted(pkg_pn)
@@ -55,6 +57,7 @@ def verifyHomepage(bbhandler):
             checked.append(realfn)
     return count
 
+
 if __name__ == '__main__':
     with bb.tinfoil.Tinfoil() as bbhandler:
         bbhandler.prepare()
diff --git a/scripts/cp-noerror b/scripts/cp-noerror
index ab617c5d35..99fce16a10 100755
--- a/scripts/cp-noerror
+++ b/scripts/cp-noerror
@@ -11,6 +11,7 @@ import sys
 import os
 import shutil
 
+
 def copytree(src, dst, symlinks=False, ignore=None):
     """Based on shutil.copytree"""
     names = os.listdir(src)
@@ -46,6 +47,7 @@ def copytree(src, dst, symlinks=False, ignore=None):
     if errors:
         raise shutil.Error(errors)
 
+
 try:
     copytree(sys.argv[1], sys.argv[2])
 except shutil.Error:
diff --git a/scripts/crosstap b/scripts/crosstap
index b8c3923793..d6d366600b 100755
--- a/scripts/crosstap
+++ b/scripts/crosstap
@@ -27,6 +27,7 @@ import subprocess
 import os
 import optparse
 
+
 class Stap(object):
     def __init__(self, script, module, remote):
         self.script = script
@@ -111,10 +112,12 @@ class Stap(object):
             print("export %s=\"%s\"" % (e, additional_env[e]))
         print(" ".join(command))
 
+
 class BitbakeEnvInvocationException(Exception):
     def __init__(self, message):
         self.message = message
 
+
 class BitbakeEnv(object):
     BITBAKE = "bitbake"
 
@@ -169,6 +172,7 @@ class BitbakeEnv(object):
 
         return ret
 
+
 class ParamDiscovery(object):
     SYMBOLS_CHECK_MESSAGE = """
 WARNING: image '%s' does not have dbg-pkgs IMAGE_FEATURES enabled and no
@@ -455,4 +459,5 @@ IMAGE_INSTALL_append = " systemtap"
 
                 os.execve(cmd[0], cmd, env)
 
+
 main()
diff --git a/scripts/devtool b/scripts/devtool
index 8a4f41bc37..588d9195b1 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -69,7 +69,6 @@ class ConfigHandler(object):
         self.workspace_path = self.get('General', 'workspace_path', os.path.join(basepath, 'workspace'))
         return True
 
-
     def write(self):
         logger.debug('writing to config file %s' % self.config_file)
         self.config_obj.set('General', 'workspace_path', self.workspace_path)
@@ -81,6 +80,7 @@ class ConfigHandler(object):
             self.config_obj.add_section(section)
         self.config_obj.set(section, option, value)
 
+
 class Context:
     def __init__(self, **kwargs):
         self.__dict__.update(kwargs)
@@ -128,6 +128,7 @@ def read_workspace():
                 logger.debug('Found recipe %s' % pnvalues)
                 workspace[pn] = pnvalues
 
+
 def create_workspace(args, config, basepath, workspace):
     if args.layerpath:
         workspacedir = os.path.abspath(args.layerpath)
@@ -137,6 +138,7 @@ def create_workspace(args, config, basepath, workspace):
     if not args.create_only:
         _enable_workspace_layer(workspacedir, config, basepath)
 
+
 def _create_workspace(workspacedir, config, basepath):
     import bb
 
@@ -174,6 +176,7 @@ def _create_workspace(workspacedir, config, basepath):
             f.write('layer. If you prefer it to be elsewhere you can specify the source\n')
             f.write('tree path on the command line.\n')
 
+
 def _enable_workspace_layer(workspacedir, config, basepath):
     """Ensure the workspace layer is in bblayers.conf"""
     import bb
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache
index cd8f9a4356..c1054ebbbf 100755
--- a/scripts/gen-lockedsig-cache
+++ b/scripts/gen-lockedsig-cache
@@ -9,6 +9,7 @@ import shutil
 import errno
 import time
 
+
 def mkdir(d):
     try:
         os.makedirs(d)
@@ -17,11 +18,15 @@ def mkdir(d):
             raise e
 
 # extract the hash from past the last colon to last underscore
+
+
 def extract_sha(filename):
     return filename.split(':')[7].split('_')[0]
 
 # get all files in a directory, extract hash and make
 # a map from hash to list of file with that hash
+
+
 def map_sha_to_files(dir_, prefix, sha_map):
     sstate_prefix_path = dir_ + '/' + prefix + '/'
     if not os.path.exists(sstate_prefix_path):
@@ -37,6 +42,8 @@ def map_sha_to_files(dir_, prefix, sha_map):
             continue
 
 # given a prefix build a map of hash to list of files
+
+
 def build_sha_cache(prefix):
     sha_map = {}
 
@@ -48,6 +55,7 @@ def build_sha_cache(prefix):
 
     return sha_map
 
+
 if len(sys.argv) < 5:
     print("Incorrect number of arguments specified")
     print("syntax: gen-lockedsig-cache <locked-sigs.inc> <input-cachedir> <output-cachedir> <nativelsbstring> [filterfile]")
diff --git a/scripts/install-buildtools b/scripts/install-buildtools
index 213edb5b15..8571505d65 100755
--- a/scripts/install-buildtools
+++ b/scripts/install-buildtools
@@ -73,6 +73,7 @@ if not (sys.version_info.major == 3 and sys.version_info.minor >= 4):
 # to run on versions of python earlier than what bitbake
 # supports (e.g. less than Python 3.5 for YP 3.1 release)
 
+
 def _hasher(method, filename):
     import mmap
 
@@ -94,6 +95,7 @@ def md5_file(filename):
     import hashlib
     return _hasher(hashlib.md5(), filename)
 
+
 def sha256_file(filename):
     """
     Return the hex string representation of the 256-bit SHA checksum of
diff --git a/scripts/lib/argparse_oe.py b/scripts/lib/argparse_oe.py
index 94a4ac5011..2f72954690 100644
--- a/scripts/lib/argparse_oe.py
+++ b/scripts/lib/argparse_oe.py
@@ -6,14 +6,18 @@ import sys
 import argparse
 from collections import defaultdict, OrderedDict
 
+
 class ArgumentUsageError(Exception):
     """Exception class you can raise (and catch) in order to show the help"""
+
     def __init__(self, message, subcommand=None):
         self.message = message
         self.subcommand = subcommand
 
+
 class ArgumentParser(argparse.ArgumentParser):
     """Our own version of argparse's ArgumentParser"""
+
     def __init__(self, *args, **kwargs):
         kwargs.setdefault('formatter_class', OeHelpFormatter)
         self._subparser_groups = OrderedDict()
@@ -172,6 +176,7 @@ class OeHelpFormatter(argparse.HelpFormatter):
         else:
             return super(OeHelpFormatter, self)._format_action(action)
 
+
 def int_positive(value):
     ivalue = int(value)
     if ivalue <= 0:
diff --git a/scripts/lib/build_perf/__init__.py b/scripts/lib/build_perf/__init__.py
index dcbb78042d..0bc0d74206 100644
--- a/scripts/lib/build_perf/__init__.py
+++ b/scripts/lib/build_perf/__init__.py
@@ -5,6 +5,7 @@
 #
 """Build performance test library functions"""
 
+
 def print_table(rows, row_fmt=None):
     """Print data table"""
     if not rows:
diff --git a/scripts/lib/build_perf/report.py b/scripts/lib/build_perf/report.py
index dde4616974..fc8bba7cd7 100644
--- a/scripts/lib/build_perf/report.py
+++ b/scripts/lib/build_perf/report.py
@@ -293,6 +293,7 @@ class SizeVal(MeasurementVal):
             return "null"
         return self / 1024
 
+
 def measurement_stats(meas, prefix=''):
     """Get statistics of a measurement"""
     if not meas:
diff --git a/scripts/lib/buildstats.py b/scripts/lib/buildstats.py
index 3b251a697b..6dbcefab04 100644
--- a/scripts/lib/buildstats.py
+++ b/scripts/lib/buildstats.py
@@ -144,6 +144,7 @@ class BSTaskAggregate(object):
 
 class BSRecipe(object):
     """Class representing buildstats of one recipe"""
+
     def __init__(self, name, epoch, version, revision):
         self.name = name
         self.epoch = epoch
@@ -209,7 +210,6 @@ class BuildStats(dict):
             bs_json = json.load(fobj)
         return BuildStats.from_json(bs_json)
 
-
     @staticmethod
     def split_nevr(nevr):
         """Split name and version information from recipe "nevr" string"""
@@ -312,6 +312,7 @@ def diff_buildstats(bs1, bs2, stat_attr, min_val=None, min_absdiff=None, only_ta
 
 class BSVerDiff(object):
     """Class representing recipe version differences between two buildstats"""
+
     def __init__(self, bs1, bs2):
         RecipeVerDiff = namedtuple('RecipeVerDiff', 'left right')
 
diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py
index b849843154..2817b168d1 100644
--- a/scripts/lib/checklayer/__init__.py
+++ b/scripts/lib/checklayer/__init__.py
@@ -12,6 +12,7 @@ from enum import Enum
 
 import bb.tinfoil
 
+
 class LayerType(Enum):
     BSP = 0
     DISTRO = 1
@@ -19,6 +20,7 @@ class LayerType(Enum):
     ERROR_NO_LAYER_CONF = 98
     ERROR_BSP_DISTRO = 99
 
+
 def _get_configurations(path):
     configs = []
 
@@ -28,6 +30,7 @@ def _get_configurations(path):
             configs.append(f[:-5]) # strip .conf
     return configs
 
+
 def _get_layer_collections(layer_path, lconf=None, data=None):
     import bb.parse
     import bb.data
@@ -71,6 +74,7 @@ def _get_layer_collections(layer_path, lconf=None, data=None):
 
     return collections
 
+
 def _detect_layer(layer_path):
     """
         Scans layer directory to detect what type of layer
@@ -121,6 +125,7 @@ def _detect_layer(layer_path):
 
     return layer
 
+
 def detect_layers(layer_directories, no_auto):
     layers = []
 
@@ -146,6 +151,7 @@ def detect_layers(layer_directories, no_auto):
 
     return layers
 
+
 def _find_layer_depends(depend, layers):
     for layer in layers:
         if 'collections' not in layer:
@@ -156,6 +162,7 @@ def _find_layer_depends(depend, layers):
                 return layer
     return None
 
+
 def add_layer_dependencies(bblayersconf, layer, layers, logger):
     def recurse_dependencies(depends, layer, layers, logger, ret=[]):
         logger.debug('Processing dependencies %s for layer %s.' %
@@ -210,6 +217,7 @@ def add_layer_dependencies(bblayersconf, layer, layers, logger):
 
     return True
 
+
 def add_layers(bblayersconf, layers, logger):
     # Don't add a layer that is already present.
     added = set()
@@ -229,6 +237,7 @@ def add_layers(bblayersconf, layers, logger):
                 f.write("\nBBLAYERS += \"%s\"\n" % path)
     return True
 
+
 def check_bblayers(bblayersconf, layer_path, logger):
     '''
     If layer_path found in BBLAYERS return True
@@ -243,6 +252,7 @@ def check_bblayers(bblayersconf, layer_path, logger):
 
     return False
 
+
 def check_command(error_msg, cmd, cwd=None):
     '''
     Run a command under a shell, capture stdout and stderr in a single stream,
@@ -256,6 +266,7 @@ def check_command(error_msg, cmd, cwd=None):
         raise RuntimeError(msg)
     return output
 
+
 def get_signatures(builddir, failsafe=False, machine=None):
     import re
 
@@ -318,6 +329,7 @@ def get_signatures(builddir, failsafe=False, machine=None):
 
     return (sigs, tune2tasks)
 
+
 def get_depgraph(targets=['world'], failsafe=False):
     '''
     Returns the dependency graph for the given target(s).
@@ -353,6 +365,7 @@ def get_depgraph(targets=['world'], failsafe=False):
         raise RuntimeError('Could not retrieve the depgraph.')
     return depgraph
 
+
 def compare_signatures(old_sigs, curr_sigs):
     '''
     Compares the result of two get_signatures() calls. Returns None if no
@@ -376,6 +389,7 @@ def compare_signatures(old_sigs, curr_sigs):
     def sig2graph(task):
         pn, taskname = task.rsplit(':', 1)
         return pn + '.' + taskname
+
     def graph2sig(task):
         pn, taskname = task.rsplit('.', 1)
         return pn + ':' + taskname
diff --git a/scripts/lib/checklayer/case.py b/scripts/lib/checklayer/case.py
index fa9dee384e..aad22efd0c 100644
--- a/scripts/lib/checklayer/case.py
+++ b/scripts/lib/checklayer/case.py
@@ -5,5 +5,6 @@
 
 from oeqa.core.case import OETestCase
 
+
 class OECheckLayerTestCase(OETestCase):
     pass
diff --git a/scripts/lib/checklayer/cases/bsp.py b/scripts/lib/checklayer/cases/bsp.py
index bd80f1132a..c80200426d 100644
--- a/scripts/lib/checklayer/cases/bsp.py
+++ b/scripts/lib/checklayer/cases/bsp.py
@@ -8,6 +8,7 @@ import unittest
 from checklayer import LayerType, get_signatures, check_command, get_depgraph
 from checklayer.case import OECheckLayerTestCase
 
+
 class BSPCheckLayer(OECheckLayerTestCase):
     @classmethod
     def setUpClass(self):
@@ -27,7 +28,6 @@ class BSPCheckLayer(OECheckLayerTestCase):
                 msg="Layer %s modified machine %s -> %s" %
                     (self.tc.layer['name'], self.td['bbvars']['MACHINE'], machine))
 
-
     def test_machine_world(self):
         '''
         "bitbake world" is expected to work regardless which machine is selected.
@@ -111,6 +111,7 @@ class BSPCheckLayer(OECheckLayerTestCase):
             BLACK = 3
             color = {}
             found = set()
+
             def visit(task):
                 color[task] = GRAY
                 for dep in depends.get(task, ()):
@@ -126,6 +127,7 @@ class BSPCheckLayer(OECheckLayerTestCase):
                     visit(task)
 
         taskname_order = dict([(task, index) for index, task in enumerate(taskname_list)])
+
         def task_key(task):
             pn, taskname = task.rsplit(':', 1)
             return (pn, taskname_order.get(taskname, len(taskname_list)), taskname)
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
index 3c3562c931..5562835ba2 100644
--- a/scripts/lib/checklayer/cases/common.py
+++ b/scripts/lib/checklayer/cases/common.py
@@ -9,6 +9,7 @@ import unittest
 from checklayer import get_signatures, LayerType, check_command, get_depgraph, compare_signatures
 from checklayer.case import OECheckLayerTestCase
 
+
 class CommonCheckLayer(OECheckLayerTestCase):
     def test_readme(self):
         # The top-level README file may have a suffix (like README.rst or README.txt).
diff --git a/scripts/lib/checklayer/cases/distro.py b/scripts/lib/checklayer/cases/distro.py
index 4efde4b44a..decac32ffd 100644
--- a/scripts/lib/checklayer/cases/distro.py
+++ b/scripts/lib/checklayer/cases/distro.py
@@ -8,6 +8,7 @@ import unittest
 from checklayer import LayerType
 from checklayer.case import OECheckLayerTestCase
 
+
 class DistroCheckLayer(OECheckLayerTestCase):
     @classmethod
     def setUpClass(self):
diff --git a/scripts/lib/checklayer/context.py b/scripts/lib/checklayer/context.py
index 4de8f668fd..460557f747 100644
--- a/scripts/lib/checklayer/context.py
+++ b/scripts/lib/checklayer/context.py
@@ -10,6 +10,7 @@ import re
 
 from oeqa.core.context import OETestContext
 
+
 class CheckLayerTestContext(OETestContext):
     def __init__(self, td=None, logger=None, layer=None, test_software_layer_signatures=True):
         super(CheckLayerTestContext, self).__init__(td, logger)
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index 702db669de..beb61a3705 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -17,8 +17,10 @@ import codecs
 
 logger = logging.getLogger('devtool')
 
+
 class DevtoolError(Exception):
     """Exception for handling devtool errors"""
+
     def __init__(self, message, exitcode=1):
         super(DevtoolError, self).__init__(message)
         self.exitcode = exitcode
@@ -48,6 +50,7 @@ def exec_build_env_command(init_path, builddir, cmd, watch=False, **options):
     else:
         return bb.process.run('%s%s' % (init_prefix, cmd), **options)
 
+
 def exec_watch(cmd, **options):
     """Run program with stdout shown on sys.stdout"""
     import bb
@@ -74,6 +77,7 @@ def exec_watch(cmd, **options):
 
     return buf, None
 
+
 def exec_fakeroot(d, cmd, **kwargs):
     """Run a command under fakeroot (pseudo, in fact) so that it picks up the appropriate file permissions"""
     # Grab the command and check it actually exists
@@ -90,6 +94,7 @@ def exec_fakeroot(d, cmd, **kwargs):
             newenv[splitval[0]] = splitval[1]
     return subprocess.call("%s %s" % (fakerootcmd, cmd), env=newenv, **kwargs)
 
+
 def setup_tinfoil(config_only=False, basepath=None, tracking=False):
     """Initialize tinfoil api from bitbake"""
     import scriptpath
@@ -117,6 +122,7 @@ def setup_tinfoil(config_only=False, basepath=None, tracking=False):
         os.chdir(orig_cwd)
     return tinfoil
 
+
 def parse_recipe(config, tinfoil, pn, appends, filter_workspace=True):
     """Parse the specified recipe"""
     try:
@@ -139,6 +145,7 @@ def parse_recipe(config, tinfoil, pn, appends, filter_workspace=True):
         return None
     return rd
 
+
 def check_workspace_recipe(workspace, pn, checksrc=True, bbclassextend=False):
     """
     Check that a recipe is in the workspace and (optionally) that source
@@ -169,6 +176,7 @@ def check_workspace_recipe(workspace, pn, checksrc=True, bbclassextend=False):
 
     return workspacepn
 
+
 def use_external_build(same_dir, no_same_dir, d):
     """
     Determine if we should use B!=S (separate build and source directories) or not
@@ -187,6 +195,7 @@ def use_external_build(same_dir, no_same_dir, d):
         b_is_s = False
     return b_is_s
 
+
 def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None):
     """
     Set up the git repository for the source tree
@@ -233,6 +242,7 @@ def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None):
     bb.process.run('git checkout -b %s' % devbranch, cwd=repodir)
     bb.process.run('git tag -f %s' % basetag, cwd=repodir)
 
+
 def recipe_to_append(recipefile, config, wildcard=False):
     """
     Convert a recipe file to a bbappend file path within the workspace.
@@ -247,6 +257,7 @@ def recipe_to_append(recipefile, config, wildcard=False):
     appendfile = os.path.join(appendpath, appendname + '.bbappend')
     return appendfile
 
+
 def get_bbclassextend_targets(recipefile, pn):
     """
     Cheap function to get BBCLASSEXTEND and then convert that to the
@@ -255,6 +266,7 @@ def get_bbclassextend_targets(recipefile, pn):
     import bb.utils
 
     values = {}
+
     def get_bbclassextend_varfunc(varname, origvalue, op, newlines):
         values[varname] = origvalue
         return origvalue, None, 0, True
@@ -271,6 +283,7 @@ def get_bbclassextend_targets(recipefile, pn):
                 targets.append('%s-%s' % (pn, variant))
     return targets
 
+
 def replace_from_file(path, old, new):
     """Replace strings on a file"""
 
@@ -325,6 +338,7 @@ def update_unlockedsigs(basepath, workspace, fixed_setup, extra=None):
 
     # Get current unlocked list if any
     values = {}
+
     def get_unlockedsigs_varfunc(varname, origvalue, op, newlines):
         values[varname] = origvalue
         return origvalue, None, 0, True
@@ -348,6 +362,7 @@ def update_unlockedsigs(basepath, workspace, fixed_setup, extra=None):
                 f.write('    ' + pn)
             f.write('"')
 
+
 def check_prerelease_version(ver, operation):
     if 'pre' in ver or 'rc' in ver:
         logger.warning('Version "%s" looks like a pre-release version. '
@@ -361,11 +376,13 @@ def check_prerelease_version(ver, operation):
                        'the version after %s succeeds using "devtool rename" '
                        'with -V/--version.' % (ver, operation))
 
+
 def check_git_repo_dirty(repodir):
     """Check if a git repository is clean or not"""
     stdout, _ = bb.process.run('git status --porcelain', cwd=repodir)
     return stdout
 
+
 def check_git_repo_op(srctree, ignoredirs=None):
     """Check if a git repository is in the middle of a rebase"""
     stdout, _ = bb.process.run('git rev-parse --show-toplevel', cwd=srctree)
diff --git a/scripts/lib/devtool/build.py b/scripts/lib/devtool/build.py
index 935ffab46c..cc38846222 100644
--- a/scripts/lib/devtool/build.py
+++ b/scripts/lib/devtool/build.py
@@ -37,10 +37,12 @@ def _set_file_values(fn, values):
             f.writelines(newlines)
     return updated
 
+
 def _get_build_tasks(config):
     tasks = config.get('Build', 'build_task', 'populate_sysroot,packagedata').split(',')
     return ['do_%s' % task.strip() for task in tasks]
 
+
 def build(args, config, basepath, workspace):
     """Entry point for the devtool 'build' subcommand"""
     workspacepn = check_workspace_recipe(workspace, args.recipename, bbclassextend=True)
@@ -81,6 +83,7 @@ def build(args, config, basepath, workspace):
 
     return 0
 
+
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
     parser_build = subparsers.add_parser('build', help='Build a recipe',
diff --git a/scripts/lib/devtool/build_image.py b/scripts/lib/devtool/build_image.py
index 9388abbacf..dd5d59f7a6 100644
--- a/scripts/lib/devtool/build_image.py
+++ b/scripts/lib/devtool/build_image.py
@@ -16,9 +16,11 @@ from devtool import exec_build_env_command, setup_tinfoil, parse_recipe, Devtool
 
 logger = logging.getLogger('devtool')
 
+
 class TargetNotImageError(Exception):
     pass
 
+
 def _get_packages(tinfoil, workspace, config):
     """Get list of packages from recipes in the workspace."""
     result = []
@@ -32,6 +34,7 @@ def _get_packages(tinfoil, workspace, config):
                                "package with the same name", recipe)
     return result
 
+
 def build_image(args, config, basepath, workspace):
     """Entry point for the devtool 'build-image' subcommand."""
 
@@ -62,6 +65,7 @@ def build_image(args, config, basepath, workspace):
                     % (image, outputdir))
     return result
 
+
 def build_image_task(config, basepath, workspace, image, add_packages=None, task=None, extra_append=None):
     # remove <image>.bbappend to make sure setup_tinfoil doesn't
     # break because of it
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index 31b029eaf8..ba2ecd68e4 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -22,6 +22,7 @@ logger = logging.getLogger('devtool')
 
 deploylist_path = '/.devtool'
 
+
 def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=False, nopreserve=False, nocheckspace=False):
     """
     Prepare a shell script for running on the target to
@@ -134,7 +135,6 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals
     return '\n'.join(lines)
 
 
-
 def deploy(args, config, basepath, workspace):
     """Entry point for the devtool 'deploy' subcommand"""
     import math
@@ -267,6 +267,7 @@ def deploy(args, config, basepath, workspace):
 
     return 0
 
+
 def undeploy(args, config, basepath, workspace):
     """Entry point for the devtool 'undeploy' subcommand"""
     if args.all and args.recipename:
diff --git a/scripts/lib/devtool/export.py b/scripts/lib/devtool/export.py
index 8e8800c0aa..39ab29beca 100644
--- a/scripts/lib/devtool/export.py
+++ b/scripts/lib/devtool/export.py
@@ -19,6 +19,7 @@ logger = logging.getLogger('devtool')
 default_arcname_prefix = "workspace-export"
 metadata = '.export_metadata'
 
+
 def export(args, config, basepath, workspace):
     """Entry point for the devtool 'export' subcommand"""
 
@@ -46,7 +47,6 @@ def export(args, config, basepath, workspace):
         for name, arcname in arcnames:
             tar.add(name, arcname=arcname)
 
-
     # Make sure workspace is non-empty and possible listed include/excluded recipes are in workspace
     if not workspace:
         logger.info('Workspace contains no recipes, nothing to export')
@@ -94,6 +94,7 @@ def export(args, config, basepath, workspace):
     logger.info('Tar archive created at %s with the following recipes: %s' % (name, ', '.join(exported)))
     return 0
 
+
 def register_commands(subparsers, context):
     """Register devtool export subcommands"""
     parser = subparsers.add_parser('export',
diff --git a/scripts/lib/devtool/import.py b/scripts/lib/devtool/import.py
index 6829851669..a74fa4daa8 100644
--- a/scripts/lib/devtool/import.py
+++ b/scripts/lib/devtool/import.py
@@ -18,6 +18,7 @@ from devtool import export
 
 logger = logging.getLogger('devtool')
 
+
 def devimport(args, config, basepath, workspace):
     """Entry point for the devtool 'import' subcommand"""
 
@@ -123,6 +124,7 @@ def devimport(args, config, basepath, workspace):
 
     return 0
 
+
 def register_commands(subparsers, context):
     """Register devtool import subcommands"""
     parser = subparsers.add_parser('import',
diff --git a/scripts/lib/devtool/menuconfig.py b/scripts/lib/devtool/menuconfig.py
index 9275ba7c52..d32a347371 100644
--- a/scripts/lib/devtool/menuconfig.py
+++ b/scripts/lib/devtool/menuconfig.py
@@ -28,6 +28,7 @@ from devtool import setup_tinfoil, parse_recipe, DevtoolError, standard, exec_bu
 from devtool import check_workspace_recipe
 logger = logging.getLogger('devtool')
 
+
 def menuconfig(args, config, basepath, workspace):
     """Entry point for the devtool 'menuconfig' subcommand"""
 
@@ -72,6 +73,7 @@ def menuconfig(args, config, basepath, workspace):
 
     return 0
 
+
 def register_commands(subparsers, context):
     """register devtool subcommands from this plugin"""
     parser_menuconfig = subparsers.add_parser('menuconfig', help='Alter build-time configuration for a recipe', description='Launches the make menuconfig command (for recipes where do_menuconfig is available), allowing users to make changes to the build-time configuration. Creates a config fragment corresponding to changes made.', group='advanced')
diff --git a/scripts/lib/devtool/package.py b/scripts/lib/devtool/package.py
index c2367342c3..af40b2630a 100644
--- a/scripts/lib/devtool/package.py
+++ b/scripts/lib/devtool/package.py
@@ -14,6 +14,7 @@ from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recip
 
 logger = logging.getLogger('devtool')
 
+
 def package(args, config, basepath, workspace):
     """Entry point for the devtool 'package' subcommand"""
     check_workspace_recipe(workspace, args.recipename)
@@ -39,6 +40,7 @@ def package(args, config, basepath, workspace):
 
     return 0
 
+
 def register_commands(subparsers, context):
     """Register devtool subcommands from the package plugin"""
     if context.fixed_setup:
diff --git a/scripts/lib/devtool/runqemu.py b/scripts/lib/devtool/runqemu.py
index ead978aabc..91956beee7 100644
--- a/scripts/lib/devtool/runqemu.py
+++ b/scripts/lib/devtool/runqemu.py
@@ -16,6 +16,7 @@ from devtool import exec_build_env_command, setup_tinfoil, DevtoolError
 
 logger = logging.getLogger('devtool')
 
+
 def runqemu(args, config, basepath, workspace):
     """Entry point for the devtool 'runqemu' subcommand"""
 
@@ -52,6 +53,7 @@ def runqemu(args, config, basepath, workspace):
 
     return 0
 
+
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
     if context.fixed_setup:
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index 5e22f91507..bbe9560a04 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -18,6 +18,7 @@ from devtool import exec_build_env_command, setup_tinfoil, parse_recipe, Devtool
 
 logger = logging.getLogger('devtool')
 
+
 def parse_locked_sigs(sigfile_path):
     """Return <pn:task>:<hash> dictionary"""
     sig_dict = {}
@@ -29,6 +30,7 @@ def parse_locked_sigs(sigfile_path):
                 sig_dict[taskkey.strip()] = hashval.split()[0]
     return sig_dict
 
+
 def generate_update_dict(sigfile_new, sigfile_old):
     """Return a dict containing <pn:task>:<hash> which indicates what need to be updated"""
     update_dict = {}
@@ -43,6 +45,7 @@ def generate_update_dict(sigfile_new, sigfile_old):
             continue
     return update_dict
 
+
 def get_sstate_objects(update_dict, sstate_dir):
     """Return a list containing sstate objects which are to be installed"""
     sstate_objects = []
@@ -61,6 +64,7 @@ def get_sstate_objects(update_dict, sstate_dir):
 
     return sstate_objects
 
+
 def mkdir(d):
     try:
         os.makedirs(d)
@@ -68,6 +72,7 @@ def mkdir(d):
         if e.errno != errno.EEXIST:
             raise e
 
+
 def install_sstate_objects(sstate_objects, src_sdk, dest_sdk):
     """Install sstate objects into destination SDK"""
     sstate_dir = os.path.join(dest_sdk, 'sstate-cache')
@@ -81,6 +86,7 @@ def install_sstate_objects(sstate_objects, src_sdk, dest_sdk):
         logger.debug("Copying %s to %s" % (sb, dst))
         shutil.copy(sb, dst)
 
+
 def check_manifest(fn, basepath):
     import bb.utils
     changedfiles = []
@@ -96,6 +102,7 @@ def check_manifest(fn, basepath):
                     changedfiles.append(fpath)
     return changedfiles
 
+
 def sdk_update(args, config, basepath, workspace):
     """Entry point for devtool sdk-update command"""
     updateserver = args.updateserver
@@ -238,6 +245,7 @@ def sdk_update(args, config, basepath, workspace):
             return -1
     return 0
 
+
 def sdk_install(args, config, basepath, workspace):
     """Entry point for the devtool sdk-install command"""
 
@@ -250,6 +258,7 @@ def sdk_install(args, config, basepath, workspace):
 
     tasks = ['do_populate_sysroot', 'do_packagedata']
     stampprefixes = {}
+
     def checkstamp(recipe):
         stampprefix = stampprefixes[recipe]
         stamps = glob.glob(stampprefix + '*')
diff --git a/scripts/lib/devtool/search.py b/scripts/lib/devtool/search.py
index d24040df37..c66e7e41d4 100644
--- a/scripts/lib/devtool/search.py
+++ b/scripts/lib/devtool/search.py
@@ -16,6 +16,7 @@ from devtool import setup_tinfoil, parse_recipe, DevtoolError
 
 logger = logging.getLogger('devtool')
 
+
 def search(args, config, basepath, workspace):
     """Entry point for the devtool 'search' subcommand"""
 
@@ -35,7 +36,6 @@ def search(args, config, basepath, workspace):
                 summary = ''
             print("%s  %s" % (pn.ljust(20), summary))
 
-
         matches = []
         if os.path.exists(pkgdata_dir):
             for fn in os.listdir(pkgdata_dir):
@@ -99,6 +99,7 @@ def search(args, config, basepath, workspace):
 
     return 0
 
+
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
     parser_search = subparsers.add_parser('search', help='Search available recipes',
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 27f50b7ab1..0f6d60a860 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -329,6 +329,7 @@ def _check_compatible_recipe(pn, d):
                            "from working. You will need to disable this "
                            "first." % pn)
 
+
 def _dry_run_copy(src, dst, dry_run_outdir, base_outdir):
     """Common function for copying a file to the dry run output directory"""
     relpath = os.path.relpath(dst, base_outdir)
@@ -344,6 +345,7 @@ def _dry_run_copy(src, dst, dry_run_outdir, base_outdir):
     if not os.path.exists(dst):
         shutil.copy(src, dst)
 
+
 def _move_file(src, dst, dry_run_outdir=None, base_outdir=None):
     """Move a file. Creates all the directory components of destination path."""
     dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
@@ -357,6 +359,7 @@ def _move_file(src, dst, dry_run_outdir=None, base_outdir=None):
             bb.utils.mkdirhier(dst_d)
         shutil.move(src, dst)
 
+
 def _copy_file(src, dst, dry_run_outdir=None):
     """Copy a file. Creates all the directory components of destination path."""
     dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
@@ -369,6 +372,7 @@ def _copy_file(src, dst, dry_run_outdir=None):
             bb.utils.mkdirhier(dst_d)
         shutil.copy(src, dst)
 
+
 def _git_ls_tree(repodir, treeish='HEAD', recursive=False):
     """List contents of a git treeish"""
     import bb
@@ -384,6 +388,7 @@ def _git_ls_tree(repodir, treeish='HEAD', recursive=False):
                 ret[split[3]] = split[0:3]
     return ret
 
+
 def _git_exclude_path(srctree, path):
     """Return pathspec (list of paths) that excludes certain path"""
     # NOTE: "Filtering out" files/paths in this way is not entirely reliable -
@@ -400,6 +405,7 @@ def _git_exclude_path(srctree, path):
     else:
         return ['.']
 
+
 def _ls_tree(directory):
     """Recursive listing of files in a directory"""
     ret = []
@@ -433,6 +439,7 @@ def extract(args, config, basepath, workspace):
     finally:
         tinfoil.shutdown()
 
+
 def sync(args, config, basepath, workspace):
     """Entry point for the devtool 'sync' subcommand"""
     import bb
@@ -457,6 +464,7 @@ def sync(args, config, basepath, workspace):
     finally:
         tinfoil.shutdown()
 
+
 def symlink_oelocal_files_srctree(rd, srctree):
     import oe.patch
     if os.path.abspath(rd.getVar('S')) == os.path.abspath(rd.getVar('WORKDIR')):
@@ -697,6 +705,7 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
             shutil.rmtree(tempdir)
     return initial_rev, srcsubdir_rel
 
+
 def _add_md5(config, recipename, filename):
     """Record checksum of a file (or recursively for a directory) to the md5-file of the workspace"""
     import bb.utils
@@ -716,6 +725,7 @@ def _add_md5(config, recipename, filename):
     else:
         addfile(filename)
 
+
 def _check_preserve(config, recipename):
     """Check if a file was manually changed and needs to be saved in 'attic'
        directory"""
@@ -748,6 +758,7 @@ def _check_preserve(config, recipename):
                     tf.write(line)
     bb.utils.rename(newfile, origfile)
 
+
 def get_staging_kver(srcdir):
     # Kernel version from work-shared
     kerver = []
@@ -760,6 +771,7 @@ def get_staging_kver(srcdir):
             staging_kerVer = ".".join(kerver)
     return staging_kerVer
 
+
 def get_staging_kbranch(srcdir):
     staging_kbranch = ""
     if os.path.exists(srcdir) and os.listdir(srcdir):
@@ -767,6 +779,7 @@ def get_staging_kbranch(srcdir):
         staging_kbranch = "".join(branch.split('\n')[0])
     return staging_kbranch
 
+
 def modify(args, config, basepath, workspace):
     """Entry point for the devtool 'modify' subcommand"""
     import bb
@@ -1236,6 +1249,7 @@ def _get_patchset_revs(srctree, recipe_path, initial_rev=None, force_patch_refre
 
     return initial_rev, update_rev, changed_revs, patches
 
+
 def _remove_file_entries(srcuri, filelist):
     """Remove file:// entries from SRC_URI"""
     remaining = filelist[:]
@@ -1251,6 +1265,7 @@ def _remove_file_entries(srcuri, filelist):
                 break
     return entries, remaining
 
+
 def _replace_srcuri_entry(srcuri, filename, newentry):
     """Replace entry corresponding to specified file with a new entry"""
     basename = os.path.basename(filename)
@@ -1260,6 +1275,7 @@ def _replace_srcuri_entry(srcuri, filename, newentry):
             srcuri.insert(i, newentry)
             break
 
+
 def _remove_source_files(append, files, destpath, no_report_remove=False, dry_run=False):
     """Unlink existing patch files"""
 
@@ -1597,6 +1613,7 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi
     _remove_source_files(appendlayerdir, remove_files, destpath, no_report_remove, dry_run=dry_run_outdir)
     return True, appendfile, remove_files
 
+
 def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, no_report_remove, initial_rev, dry_run_outdir=None, force_patch_refresh=False):
     """Implement the 'patch' mode of update-recipe"""
     import bb
@@ -1739,6 +1756,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil
     _remove_source_files(appendlayerdir, remove_files, destpath, no_report_remove, dry_run=dry_run_outdir)
     return True, appendfile, remove_files
 
+
 def _guess_recipe_update_mode(srctree, rdata):
     """Guess the recipe update mode to use"""
     src_uri = (rdata.getVar('SRC_URI') or '').split()
@@ -1761,6 +1779,7 @@ def _guess_recipe_update_mode(srctree, rdata):
 
     return 'patch'
 
+
 def _update_recipe(recipename, workspace, rd, mode, appendlayerdir, wildcard_version, no_remove, initial_rev, no_report_remove=False, dry_run_outdir=None, no_overrides=False, force_patch_refresh=False):
     srctree = workspace[recipename]['srctree']
     if mode == 'auto':
@@ -1829,6 +1848,7 @@ def _update_recipe(recipename, workspace, rd, mode, appendlayerdir, wildcard_ver
 
     return anyupdated, appendfile, allremoved
 
+
 def update_recipe(args, config, basepath, workspace):
     """Entry point for the devtool 'update-recipe' subcommand"""
     check_workspace_recipe(workspace, args.recipename)
@@ -1937,6 +1957,7 @@ def _reset(recipes, no_clean, remove_work, config, basepath, workspace):
             os.remove(appendfile)
 
         preservepath = os.path.join(config.workspace_path, 'attic', pn, pn)
+
         def preservedir(origdir):
             if os.path.exists(origdir):
                 for root, dirs, files in os.walk(origdir):
@@ -1973,6 +1994,7 @@ def _reset(recipes, no_clean, remove_work, config, basepath, workspace):
 
         clean_preferred_provider(pn, config.workspace_path)
 
+
 def reset(args, config, basepath, workspace):
     """Entry point for the devtool 'reset' subcommand"""
     import bb
@@ -2211,6 +2233,7 @@ def get_default_srctree(config, recipename=''):
     else:
         return os.path.join(srctreeparent, 'sources')
 
+
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
 
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index 0605a01f87..d5ed52be33 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -26,10 +26,12 @@ from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_r
 
 logger = logging.getLogger('devtool')
 
+
 def _run(cmd, cwd=''):
     logger.debug("Running command %s> %s" % (cwd, cmd))
     return bb.process.run('%s' % cmd, cwd=cwd)
 
+
 def _get_srctree(tmpdir):
     srctree = tmpdir
     dirs = scriptutils.filter_src_subdirs(tmpdir)
@@ -37,6 +39,7 @@ def _get_srctree(tmpdir):
         srctree = os.path.join(tmpdir, dirs[0])
     return srctree
 
+
 def _copy_source_code(orig, dest):
     for path in standard._ls_tree(orig):
         dest_dir = os.path.join(dest, os.path.dirname(path))
@@ -44,11 +47,13 @@ def _copy_source_code(orig, dest):
         dest_path = os.path.join(dest, path)
         shutil.move(os.path.join(orig, path), dest_path)
 
+
 def _remove_patch_dirs(recipefolder):
     for root, dirs, files in os.walk(recipefolder):
         for d in dirs:
             shutil.rmtree(os.path.join(root, d))
 
+
 def _recipe_contains(rd, var):
     rf = rd.getVar('FILE')
     varfiles = oe.recipeutils.get_var_files(rf, [var], rd)
@@ -57,6 +62,7 @@ def _recipe_contains(rd, var):
             return True
     return False
 
+
 def _rename_recipe_dirs(oldpv, newpv, path):
     for root, dirs, files in os.walk(path):
         # Rename directories with the version in their name
@@ -74,6 +80,7 @@ def _rename_recipe_dirs(oldpv, newpv, path):
                         bb.utils.rename(os.path.join(path, oldfile),
                               os.path.join(path, newfile))
 
+
 def _rename_recipe_file(oldrecipe, bpn, oldpv, newpv, path):
     oldrecipe = os.path.basename(oldrecipe)
     if oldrecipe.endswith('_%s.bb' % oldpv):
@@ -84,10 +91,12 @@ def _rename_recipe_file(oldrecipe, bpn, oldpv, newpv, path):
         newrecipe = oldrecipe
     return os.path.join(path, newrecipe)
 
+
 def _rename_recipe_files(oldrecipe, bpn, oldpv, newpv, path):
     _rename_recipe_dirs(oldpv, newpv, path)
     return _rename_recipe_file(oldrecipe, bpn, oldpv, newpv, path)
 
+
 def _write_append(rc, srctree, same_dir, no_same_dir, rev, copied, workspace, d):
     """Writes an append file"""
     if not os.path.exists(rc):
@@ -119,6 +128,7 @@ def _write_append(rc, srctree, same_dir, no_same_dir, rev, copied, workspace, d)
             f.write('# original_files: %s\n' % ' '.join(copied))
     return af
 
+
 def _cleanup_on_error(rf, srctree):
     rfp = os.path.split(rf)[0] # recipe folder
     rfpp = os.path.split(rfp)[0] # recipes folder
@@ -130,6 +140,7 @@ def _cleanup_on_error(rf, srctree):
     if os.path.exists(srctree):
         shutil.rmtree(srctree)
 
+
 def _upgrade_error(e, rf, srctree, keep_failure=False, extramsg=None):
     if rf and not keep_failure:
         _cleanup_on_error(rf, srctree)
@@ -140,6 +151,7 @@ def _upgrade_error(e, rf, srctree, keep_failure=False, extramsg=None):
         logger.info('Preserving failed upgrade files (--keep-failure)')
     sys.exit(1)
 
+
 def _get_uri(rd):
     srcuris = rd.getVar('SRC_URI').split()
     if not len(srcuris):
@@ -163,6 +175,7 @@ def _get_uri(rd):
             srcuri = rev_re.sub('', srcuri)
     return srcuri, srcrev
 
+
 def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, keep_temp, tinfoil, rd):
     """Extract sources of a recipe with a new version"""
 
@@ -286,6 +299,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
 
     return (rev, md5, sha256, srcbranch, srcsubdir_rel)
 
+
 def _add_license_diff_to_recipe(path, diff):
     notice_text = """# FIXME: the LIC_FILES_CHKSUM values have been updated by 'devtool upgrade'.
 # The following is the difference between the old and the new license text.
@@ -305,6 +319,7 @@ def _add_license_diff_to_recipe(path, diff):
         f.write("\n#\n\n".encode())
         f.write(orig_content)
 
+
 def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, srcsubdir_new, workspace, tinfoil, rd, license_diff, new_licenses, srctree, keep_failure):
     """Creates the new recipe under workspace"""
 
@@ -452,6 +467,7 @@ def _check_git_config():
     if configerr:
         raise DevtoolError('Your git configuration is incomplete which will prevent rebases from working:\n' + '\n'.join(configerr))
 
+
 def _extract_licenses(srcpath, recipe_licenses):
     licenses = []
     for url in recipe_licenses.split():
@@ -478,6 +494,7 @@ def _extract_licenses(srcpath, recipe_licenses):
         licenses.append(license)
     return licenses
 
+
 def _generate_license_diff(old_licenses, new_licenses):
     need_diff = False
     for l in new_licenses:
@@ -494,6 +511,7 @@ def _generate_license_diff(old_licenses, new_licenses):
             diff = diff + line
     return diff
 
+
 def upgrade(args, config, basepath, workspace):
     """Entry point for the devtool 'upgrade' subcommand"""
 
@@ -578,6 +596,7 @@ def upgrade(args, config, basepath, workspace):
         tinfoil.shutdown()
     return 0
 
+
 def latest_version(args, config, basepath, workspace):
     """Entry point for the devtool 'latest_version' subcommand"""
     tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
@@ -598,6 +617,7 @@ def latest_version(args, config, basepath, workspace):
         tinfoil.shutdown()
     return 0
 
+
 def check_upgrade_status(args, config, basepath, workspace):
     if not args.recipe:
         logger.info("Checking the upstream status for all recipes may take a few minutes")
@@ -612,6 +632,7 @@ def check_upgrade_status(args, config, basepath, workspace):
                                                                result[5] if result[5] != 'N/A' else "",
                                                                "cannot be updated due to: %s" % (result[6]) if result[6] else ""))
 
+
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
 
diff --git a/scripts/lib/devtool/utilcmds.py b/scripts/lib/devtool/utilcmds.py
index 964817766b..dbe69b03b2 100644
--- a/scripts/lib/devtool/utilcmds.py
+++ b/scripts/lib/devtool/utilcmds.py
@@ -20,6 +20,7 @@ from devtool import parse_recipe
 
 logger = logging.getLogger('devtool')
 
+
 def _find_recipe_path(args, config, basepath, workspace):
     if args.any_recipe:
         logger.warning('-a/--any-recipe option is now always active, and thus the option will be removed in a future release')
diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py
index ce91c3713c..8955664706 100644
--- a/scripts/lib/recipetool/append.py
+++ b/scripts/lib/recipetool/append.py
@@ -23,6 +23,7 @@ logger = logging.getLogger('recipetool')
 
 tinfoil = None
 
+
 def tinfoil_init(instance):
     global tinfoil
     tinfoil = instance
@@ -34,6 +35,7 @@ def tinfoil_init(instance):
 class InvalidTargetFileError(Exception):
     pass
 
+
 def find_target_file(targetpath, d, pkglist=None):
     """Find the recipe installing the specified target path, optionally limited to a select list of packages"""
     import json
@@ -87,6 +89,7 @@ def find_target_file(targetpath, d, pkglist=None):
                             recipes[targetpath].append('!%s' % pn)
     return recipes
 
+
 def _parse_recipe(pn, tinfoil):
     try:
         rd = tinfoil.parse_recipe(pn)
@@ -95,6 +98,7 @@ def _parse_recipe(pn, tinfoil):
         return None
     return rd
 
+
 def determine_file_source(targetpath, rd):
     """Assuming we know a file came from a specific recipe, figure out exactly where it came from"""
     import oe.recipeutils
@@ -144,6 +148,7 @@ def determine_file_source(targetpath, rd):
 
     return (srcfile, elements, modpatches)
 
+
 def get_source_path(cmdelements):
     """Find the source path specified within a command"""
     command = cmdelements[0]
@@ -178,6 +183,7 @@ def get_source_path(cmdelements):
     else:
         raise Exception('get_source_path: no handling for command "%s"')
 
+
 def get_func_deps(func, d):
     """Find the function dependencies of a shell function"""
     deps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func))
@@ -188,6 +194,7 @@ def get_func_deps(func, d):
             funcdeps.append(dep)
     return funcdeps
 
+
 def check_do_install(rd, targetpath):
     """Look at do_install for a command that installs/copies the specified target path"""
     instpath = os.path.abspath(os.path.join(rd.getVar('D'), targetpath.lstrip('/')))
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 9d531948e5..cd8ac24af4 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -22,27 +22,32 @@ logger = logging.getLogger('recipetool')
 tinfoil = None
 plugins = None
 
+
 def log_error_cond(message, debugonly):
     if debugonly:
         logger.debug(message)
     else:
         logger.error(message)
 
+
 def log_info_cond(message, debugonly):
     if debugonly:
         logger.debug(message)
     else:
         logger.info(message)
 
+
 def plugin_init(pluginlist):
     # Take a reference to the list so we can use it later
     global plugins
     plugins = pluginlist
 
+
 def tinfoil_init(instance):
     global tinfoil
     tinfoil = instance
 
+
 class RecipeHandler(object):
     recipelibmap = {}
     recipeheadermap = {}
@@ -264,6 +269,7 @@ def validate_pv(pv):
         return False
     return True
 
+
 def determine_from_filename(srcfile):
     """Determine name and version from a filename"""
     if is_package(srcfile):
@@ -311,6 +317,7 @@ def determine_from_filename(srcfile):
     logger.debug('determine_from_filename: name = "%s" version = "%s"' % (pn, pv))
     return (pn, pv)
 
+
 def determine_from_url(srcuri):
     """Determine name and version from a URL"""
     pn = None
@@ -345,6 +352,7 @@ def determine_from_url(srcuri):
     logger.debug('Determined from source URL: name = "%s", version = "%s"' % (pn, pv))
     return (pn, pv)
 
+
 def supports_srcrev(uri):
     localdata = bb.data.createCopy(tinfoil.config_data)
     # This is a bit sad, but if you don't have this set there can be some
@@ -363,6 +371,7 @@ def supports_srcrev(uri):
             return True
     return False
 
+
 def reformat_git_uri(uri):
     '''Convert any http[s]://....git URI into git://...;protocol=http[s]'''
     checkuri = uri.split(';', 1)[0]
@@ -395,6 +404,7 @@ def reformat_git_uri(uri):
     else:
         return uri
 
+
 def is_package(url):
     '''Check if a URL points to a package'''
     checkurl = url.split(';', 1)[0]
@@ -402,6 +412,7 @@ def is_package(url):
         return True
     return False
 
+
 def create_recipe(args):
     import bb.process
     import tempfile
@@ -904,6 +915,7 @@ def create_recipe(args):
 
     return 0
 
+
 def check_single_file(fn, fetchuri):
     """Determine if a single downloaded file is something we can't handle"""
     with open(fn, 'r', errors='surrogateescape') as f:
@@ -911,12 +923,14 @@ def check_single_file(fn, fetchuri):
             logger.error('Fetching "%s" returned a single HTML page - check the URL is correct and functional' % fetchuri)
             sys.exit(1)
 
+
 def split_value(value):
     if isinstance(value, str):
         return value.split()
     else:
         return value
 
+
 def handle_license_vars(srctree, lines_before, handled, extravalues, d):
     lichandled = [x for x in handled if x[0] == 'license']
     if lichandled:
@@ -1002,6 +1016,7 @@ def handle_license_vars(srctree, lines_before, handled, extravalues, d):
     handled.append(('license', licvalues))
     return licvalues
 
+
 def get_license_md5sums(d, static_only=False):
     import bb.utils
     md5sums = {}
@@ -1053,6 +1068,7 @@ def get_license_md5sums(d, static_only=False):
     md5sums['bfe1f75d606912a4111c90743d6c7325'] = 'MPL-1.1'
     return md5sums
 
+
 def crunch_license(licfile):
     '''
     Remove non-material text from a license file and then check
@@ -1127,6 +1143,7 @@ def crunch_license(licfile):
     license = crunched_md5sums.get(md5val, None)
     return license, md5val, lictext
 
+
 def guess_license(srctree, d):
     import bb
     md5sums = get_license_md5sums(d)
@@ -1154,6 +1171,7 @@ def guess_license(srctree, d):
 
     return licenses
 
+
 def split_pkg_licenses(licvalues, packages, outlines, fallback_licenses=None, pn='${PN}'):
     """
     Given a list of (license, path, md5sum) as returned by guess_license(),
@@ -1181,6 +1199,7 @@ def split_pkg_licenses(licvalues, packages, outlines, fallback_licenses=None, pn
         outlicenses[pkgname] = license.split()
     return outlicenses
 
+
 def read_pkgconfig_provides(d):
     pkgdatadir = d.getVar('PKGDATA_DIR')
     pkgmap = {}
@@ -1198,6 +1217,7 @@ def read_pkgconfig_provides(d):
                         recipemap[pc] = line.split(':', 1)[1].strip()
     return recipemap
 
+
 def convert_debian(debpath):
     value_map = {'Package': 'PN',
                  'Version': 'PV',
@@ -1268,6 +1288,7 @@ def convert_debian(debpath):
 
     return values
 
+
 def convert_rpm_xml(xmlfile):
     '''Converts the output from rpm -qp --xml to a set of variable values'''
     import xml.etree.ElementTree as ElementTree
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py
index 44b398d792..3a040b74be 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -15,11 +15,13 @@ logger = logging.getLogger('recipetool')
 tinfoil = None
 plugins = None
 
+
 def plugin_init(pluginlist):
     # Take a reference to the list so we can use it later
     global plugins
     plugins = pluginlist
 
+
 def tinfoil_init(instance):
     global tinfoil
     tinfoil = instance
@@ -279,6 +281,7 @@ class CmakeRecipeHandler(RecipeHandler):
 
 class CmakeExtensionHandler(object):
     '''Base class for CMake extension handlers'''
+
     def process_line(self, srctree, fn, line, libdeps, pcdeps, deps, outlines, inherits, values):
         '''
         Handle a line parsed out of an CMake file.
@@ -300,7 +303,6 @@ class CmakeExtensionHandler(object):
         return
 
 
-
 class SconsRecipeHandler(RecipeHandler):
     def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
         if 'buildsystem' in handled:
@@ -435,6 +437,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
         version_re = re.compile('([0-9.]+)')
 
         defines = {}
+
         def subst_defines(value):
             newvalue = value
             for define, defval in defines.items():
@@ -703,6 +706,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
 
 class AutotoolsExtensionHandler(object):
     '''Base class for Autotools extension handlers'''
+
     def process_macro(self, srctree, keyword, value, process_value, libdeps, pcdeps, deps, outlines, inherits, values):
         '''
         Handle a macro parsed out of an autotools file. Note that if you want this to be called
@@ -862,6 +866,7 @@ class SpecFileRecipeHandler(RecipeHandler):
                 lines_before.append(liccomment)
         extravalues.update(foundvalues)
 
+
 def register_recipe_handlers(handlers):
     # Set priorities with some gaps so that other plugins can insert
     # their own handlers (so avoid changing these numbers)
diff --git a/scripts/lib/recipetool/create_kernel.py b/scripts/lib/recipetool/create_kernel.py
index 5740589a68..a1fa5e6247 100644
--- a/scripts/lib/recipetool/create_kernel.py
+++ b/scripts/lib/recipetool/create_kernel.py
@@ -13,6 +13,7 @@ logger = logging.getLogger('recipetool')
 
 tinfoil = None
 
+
 def tinfoil_init(instance):
     global tinfoil
     tinfoil = instance
@@ -32,6 +33,7 @@ class KernelRecipeHandler(RecipeHandler):
         del lines_after[:]
         del classes[:]
         template = os.path.join(tinfoil.config_data.getVar('COREBASE'), 'meta-skeleton', 'recipes-kernel', 'linux', 'linux-yocto-custom.bb')
+
         def handle_var(varname, origvalue, op, newlines):
             if varname in ['SRCREV', 'SRCREV_machine']:
                 while newlines[-1].startswith('#'):
@@ -85,5 +87,6 @@ class KernelRecipeHandler(RecipeHandler):
 
         return True
 
+
 def register_recipe_handlers(handlers):
     handlers.append((KernelRecipeHandler(), 100))
diff --git a/scripts/lib/recipetool/create_kmod.py b/scripts/lib/recipetool/create_kmod.py
index 85b5c48e53..3e8217561e 100644
--- a/scripts/lib/recipetool/create_kmod.py
+++ b/scripts/lib/recipetool/create_kmod.py
@@ -13,6 +13,7 @@ logger = logging.getLogger('recipetool')
 
 tinfoil = None
 
+
 def tinfoil_init(instance):
     global tinfoil
     tinfoil = instance
@@ -138,5 +139,6 @@ class KernelModuleRecipeHandler(RecipeHandler):
 
         return False
 
+
 def register_recipe_handlers(handlers):
     handlers.append((KernelModuleRecipeHandler(), 15))
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py
index 4f24d621a7..448081735f 100644
--- a/scripts/lib/recipetool/create_npm.py
+++ b/scripts/lib/recipetool/create_npm.py
@@ -19,11 +19,13 @@ from recipetool.create import split_pkg_licenses
 
 TINFOIL = None
 
+
 def tinfoil_init(instance):
     """Initialize tinfoil"""
     global TINFOIL
     TINFOIL = instance
 
+
 class NpmRecipeHandler(RecipeHandler):
     """Class to handle the npm recipe creation"""
 
@@ -254,6 +256,7 @@ class NpmRecipeHandler(RecipeHandler):
 
         return True
 
+
 def register_recipe_handlers(handlers):
     """Register the npm handler"""
     handlers.append((NpmRecipeHandler(), 60))
diff --git a/scripts/lib/recipetool/setvar.py b/scripts/lib/recipetool/setvar.py
index f8e2ee75fb..b789254793 100644
--- a/scripts/lib/recipetool/setvar.py
+++ b/scripts/lib/recipetool/setvar.py
@@ -19,10 +19,12 @@ logger = logging.getLogger('recipetool')
 tinfoil = None
 plugins = None
 
+
 def tinfoil_init(instance):
     global tinfoil
     tinfoil = instance
 
+
 def setvar(args):
     import oe.recipeutils
 
diff --git a/scripts/lib/resulttool/log.py b/scripts/lib/resulttool/log.py
index eb3927ec82..c46d5b4b5c 100644
--- a/scripts/lib/resulttool/log.py
+++ b/scripts/lib/resulttool/log.py
@@ -7,6 +7,7 @@
 import os
 import resulttool.resultutils as resultutils
 
+
 def show_ptest(result, ptest, logger):
     logdata = resultutils.ptestresult_get_log(result, ptest)
     if logdata is not None:
@@ -16,6 +17,7 @@ def show_ptest(result, ptest, logger):
     print("ptest '%s' log not found" % ptest)
     return 1
 
+
 def show_reproducible(result, reproducible, logger):
     try:
         print(result['reproducible'][reproducible]['diffoscope.text'])
@@ -25,6 +27,7 @@ def show_reproducible(result, reproducible, logger):
         print("reproducible '%s' not found" % reproducible)
         return 1
 
+
 def log(args, logger):
     results = resultutils.load_resultsdata(args.source)
 
@@ -78,6 +81,7 @@ def log(args, logger):
             if not show_reproducible(r, reproducible, logger):
                 return 1
 
+
 def register_commands(subparsers):
     """Register subcommands from this plugin"""
     parser = subparsers.add_parser('log', help='show logs',
diff --git a/scripts/lib/resulttool/manualexecution.py b/scripts/lib/resulttool/manualexecution.py
index 2bd4f6f136..9bf51dd047 100755
--- a/scripts/lib/resulttool/manualexecution.py
+++ b/scripts/lib/resulttool/manualexecution.py
@@ -19,11 +19,13 @@ def load_json_file(f):
     with open(f, "r") as filedata:
         return json.load(filedata)
 
+
 def write_json_file(f, json_data):
     os.makedirs(os.path.dirname(f), exist_ok=True)
     with open(f, 'w') as filedata:
         filedata.write(json.dumps(json_data, sort_keys=True, indent=4))
 
+
 class ManualTestRunner(object):
 
     def _get_test_module(self, case_file):
@@ -205,6 +207,7 @@ class ManualTestRunner(object):
         write_json_file(testcase_config_file, new_testcase_config)
         logger.info('Testcase Configuration file created at %s' % testcase_config_file)
 
+
 def manualexecution(args, logger):
     testrunner = ManualTestRunner()
     if args.make_config_options_file:
@@ -218,6 +221,7 @@ def manualexecution(args, logger):
     resultjsonhelper.dump_testresult_file(write_dir, configurations, result_id, test_results)
     return 0
 
+
 def register_commands(subparsers):
     """Register subcommands from this plugin"""
     parser_build = subparsers.add_parser('manualexecution', help='helper script for results populating during manual test execution.',
diff --git a/scripts/lib/resulttool/merge.py b/scripts/lib/resulttool/merge.py
index 18b4825a18..05d0b0ed13 100644
--- a/scripts/lib/resulttool/merge.py
+++ b/scripts/lib/resulttool/merge.py
@@ -10,6 +10,7 @@ import os
 import json
 import resulttool.resultutils as resultutils
 
+
 def merge(args, logger):
     configvars = {}
     if not args.not_add_testseries:
@@ -30,6 +31,7 @@ def merge(args, logger):
 
     return 0
 
+
 def register_commands(subparsers):
     """Register subcommands from this plugin"""
     parser_build = subparsers.add_parser('merge', help='merge test result files/directories/URLs',
diff --git a/scripts/lib/resulttool/regression.py b/scripts/lib/resulttool/regression.py
index 9f952951b3..c1f9460f2e 100644
--- a/scripts/lib/resulttool/regression.py
+++ b/scripts/lib/resulttool/regression.py
@@ -12,6 +12,7 @@ import json
 from oeqa.utils.git import GitRepo
 import oeqa.utils.gitarchive as gitarchive
 
+
 def compare_result(logger, base_name, target_name, base_result, target_result):
     base_result = base_result.get('result')
     target_result = target_result.get('result')
@@ -35,15 +36,18 @@ def compare_result(logger, base_name, target_name, base_result, target_result):
         resultstring = "Match: %s\n       %s" % (base_name, target_name)
     return result, resultstring
 
+
 def get_results(logger, source):
     return resultutils.load_resultsdata(source, configmap=resultutils.regression_map)
 
+
 def regression(args, logger):
     base_results = get_results(logger, args.base_result)
     target_results = get_results(logger, args.target_result)
 
     regression_common(args, logger, base_results, target_results)
 
+
 def regression_common(args, logger, base_results, target_results):
     if args.base_result_id:
         base_results = resultutils.filter_resultsdata(base_results, args.base_result_id)
@@ -82,6 +86,7 @@ def regression_common(args, logger, base_results, target_results):
 
     return 0
 
+
 def regression_git(args, logger):
     base_results = {}
     target_results = {}
@@ -147,6 +152,7 @@ def regression_git(args, logger):
 
     return 0
 
+
 def register_commands(subparsers):
     """Register subcommands from this plugin"""
 
diff --git a/scripts/lib/resulttool/report.py b/scripts/lib/resulttool/report.py
index a4f1d11bef..8c74f51b58 100644
--- a/scripts/lib/resulttool/report.py
+++ b/scripts/lib/resulttool/report.py
@@ -23,7 +23,6 @@ class ResultsTextReport(object):
                              'failed': ['FAILED', 'failed', 'FAIL', 'ERROR', 'error', 'UNKNOWN', 'XPASS'],
                              'skipped': ['SKIPPED', 'skipped', 'UNSUPPORTED', 'UNTESTED', 'UNRESOLVED']}
 
-
     def handle_ptest_result(self, k, status, result, machine):
         if machine not in self.ptests:
             self.ptests[machine] = {}
@@ -284,12 +283,14 @@ class ResultsTextReport(object):
                 test_count_reports.append(test_count_report)
         self.print_test_report('test_report_full_text.txt', test_count_reports)
 
+
 def report(args, logger):
     report = ResultsTextReport()
     report.view_test_report(logger, args.source_dir, args.branch, args.commit, args.tag, args.use_regression_map,
                             args.raw_test_only, args.selected_test_case_only)
     return 0
 
+
 def register_commands(subparsers):
     """Register subcommands from this plugin"""
     parser_build = subparsers.add_parser('report', help='summarise test results',
diff --git a/scripts/lib/resulttool/resultutils.py b/scripts/lib/resulttool/resultutils.py
index 8917022d36..d882b6d322 100644
--- a/scripts/lib/resulttool/resultutils.py
+++ b/scripts/lib/resulttool/resultutils.py
@@ -38,17 +38,21 @@ store_map = {
     "manual": ['TEST_TYPE', 'TEST_MODULE', 'MACHINE', 'IMAGE_BASENAME']
 }
 
+
 def is_url(p):
     """
     Helper for determining if the given path is a URL
     """
     return p.startswith('http://') or p.startswith('https://')
 
+
 extra_configvars = {'TESTSERIES': ''}
 
 #
 # Load the json file and append the results data into the provided results dict
 #
+
+
 def append_resultsdata(results, f, configmap=store_map, configvars=extra_configvars):
     if type(f) is str:
         if is_url(f):
@@ -83,6 +87,8 @@ def append_resultsdata(results, f, configmap=store_map, configvars=extra_configv
 # Walk a directory and find/load results data
 # or load directly from a file
 #
+
+
 def load_resultsdata(source, configmap=store_map, configvars=extra_configvars):
     results = {}
     if is_url(source) or os.path.isfile(source):
@@ -95,6 +101,7 @@ def load_resultsdata(source, configmap=store_map, configvars=extra_configvars):
                 append_resultsdata(results, f, configmap, configvars)
     return results
 
+
 def filter_resultsdata(results, resultid):
     newresults = {}
     for r in results:
@@ -104,6 +111,7 @@ def filter_resultsdata(results, resultid):
                  newresults[r][i] = results[r][i]
     return newresults
 
+
 def strip_ptestresults(results):
     newresults = copy.deepcopy(results)
     #for a in newresults2:
@@ -119,6 +127,7 @@ def strip_ptestresults(results):
                     del newresults[res]['result']['ptestresult.sections'][i]['log']
     return newresults
 
+
 def decode_log(logdata):
     if isinstance(logdata, str):
         return logdata
@@ -130,6 +139,7 @@ def decode_log(logdata):
             return data.decode("utf-8", errors='ignore')
     return None
 
+
 def generic_get_log(sectionname, results, section):
     if sectionname not in results:
         return None
@@ -141,9 +151,11 @@ def generic_get_log(sectionname, results, section):
         return None
     return decode_log(ptest['log'])
 
+
 def ptestresult_get_log(results, section):
     return generic_get_log('ptestresuls.sections', results, section)
 
+
 def generic_get_rawlogs(sectname, results):
     if sectname not in results:
         return None
@@ -151,9 +163,11 @@ def generic_get_rawlogs(sectname, results):
         return None
     return decode_log(results[sectname]['log'])
 
+
 def ptestresult_get_rawlogs(results):
     return generic_get_rawlogs('ptestresult.rawlogs', results)
 
+
 def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, ptestlogs=False):
     for res in results:
         if res:
@@ -180,6 +194,7 @@ def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, p
                             with open(dst.replace(fn, "ptest-%s.log" % i), "w+") as f:
                                 f.write(sectionlog)
 
+
 def git_get_result(repo, tags, configmap=store_map):
     git_objs = []
     for tag in tags:
@@ -207,6 +222,7 @@ def git_get_result(repo, tags, configmap=store_map):
 
     return results
 
+
 def test_run_results(results):
     """
     Convenient generator function that iterates over all test runs that have a
diff --git a/scripts/lib/resulttool/store.py b/scripts/lib/resulttool/store.py
index baec9e27f9..f082b0ef77 100644
--- a/scripts/lib/resulttool/store.py
+++ b/scripts/lib/resulttool/store.py
@@ -82,6 +82,7 @@ def store(args, logger):
 
     return 0
 
+
 def register_commands(subparsers):
     """Register subcommands from this plugin"""
     parser_build = subparsers.add_parser('store', help='store test results into a git repository',
diff --git a/scripts/lib/scriptpath.py b/scripts/lib/scriptpath.py
index f32326db3a..e8eb458290 100644
--- a/scripts/lib/scriptpath.py
+++ b/scripts/lib/scriptpath.py
@@ -10,11 +10,13 @@ import sys
 import os
 import os.path
 
+
 def add_oe_lib_path():
     basepath = os.path.abspath(os.path.dirname(__file__) + '/../..')
     newpath = basepath + '/meta/lib'
     sys.path.insert(0, newpath)
 
+
 def add_bitbake_lib_path():
     basepath = os.path.abspath(os.path.dirname(__file__) + '/../..')
     bitbakepath = None
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index 50c9c95cd6..3e0415ae10 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -20,6 +20,7 @@ import threading
 import importlib
 from importlib import machinery
 
+
 class KeepAliveStreamHandler(logging.StreamHandler):
     def __init__(self, keepalive=True, **kwargs):
         super().__init__(**kwargs)
@@ -55,6 +56,7 @@ class KeepAliveStreamHandler(logging.StreamHandler):
         with self._timeout:
             self._timeout.notify()
 
+
 def logger_create(name, stream=None, keepalive=None):
     logger = logging.getLogger(name)
     if keepalive is not None:
@@ -66,6 +68,7 @@ def logger_create(name, stream=None, keepalive=None):
     logger.setLevel(logging.INFO)
     return logger
 
+
 def logger_setup_color(logger, color='auto'):
     from bb.msg import BBLogFormatter
 
@@ -109,6 +112,7 @@ def git_convert_standalone_clone(repodir):
             bb.process.run('git repack -a', cwd=repodir)
             os.remove(alternatesfile)
 
+
 def _get_temp_recipe_dir(d):
     # This is a little bit hacky but we need to find a place where we can put
     # the recipe so that bitbake can find it. We're going to delete it at the
@@ -125,12 +129,15 @@ def _get_temp_recipe_dir(d):
                     break
     return fetchrecipedir
 
+
 class FetchUrlFailure(Exception):
     def __init__(self, url):
         self.url = url
+
     def __str__(self):
         return "Failed to fetch URL %s" % self.url
 
+
 def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirrors=False):
     """
     Fetch the specified URL using normal do_fetch and do_unpack tasks, i.e.
@@ -255,6 +262,7 @@ def run_editor(fn, logger=None):
         logger.error("Execution of '%s' failed: %s" % (editor, exc))
         return 1
 
+
 def is_src_url(param):
     """
     Check if a parameter is a URL and return True if so
@@ -268,6 +276,7 @@ def is_src_url(param):
         return True
     return False
 
+
 def filter_src_subdirs(pth):
     """
     Filter out subdirectories of initial unpacked source trees that we do not care about.
diff --git a/scripts/lib/wic/__init__.py b/scripts/lib/wic/__init__.py
index 85567934ae..d54a0e886d 100644
--- a/scripts/lib/wic/__init__.py
+++ b/scripts/lib/wic/__init__.py
@@ -6,5 +6,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
+
 class WicError(Exception):
     pass
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index cef201aec8..c3e9a5d408 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -31,6 +31,7 @@ from wic.misc import get_bitbake_var, exec_cmd
 
 logger = logging.getLogger('wic')
 
+
 def verify_build_env():
     """
     Verify that the build environment is sane.
@@ -47,6 +48,7 @@ CANNED_IMAGE_DIR = "lib/wic/canned-wks" # relative to scripts
 SCRIPTS_CANNED_IMAGE_DIR = "scripts/" + CANNED_IMAGE_DIR
 WIC_DIR = "wic"
 
+
 def build_canned_image_list(path):
     layers_path = get_bitbake_var("BBLAYERS")
     canned_wks_layer_dirs = []
@@ -63,6 +65,7 @@ def build_canned_image_list(path):
 
     return canned_wks_layer_dirs
 
+
 def find_canned_image(scripts_path, wks_file):
     """
     Find a .wks file with the given name in the canned files dir.
@@ -553,6 +556,7 @@ class Disk:
                 elif part['type'] != 'f':
                     logger.warning("skipping partition {}: unsupported fstype {}".format(pnum, fstype))
 
+
 def wic_ls(args, native_sysroot):
     """List contents of partitioned image or vfat partition."""
     disk = Disk(args.path.image, native_sysroot)
@@ -567,6 +571,7 @@ def wic_ls(args, native_sysroot):
         path = args.path.path or '/'
         print(disk.dir(args.path.part, path))
 
+
 def wic_cp(args, native_sysroot):
     """
     Copy file or directory to/from the vfat/ext partition of
@@ -587,6 +592,7 @@ def wic_rm(args, native_sysroot):
     disk = Disk(args.path.image, native_sysroot)
     disk.remove(args.path.part, args.path.path, args.recursive_delete)
 
+
 def wic_write(args, native_sysroot):
     """
     Write image to a target device.
@@ -594,6 +600,7 @@ def wic_write(args, native_sysroot):
     disk = Disk(args.image, native_sysroot, ('fat', 'ext', 'linux-swap'))
     disk.write(args.target, args.expand)
 
+
 def find_canned(scripts_path, file_name):
     """
     Find a file either by its path or by name in the canned files dir.
@@ -611,6 +618,7 @@ def find_canned(scripts_path, file_name):
                     fullpath = os.path.join(canned_wks_dir, fname)
                     return fullpath
 
+
 def get_custom_config(boot_file):
     """
     Get the custom configuration to be used for the bootloader.
diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index 6f733d5365..e25c66a223 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -25,6 +25,7 @@ import fcntl
 import tempfile
 import logging
 
+
 def get_block_size(file_obj):
     """
     Returns block size for file object 'file_obj'. Errors are indicated by the
@@ -48,6 +49,7 @@ def get_block_size(file_obj):
             raise IOError("Unable to determine block size")
     return bsize
 
+
 class ErrorNotSupp(Exception):
     """
     An exception of this type is raised when the 'FIEMAP' or 'SEEK_HOLE' feature
@@ -55,6 +57,7 @@ class ErrorNotSupp(Exception):
     """
     pass
 
+
 class Error(Exception):
     """A class for all the other exceptions raised by this module."""
     pass
@@ -160,6 +163,7 @@ class _FilemapBase(object):
 _SEEK_DATA = 3
 _SEEK_HOLE = 4
 
+
 def _lseek(file_obj, offset, whence):
     """This is a helper function which invokes 'os.lseek' for file object
     'file_obj' and with specified 'offset' and 'whence'. The 'whence'
@@ -180,6 +184,7 @@ def _lseek(file_obj, offset, whence):
         else:
             raise
 
+
 class FilemapSeek(_FilemapBase):
     """
     This class uses the 'SEEK_HOLE' and 'SEEK_DATA' to find file block mapping.
@@ -304,6 +309,7 @@ _FIEMAP_FLAG_SYNC = 0x00000001
 # FIEMAP ioctl will be invoked.
 _FIEMAP_BUFFER_SIZE = 256 * 1024
 
+
 class FilemapFiemap(_FilemapBase):
     """
     This class provides API to the FIEMAP ioctl. Namely, it allows to iterate
@@ -469,6 +475,7 @@ class FilemapFiemap(_FilemapBase):
                         % (first_prev, last_prev))
         yield (first_prev, last_prev)
 
+
 class FilemapNobmap(_FilemapBase):
     """
     This class is used when both the 'SEEK_DATA/HOLE' and FIEMAP are not
@@ -492,6 +499,7 @@ class FilemapNobmap(_FilemapBase):
                         % (start, count, start + count - 1))
         yield (start, start + count - 1)
 
+
 def filemap(image, log=None):
     """
     Create and return an instance of a Filemap class - 'FilemapFiemap' or
@@ -510,6 +518,7 @@ def filemap(image, log=None):
         except ErrorNotSupp:
             return FilemapNobmap(image, log)
 
+
 def sparse_copy(src_fname, dst_fname, skip=0, seek=0,
                 length=0, api=None):
     """
diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index 991e5094bb..30c6c0e8d5 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -17,6 +17,7 @@ from wic.pluginbase import PluginMgr, PLUGIN_TYPES
 
 logger = logging.getLogger('wic')
 
+
 def subcommand_error(args):
     logger.info("invalid subcommand %s", args[0])
 
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index b644e68da3..866aab371e 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -27,6 +27,7 @@ logger = logging.getLogger('wic')
 
 __expand_var_regexp__ = re.compile(r"\${[^{}@\n\t :]+}")
 
+
 def expand_line(line):
     while True:
         m = __expand_var_regexp__.search(line)
@@ -39,18 +40,22 @@ def expand_line(line):
             return line
         line = line[:m.start()] + val + line[m.end():]
 
+
 class KickStartError(Exception):
     """Custom exception."""
     pass
 
+
 class KickStartParser(ArgumentParser):
     """
     This class overwrites error method to throw exception
     instead of producing usage message(default argparse behavior).
     """
+
     def error(self, message):
         raise ArgumentError(None, message)
 
+
 def sizetype(default, size_in_bytes=False):
     def f(arg):
         """
@@ -67,7 +72,6 @@ def sizetype(default, size_in_bytes=False):
             except ValueError:
                 raise ArgumentTypeError("Invalid size: %r" % arg)
 
-
         if size_in_bytes:
             if suffix == 's' or suffix == 'S':
                 return size * 512
@@ -85,6 +89,7 @@ def sizetype(default, size_in_bytes=False):
         raise ArgumentTypeError("Invalid size: %r" % arg)
     return f
 
+
 def overheadtype(arg):
     """
     Custom type for ArgumentParser
@@ -100,6 +105,7 @@ def overheadtype(arg):
 
     return result
 
+
 def cannedpathtype(arg):
     """
     Custom type for ArgumentParser
@@ -111,6 +117,7 @@ def cannedpathtype(arg):
         raise ArgumentTypeError("file not found: %s" % arg)
     return result
 
+
 def systemidtype(arg):
     """
     Custom type for ArgumentParser
@@ -129,6 +136,7 @@ def systemidtype(arg):
 
     return arg
 
+
 class KickStart():
     """Kickstart parser implementation."""
 
diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py
index 92d289fbf6..786457bd7f 100644
--- a/scripts/lib/wic/misc.py
+++ b/scripts/lib/wic/misc.py
@@ -50,6 +50,7 @@ NATIVE_RECIPES = {"bmaptool": "bmap-tools",
                   "tar": "tar"
                  }
 
+
 def runtool(cmdln_or_args):
     """ wrapper for most of the subprocess calls
     input:
@@ -83,6 +84,7 @@ def runtool(cmdln_or_args):
 
     return process.returncode, out
 
+
 def _exec_cmd(cmd_and_args, as_shell=False):
     """
     Execute command, catching stderr, stdout
@@ -114,6 +116,7 @@ def exec_cmd(cmd_and_args, as_shell=False):
     """
     return _exec_cmd(cmd_and_args, as_shell)[1]
 
+
 def find_executable(cmd, paths):
     recipe = cmd
     if recipe in NATIVE_RECIPES:
@@ -124,6 +127,7 @@ def find_executable(cmd, paths):
 
     return spawn.find_executable(cmd, paths)
 
+
 def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""):
     """
     Execute native command, catching stderr, stdout
@@ -174,12 +178,15 @@ def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""):
 
     return ret, out
 
+
 BOOTDD_EXTRA_SPACE = 16384
 
+
 class BitbakeVars(defaultdict):
     """
     Container for Bitbake variables.
     """
+
     def __init__(self):
         defaultdict.__init__(self, dict)
 
@@ -253,9 +260,11 @@ class BitbakeVars(defaultdict):
 
         return result
 
+
 # Create BB_VARS singleton
 BB_VARS = BitbakeVars()
 
+
 def get_bitbake_var(var, image=None, cache=True):
     """
     Provide old get_bitbake_var API by wrapping
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index d4ca39a09e..5f5af5f70c 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -20,6 +20,7 @@ from wic.pluginbase import PluginMgr
 
 logger = logging.getLogger('wic')
 
+
 class Partition():
 
     def __init__(self, args, lineno):
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py
index d9b4e57747..621fcaf66b 100644
--- a/scripts/lib/wic/pluginbase.py
+++ b/scripts/lib/wic/pluginbase.py
@@ -24,6 +24,7 @@ logger = logging.getLogger('wic')
 
 PLUGINS = defaultdict(dict)
 
+
 class PluginMgr:
     _plugin_dirs = []
 
@@ -58,6 +59,7 @@ class PluginMgr:
 
         return PLUGINS.get(ptype)
 
+
 class PluginMeta(type):
     def __new__(cls, name, bases, attrs):
         class_type = type.__new__(cls, name, bases, attrs)
@@ -66,6 +68,7 @@ class PluginMeta(type):
 
         return class_type
 
+
 class ImagerPlugin(metaclass=PluginMeta):
     wic_plugin_type = "imager"
 
@@ -73,6 +76,7 @@ class ImagerPlugin(metaclass=PluginMeta):
         raise WicError("Method %s.do_create is not implemented" %
                        self.__class__.__name__)
 
+
 class SourcePlugin(metaclass=PluginMeta):
     wic_plugin_type = "source"
     """
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 9ae3f52dea..ea5f542be6 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -29,6 +29,7 @@ from wic.misc import get_bitbake_var, exec_cmd, exec_native_cmd
 
 logger = logging.getLogger('wic')
 
+
 class DirectPlugin(ImagerPlugin):
     """
     Install a system into a file containing a partitioned disk image.
@@ -279,6 +280,7 @@ class DirectPlugin(ImagerPlugin):
         if not self.debug:
             shutil.rmtree(self.workdir, ignore_errors=True)
 
+
 # Overhead of the MBR partitioning scheme (just one sector)
 MBR_OVERHEAD = 1
 
@@ -288,6 +290,7 @@ GPT_OVERHEAD = 34
 # Size of a sector in bytes
 SECTOR_SIZE = 512
 
+
 class PartitionedImage():
     """
     Partitioned image in a file.
diff --git a/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py b/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
index 8c6c645c39..c097181f8c 100644
--- a/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
@@ -23,6 +23,7 @@ import types
 from wic.pluginbase import SourcePlugin
 from importlib.machinery import SourceFileLoader
 
+
 class BootimgBiosPlusEFIPlugin(SourcePlugin):
     """
     Create MBR + EFI boot partition
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index d4f2f928d9..fc980a20eb 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -25,6 +25,7 @@ from wic.misc import (exec_cmd, exec_native_cmd,
 
 logger = logging.getLogger('wic')
 
+
 class BootimgEFIPlugin(SourcePlugin):
     """
     Create EFI boot partition.
@@ -189,7 +190,6 @@ class BootimgEFIPlugin(SourcePlugin):
         cfg.write(boot_conf)
         cfg.close()
 
-
     @classmethod
     def do_configure_partition(cls, part, source_params, creator, cr_workdir,
                                oe_builddir, bootimg_dir, kernel_dir,
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
index c59b476661..27745357c5 100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -23,6 +23,7 @@ from wic.misc import exec_cmd, get_bitbake_var
 
 logger = logging.getLogger('wic')
 
+
 class BootimgPartitionPlugin(SourcePlugin):
     """
     Create an image of boot partition, copying over files
@@ -159,7 +160,6 @@ class BootimgPartitionPlugin(SourcePlugin):
         cfg.write(extlinux_conf)
         cfg.close()
 
-
     @classmethod
     def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
                              oe_builddir, bootimg_dir, kernel_dir,
@@ -180,7 +180,6 @@ class BootimgPartitionPlugin(SourcePlugin):
 
         logger.debug('Kernel dir: %s', bootimg_dir)
 
-
         for task in cls.install_task:
             src_path, dst_path = task
             logger.debug('Install %s as %s', src_path, dst_path)
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index f2639e7004..ad9d9e36e8 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -22,6 +22,7 @@ from wic.misc import (exec_cmd, exec_native_cmd,
 
 logger = logging.getLogger('wic')
 
+
 class BootimgPcbiosPlugin(SourcePlugin):
     """
     Create MBR boot partition and install syslinux on it.
diff --git a/scripts/lib/wic/plugins/source/empty.py b/scripts/lib/wic/plugins/source/empty.py
index 041617d648..7cae4ba82a 100644
--- a/scripts/lib/wic/plugins/source/empty.py
+++ b/scripts/lib/wic/plugins/source/empty.py
@@ -14,6 +14,7 @@ from wic.pluginbase import SourcePlugin
 
 logger = logging.getLogger('wic')
 
+
 class EmptyPartitionPlugin(SourcePlugin):
     """
     Populate unformatted empty partition.
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 3645d07990..21e66a8a03 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -20,6 +20,7 @@ from wic.misc import exec_cmd, exec_native_cmd, get_bitbake_var
 
 logger = logging.getLogger('wic')
 
+
 class IsoImagePlugin(SourcePlugin):
     """
     Create a bootable ISO image
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index fa7b1eb8ac..a8f4c884ce 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -12,6 +12,7 @@ from wic.filemap import sparse_copy
 
 logger = logging.getLogger('wic')
 
+
 class RawCopyPlugin(SourcePlugin):
     """
     Populate partition content from raw image file.
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index 03b642f4fa..176902f39b 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -25,6 +25,7 @@ from wic.misc import get_bitbake_var, exec_native_cmd
 
 logger = logging.getLogger('wic')
 
+
 class RootfsPlugin(SourcePlugin):
     """
     Populate partition content from a rootfs directory.
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
index 7812ea4540..4595ae0fc0 100755
--- a/scripts/oe-build-perf-report
+++ b/scripts/oe-build-perf-report
@@ -38,6 +38,7 @@ import oeqa.utils.gitarchive as gitarchive
 logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
 log = logging.getLogger('oe-build-perf-report')
 
+
 def list_test_revs(repo, tag_name, verbosity, **kwargs):
     """Get list of all tested revisions"""
     valid_kwargs = dict([(k, v) for k, v in kwargs.items() if v is not None])
@@ -63,7 +64,6 @@ def list_test_revs(repo, tag_name, verbosity, **kwargs):
         # Only use fields that we want to print
         cols = [rev[i] for i in print_fields]
 
-
         if cols != prev:
             commit_cnt = 1
             test_run_cnt = 1
@@ -87,6 +87,7 @@ def list_test_revs(repo, tag_name, verbosity, **kwargs):
 
     print_table(rows)
 
+
 def is_xml_format(repo, commit):
     """Check if the commit contains xml (or json) data"""
     if repo.rev_parse(commit + ':results.xml'):
@@ -96,6 +97,7 @@ def is_xml_format(repo, commit):
         log.debug("No xml report in %s, assuming json formatted results", commit)
         return False
 
+
 def read_results(repo, tags, xml=True):
     """Read result files from repo"""
 
@@ -195,7 +197,6 @@ def print_diff_report(metadata_l, data_l, metadata_r, data_r):
             rows.append([val['title'] + ':', val['value'], val['value_old']])
     print_table(rows, row_fmt)
 
-
     # Print test results
     print("\nTEST RESULTS:\n=============")
 
@@ -316,7 +317,6 @@ def print_html_report(data, id_comp, buildstats):
             else:
                 new_test['message'] = test_r['message']
 
-
         # Generate the list of measurements
         for meas in test_r['measurements'].keys():
             meas_r = test_r['measurements'][meas]
@@ -358,7 +358,6 @@ def print_html_report(data, id_comp, buildstats):
                 new_meas['buildstats'] = BSSummary(buildstats[comp_rev][bs_key],
                                                    buildstats[rev][bs_key])
 
-
             new_test['measurements'].append(new_meas)
         tests.append(new_test)
 
@@ -611,5 +610,6 @@ def main(argv=None):
 
     return 0
 
+
 if __name__ == "__main__":
     sys.exit(main())
diff --git a/scripts/oe-build-perf-test b/scripts/oe-build-perf-test
index 00e00b4ce9..280eef261d 100755
--- a/scripts/oe-build-perf-test
+++ b/scripts/oe-build-perf-test
@@ -66,6 +66,7 @@ def pre_run_sanity_check():
         return False
     return True
 
+
 def setup_file_logging(log_file):
     """Setup loggin to file"""
     log_dir = os.path.dirname(log_file)
diff --git a/scripts/oe-depends-dot b/scripts/oe-depends-dot
index 15620240c4..a0b57f0fb0 100755
--- a/scripts/oe-depends-dot
+++ b/scripts/oe-depends-dot
@@ -11,6 +11,7 @@ import argparse
 import logging
 import re
 
+
 class Dot(object):
     def __init__(self):
         parser = argparse.ArgumentParser(
@@ -146,6 +147,7 @@ class Dot(object):
             print('Because: %s' % ' '.join(reverse_deps))
             Dot.print_dep_chains(self.args.key, reverse_deps, depends)
 
+
 if __name__ == "__main__":
     try:
         dot = Dot()
diff --git a/scripts/oe-git-archive b/scripts/oe-git-archive
index 9305ed0b0f..9fd0942358 100755
--- a/scripts/oe-git-archive
+++ b/scripts/oe-git-archive
@@ -81,6 +81,7 @@ def parse_args(argv):
                         help="Data to commit")
     return parser.parse_args(argv)
 
+
 def get_nested(d, list_of_keys):
     try:
         for k in list_of_keys:
@@ -89,6 +90,7 @@ def get_nested(d, list_of_keys):
     except KeyError:
         return ""
 
+
 def main(argv=None):
     args = parse_args(argv)
     if args.debug:
@@ -114,5 +116,6 @@ def main(argv=None):
 
     return 0
 
+
 if __name__ == "__main__":
     sys.exit(main())
diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
index dc6178beb4..2c8b20ac44 100755
--- a/scripts/oe-pkgdata-browser
+++ b/scripts/oe-pkgdata-browser
@@ -25,6 +25,8 @@ PackageColumns = enum.IntEnum("PackageColumns", {"Package": 0, "Size": 1})
 FileColumns = enum.IntEnum("FileColumns", {"Filename": 0, "Size": 1})
 
 import time
+
+
 def timeit(f):
     def timed(*args, **kw):
         ts = time.time()
@@ -36,6 +38,7 @@ def timeit(f):
         return result
     return timed
 
+
 def human_size(nbytes):
     import math
     suffixes = ['B', 'kB', 'MB', 'GB', 'TB', 'PB']
@@ -48,6 +51,7 @@ def human_size(nbytes):
     f = ('%.2f' % human).rstrip('0').rstrip('.')
     return '%s %s' % (f, suffixes[rank])
 
+
 def load(filename, suffix=None):
     from configparser import ConfigParser
     from itertools import chain
@@ -63,6 +67,7 @@ def load(filename, suffix=None):
     # values to ints?
     return parser["fake"]
 
+
 def find_pkgdata():
     import subprocess
     output = subprocess.check_output(("bitbake", "-e"), universal_newlines=True)
@@ -72,6 +77,7 @@ def find_pkgdata():
     # TODO exception or something
     return None
 
+
 def packages_in_recipe(pkgdata, recipe):
     """
     Load the recipe pkgdata to determine the list of runtime packages.
@@ -80,13 +86,16 @@ def packages_in_recipe(pkgdata, recipe):
     packages = data["PACKAGES"].split()
     return packages
 
+
 def load_runtime_package(pkgdata, package):
     return load(os.path.join(pkgdata, "runtime", package), suffix=package)
 
+
 def recipe_from_package(pkgdata, package):
     data = load(os.path.join(pkgdata, "runtime", package), suffix=package)
     return data["PN"]
 
+
 def summary(data):
     s = ""
     s += "{0[PKG]} {0[PKGV]}-{0[PKGR]}\n{0[LICENSE]}\n{0[SUMMARY]}\n".format(data)
@@ -243,6 +252,7 @@ class PkgUi():
             if os.path.isfile(os.path.join(pkgdata, recipe)):
                 self.recipe_iters[recipe] = self.recipe_store.append([recipe])
 
+
 if __name__ == "__main__":
     import argparse
 
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index aef04a18c0..fa107843d5 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -25,6 +25,7 @@ import scriptutils
 import argparse_oe
 logger = scriptutils.logger_create('pkgdatautil')
 
+
 def tinfoil_init():
     import bb.tinfoil
     import logging
@@ -82,8 +83,10 @@ def glob(args):
             # Define some functions
             def revpkgdata(pkgn):
                 return os.path.join(args.pkgdata_dir, "runtime-reverse", pkgn)
+
             def fwdpkgdata(pkgn):
                 return os.path.join(args.pkgdata_dir, "runtime", pkgn)
+
             def readpn(pkgdata_file):
                 pn = ""
                 with open(pkgdata_file, 'r') as f:
@@ -91,6 +94,7 @@ def glob(args):
                         if line.startswith("PN:"):
                             pn = line.split(': ')[1].rstrip()
                 return pn
+
             def readrenamed(pkgdata_file):
                 renamed = ""
                 pn = os.path.basename(pkgdata_file)
@@ -146,6 +150,7 @@ def glob(args):
 
     print("\n".join(mappedpkgs - skippedpkgs))
 
+
 def read_value(args):
     # Handle both multiple arguments and multiple values within an arg (old syntax)
     packages = []
@@ -197,6 +202,7 @@ def read_value(args):
         else:
             logger.debug("revlink %s does not exist", revlink)
 
+
 def lookup_pkglist(pkgs, pkgdata_dir, reverse):
     if reverse:
         mappings = OrderedDict()
@@ -218,6 +224,7 @@ def lookup_pkglist(pkgs, pkgdata_dir, reverse):
                             break
     return mappings
 
+
 def lookup_pkg(args):
     # Handle both multiple arguments and multiple values within an arg (old syntax)
     pkgs = []
@@ -240,6 +247,7 @@ def lookup_pkg(args):
 
     print('\n'.join(items))
 
+
 def lookup_recipe(args):
     def parse_pkgdatafile(pkgdatafile):
         with open(pkgdatafile, 'r') as f:
@@ -277,6 +285,7 @@ def lookup_recipe(args):
                 logger.error("The following packages could not be found: %s" % pkg)
                 sys.exit(1)
 
+
 def package_info(args):
     def parse_pkgdatafile(pkgdatafile):
         vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR', 'PKGSIZE']
@@ -339,6 +348,7 @@ def package_info(args):
             sys.exit(1)
         parse_pkgdatafile(pkgdatafile)
 
+
 def get_recipe_pkgs(pkgdata_dir, recipe, unpackaged):
     recipedatafile = os.path.join(pkgdata_dir, recipe)
     if not os.path.exists(recipedatafile):
@@ -361,6 +371,7 @@ def get_recipe_pkgs(pkgdata_dir, recipe, unpackaged):
     else:
         return packages
 
+
 def list_pkgs(args):
     found = False
 
@@ -423,8 +434,10 @@ def list_pkgs(args):
             logger.error("No packages found")
         sys.exit(1)
 
+
 def list_pkg_files(args):
     import json
+
     def parse_pkgdatafile(pkgdatafile, long=False):
         with open(pkgdatafile, 'r') as f:
             found = False
@@ -445,7 +458,6 @@ def list_pkg_files(args):
                 logger.error("Unable to find FILES_INFO entry in %s" % pkgdatafile)
                 sys.exit(1)
 
-
     if args.recipe:
         if args.pkg:
             logger.error("list-pkg-files: If -p/--recipe is specified then a package name cannot be specified")
@@ -491,6 +503,7 @@ def list_pkg_files(args):
                 sys.exit(1)
             parse_pkgdatafile(pkgdatafile, args.long)
 
+
 def find_path(args):
     import json
 
@@ -585,7 +598,6 @@ def main():
     parser_glob.add_argument('-x', '--exclude', help='Exclude packages matching specified regex from the glob operation')
     parser_glob.set_defaults(func=glob)
 
-
     args = parser.parse_args()
 
     if args.debug:
diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk
index deb8ae1807..44dbbe5da1 100755
--- a/scripts/oe-publish-sdk
+++ b/scripts/oe-publish-sdk
@@ -24,6 +24,7 @@ import scriptutils
 import argparse_oe
 logger = scriptutils.logger_create('sdktool')
 
+
 def mkdir(d):
     try:
         os.makedirs(d)
@@ -31,6 +32,7 @@ def mkdir(d):
         if e.errno != errno.EEXIST:
             raise e
 
+
 def publish(args):
     logger.debug("In publish function")
     target_sdk = args.sdk
@@ -139,6 +141,7 @@ def main():
     ret = args.func(args)
     return ret
 
+
 if __name__ == "__main__":
     try:
         ret = main()
diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index 18ac0f5869..bde1c8b5e8 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -15,7 +15,6 @@
 # E.g: "oe-selftest -r bblayers.BitbakeLayers" will run just the BitbakeLayers class from meta/lib/oeqa/selftest/bblayers.py
 
 
-
 import os
 import sys
 import argparse
@@ -35,6 +34,7 @@ from oeqa.core.exception import OEQAPreRun
 
 logger = scriptutils.logger_create('oe-selftest', stream=sys.stdout, keepalive=True)
 
+
 def main():
     description = "Script that runs unit tests against bitbake and other Yocto related tools. The goal is to validate tools functionality and metadata integrity. Refer to https://wiki.yoctoproject.org/wiki/Oe-selftest for more information."
     parser = argparse_oe.ArgumentParser(description=description)
@@ -55,6 +55,7 @@ def main():
 
     return ret
 
+
 if __name__ == '__main__':
     try:
         ret = main()
diff --git a/scripts/oe-test b/scripts/oe-test
index 55985b0b24..9fea769ff2 100755
--- a/scripts/oe-test
+++ b/scripts/oe-test
@@ -31,6 +31,7 @@ from oeqa.core.exception import OEQAPreRun
 
 logger = scriptutils.logger_create('oe-test', stream=sys.stdout)
 
+
 def main():
     parser = argparse_oe.ArgumentParser(description="OpenEmbedded test tool",
                                         add_help=False,
@@ -73,6 +74,7 @@ def main():
 
     return ret
 
+
 if __name__ == '__main__':
     try:
         ret = main()
diff --git a/scripts/oe-trim-schemas b/scripts/oe-trim-schemas
index 596da2d849..7bf5b7bdeb 100755
--- a/scripts/oe-trim-schemas
+++ b/scripts/oe-trim-schemas
@@ -9,18 +9,21 @@ try:
 except:
     import xml.etree.ElementTree as etree
 
+
 def child(elem, name):
     for e in elem.getchildren():
         if e.tag == name:
             return e
     return None
 
+
 def children(elem, name=None):
     l = elem.getchildren()
     if name:
         l = [e for e in l if e.tag == name]
     return l
 
+
 if len(sys.argv) < 2 or sys.argv[1] in ('-h', '--help'):
     print('oe-trim-schemas: error: the following arguments are required: schema\n'
           'Usage: oe-trim-schemas schema\n\n'
diff --git a/scripts/oepydevshell-internal.py b/scripts/oepydevshell-internal.py
index 7fcc4043d2..e54d84982b 100755
--- a/scripts/oepydevshell-internal.py
+++ b/scripts/oepydevshell-internal.py
@@ -12,19 +12,23 @@ import termios
 import readline
 import signal
 
+
 def nonblockingfd(fd):
     fcntl.fcntl(fd, fcntl.F_SETFL, fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK)
 
+
 def echonocbreak(fd):
     old = termios.tcgetattr(fd)
     old[3] = old[3] | termios.ECHO | termios.ICANON
     termios.tcsetattr(fd, termios.TCSADRAIN, old)
 
+
 def cbreaknoecho(fd):
     old = termios.tcgetattr(fd)
     old[3] = old[3] & ~ termios.ECHO & ~ termios.ICANON
     termios.tcsetattr(fd, termios.TCSADRAIN, old)
 
+
 if len(sys.argv) != 3 or sys.argv[1] in ('-h', '--help'):
     print('oepydevshell-internal.py: error: the following arguments are required: pty, pid\n'
           'Usage: oepydevshell-internal.py pty pid\n\n'
diff --git a/scripts/pybootchartgui/pybootchartgui/batch.py b/scripts/pybootchartgui/pybootchartgui/batch.py
index 1b9df3c1cd..6d9fbce830 100644
--- a/scripts/pybootchartgui/pybootchartgui/batch.py
+++ b/scripts/pybootchartgui/pybootchartgui/batch.py
@@ -17,6 +17,7 @@ import cairo
 from . import draw
 from .draw import RenderOptions
 
+
 def render(writer, trace, app_options, filename):
     handlers = {
         "png": (lambda w, h: cairo.ImageSurface(cairo.FORMAT_ARGB32, w, h),
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 7572b59b8d..e2ece14faf 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -22,6 +22,7 @@ import colorsys
 import functools
 from operator import itemgetter
 
+
 class RenderOptions:
 
     def __init__(self, app_options):
@@ -37,6 +38,7 @@ class RenderOptions:
         else:
             return trace.proc_tree
 
+
 # Process tree background color.
 BACK_COLOR = (1.0, 1.0, 1.0, 1.0)
 
@@ -160,35 +162,43 @@ STAT_TYPE_CPU = 0
 STAT_TYPE_IO = 1
 
 # Convert ps process state to an int
+
+
 def get_proc_state(flag):
     return "RSDTZXW".find(flag) + 1
 
+
 def draw_text(ctx, text, color, x, y):
     ctx.set_source_rgba(*color)
     ctx.move_to(x, y)
     ctx.show_text(text)
 
+
 def draw_fill_rect(ctx, color, rect):
     ctx.set_source_rgba(*color)
     ctx.rectangle(*rect)
     ctx.fill()
 
+
 def draw_rect(ctx, color, rect):
     ctx.set_source_rgba(*color)
     ctx.rectangle(*rect)
     ctx.stroke()
 
+
 def draw_legend_box(ctx, label, fill_color, x, y, s):
     draw_fill_rect(ctx, fill_color, (x, y - s, s, s))
     draw_rect(ctx, PROC_BORDER_COLOR, (x, y - s, s, s))
     draw_text(ctx, label, TEXT_COLOR, x + s + 5, y)
 
+
 def draw_legend_line(ctx, label, fill_color, x, y, s):
     draw_fill_rect(ctx, fill_color, (x, y - s / 2, s + 1, 3))
     ctx.arc(x + (s + 1) / 2.0, y - (s - 3) / 2.0, 2.5, 0, 2.0 * math.pi)
     ctx.fill()
     draw_text(ctx, label, TEXT_COLOR, x + s + 5, y)
 
+
 def draw_label_in_box(ctx, color, label, x, y, w, maxx):
     label_w = ctx.text_extents(label)[2]
     label_x = x + w / 2 - label_w / 2
@@ -198,6 +208,7 @@ def draw_label_in_box(ctx, color, label, x, y, w, maxx):
         label_x = x - label_w - 5
     draw_text(ctx, label, color, label_x, y)
 
+
 def draw_sec_labels(ctx, options, rect, sec_w, nsecs):
     ctx.set_font_size(AXIS_FONT_SIZE)
     prev_x = 0
@@ -213,6 +224,7 @@ def draw_sec_labels(ctx, options, rect, sec_w, nsecs):
                 draw_text(ctx, label, TEXT_COLOR, x, rect[1] - 2)
                 prev_x = x + label_w
 
+
 def draw_box_ticks(ctx, rect, sec_w):
     draw_rect(ctx, BORDER_COLOR, tuple(rect))
 
@@ -236,6 +248,7 @@ def draw_box_ticks(ctx, rect, sec_w):
 
     ctx.set_line_cap(cairo.LINE_CAP_BUTT)
 
+
 def draw_annotations(ctx, proc_tree, times, rect):
     ctx.set_line_cap(cairo.LINE_CAP_SQUARE)
     ctx.set_source_rgba(*ANNOTATION_COLOR)
@@ -252,6 +265,7 @@ def draw_annotations(ctx, proc_tree, times, rect):
     ctx.set_line_cap(cairo.LINE_CAP_BUTT)
     ctx.set_dash([])
 
+
 def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
     ctx.set_line_width(0.5)
     x_shift = proc_tree.start_time
@@ -299,6 +313,7 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
         ctx.stroke()
     ctx.set_line_width(1.0)
 
+
 bar_h = 55
 meminfo_bar_h = 2 * bar_h
 header_h = 60
@@ -311,6 +326,7 @@ MIN_IMG_W = 800
 CUML_HEIGHT = 2000 # Increased value to accommodate CPU and I/O Graphs
 OPTIONS = None
 
+
 def extents(options, xscale, trace):
     start = min(trace.start.keys())
     end = start
@@ -348,6 +364,7 @@ def extents(options, xscale, trace):
 
     return (w, h)
 
+
 def clip_visible(clip, rect):
     xmax = max(clip[0], rect[0])
     ymax = max(clip[1], rect[1])
@@ -355,6 +372,7 @@ def clip_visible(clip, rect):
     ymin = min(clip[1] + clip[3], rect[1] + rect[3])
     return (xmin > xmax and ymin > ymax)
 
+
 def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
     proc_tree = options.proc_tree(trace)
 
@@ -493,6 +511,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
 
     return curr_y
 
+
 def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
     chart_rect = [off_x, curr_y + header_h, w, h - curr_y - 1 * off_y - header_h]
 
@@ -562,6 +581,8 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
 #
 # Render the chart.
 #
+
+
 def render(ctx, options, xscale, trace):
     (w, h) = extents(options, xscale, trace)
     global OPTIONS
@@ -621,6 +642,7 @@ def render(ctx, options, xscale, trace):
         if clip_visible(clip, cuml_rect):
             draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_IO)
 
+
 def draw_process_bar_chart(ctx, clip, options, proc_tree, times, curr_y, w, h, sec_w):
     header_size = 0
     if not options.kernel_only:
@@ -684,6 +706,7 @@ def draw_header(ctx, headers, duration):
 
     return header_y
 
+
 def draw_processes_recursively(ctx, proc, proc_tree, y, proc_h, rect, clip):
     x = rect[0] + ((proc.start_time - proc_tree.start_time) * rect[2] / proc_tree.duration)
     w = ((proc.duration) * rect[2] / proc_tree.duration)
@@ -752,6 +775,7 @@ def draw_process_activity_colors(ctx, proc, proc_tree, x, y, w, proc_h, rect, cl
 
         draw_fill_rect(ctx, color, (tx, y, tw, proc_h))
 
+
 def draw_process_connecting_lines(ctx, px, py, x, y, proc_h):
     ctx.set_source_rgba(*DEP_COLOR)
     ctx.set_dash([2, 2])
@@ -770,9 +794,12 @@ def draw_process_connecting_lines(ctx, px, py, x, y, proc_h):
     ctx.set_dash([])
 
 # elide the bootchart collector - it is quite distorting
+
+
 def elide_bootchart(proc):
     return proc.cmd == 'bootchartd' or proc.cmd == 'bootchart-colle'
 
+
 class CumlSample:
     def __init__(self, proc):
         self.cmd = proc.cmd
diff --git a/scripts/pybootchartgui/pybootchartgui/gui.py b/scripts/pybootchartgui/pybootchartgui/gui.py
index b1a399240a..6a59b2f222 100644
--- a/scripts/pybootchartgui/pybootchartgui/gui.py
+++ b/scripts/pybootchartgui/pybootchartgui/gui.py
@@ -24,6 +24,7 @@ from gi.repository import GObject
 from . import draw
 from .draw import RenderOptions
 
+
 class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
     __gsignals__ = {
             'clicked': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_STRING, Gdk.Event)),
@@ -237,6 +238,7 @@ class PyBootchartWidget(gtk.DrawingArea, gtk.Scrollable):
         #self.hadj.value_changed()
         self.vadj.set_value(y * self.zoom_ratio)
 
+
 class PyBootchartShell(gtk.VBox):
     ui = '''
     <ui>
@@ -251,6 +253,7 @@ class PyBootchartShell(gtk.VBox):
             </toolbar>
     </ui>
     '''
+
     def __init__(self, window, trace, options, xscale):
         gtk.VBox.__init__(self)
 
diff --git a/scripts/pybootchartgui/pybootchartgui/main.py.in b/scripts/pybootchartgui/pybootchartgui/main.py.in
index c905205c8e..cc9471dc21 100644
--- a/scripts/pybootchartgui/pybootchartgui/main.py.in
+++ b/scripts/pybootchartgui/pybootchartgui/main.py.in
@@ -23,6 +23,7 @@ import optparse
 from . import parsing
 from . import batch
 
+
 def _mk_options_parser():
 	"""Make an options parser."""
 	usage = "%prog [options] /path/to/tmp/buildstats/<recipe-machine>/<BUILDNAME>/"
@@ -67,6 +68,7 @@ def _mk_options_parser():
 			  help="display the full time regardless of which processes are currently shown")
 	return parser
 
+
 class Writer:
 	def __init__(self, write, options):
 		self.write = write
@@ -87,11 +89,13 @@ class Writer:
 		if not self.options.quiet:
 			self.write(msg)
 
+
 def _mk_writer(options):
 	def write(s):
 		print(s)
 	return Writer(write, options)
 	
+
 def _get_filename(path):
 	"""Construct a usable filename for outputs"""
 	dname = "."
@@ -103,6 +107,7 @@ def _get_filename(path):
 			fname = path
 	return os.path.join(dname, fname)
 
+
 def main(argv=None):
 	try:
 		if argv is None:
@@ -161,6 +166,7 @@ def main(argv=None):
 				else:
 					f = filename + s % n + options.format
 					n = n + 1
+
 				def render():
 					batch.render(writer, r, options, f)
 				if options.profile:
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index 2de03937ce..937bd89f2f 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -30,6 +30,7 @@ if sys.version_info >= (3, 0):
 
 # Parsing produces as its end result a 'Trace'
 
+
 class Trace:
     def __init__(self, writer, paths, options):
         self.processes = {}
@@ -60,10 +61,10 @@ class Trace:
                 self.min = min(self.start.keys())
                 self.max = max(self.end.keys())
 
-
         # Rendering system charts depends on start and end
         # time. Provide them where the original drawing code expects
         # them, i.e. in proc_tree.
+
         class BitbakeProcessTree:
             def __init__(self, start_time, end_time):
                 self.start_time = start_time
@@ -72,7 +73,6 @@ class Trace:
         self.proc_tree = BitbakeProcessTree(min(self.start.keys()),
                                             max(self.end.keys()))
 
-
         return
 
         # Turn that parsed information into something more useful
@@ -187,6 +187,7 @@ class Trace:
                 return True
             else:
                 return False
+
         def is_idle(util, start):
             for j in range(0, len(util)):
                 if util[j][0] < start:
@@ -204,7 +205,6 @@ class Trace:
         if proc is None:
             writer.warn("no selected crop proc '%s' in list" % crop_after)
 
-
         cpu_util = [(sample.time, sample.user + sample.sys + sample.io) for sample in self.cpu_stats]
         disk_util = [(sample.time, sample.util) for sample in self.disk_stats]
 
@@ -248,15 +248,16 @@ class Trace:
         return idle
 
 
-
 class ParseError(Exception):
     """Represents errors during parse of the bootchart."""
+
     def __init__(self, value):
         self.value = value
 
     def __str__(self):
         return self.value
 
+
 def _parse_headers(file):
     """Parses the headers of the bootchart."""
     def parse(acc, line):
@@ -269,6 +270,7 @@ def _parse_headers(file):
         return headers, last
     return reduce(parse, file.read().split('\n'), (defaultdict(str), ''))[0]
 
+
 def _parse_timed_blocks(file):
     """Parses (ie., splits) a file into so-called timed-blocks. A
     timed-block consists of a timestamp on a line by itself followed
@@ -284,6 +286,7 @@ def _parse_timed_blocks(file):
     blocks = file.read().split('\n\n')
     return [parse(block) for block in blocks if block.strip() and not block.endswith(' not running\n')]
 
+
 def _parse_proc_ps_log(writer, file):
     """
      * See proc(5) for details.
@@ -334,6 +337,7 @@ def _parse_proc_ps_log(writer, file):
 
     return ProcessStats(writer, processMap, len(timed_blocks), avgSampleLength, startTime, ltime)
 
+
 def _parse_taskstats_log(writer, file):
     """
      * See bootchart-collector.c for details.
@@ -421,6 +425,7 @@ def _parse_taskstats_log(writer, file):
 
     return ProcessStats(writer, processMap, len(timed_blocks), avgSampleLength, startTime, ltime)
 
+
 def _parse_proc_stat_log(file):
     samples = []
     ltimes = None
@@ -444,12 +449,14 @@ def _parse_proc_stat_log(file):
         # skip the rest of statistics lines
     return samples
 
+
 def _parse_reduced_log(file, sample_class):
     samples = []
     for time, lines in _parse_timed_blocks(file):
         samples.append(sample_class(time, *[float(x) for x in lines[0].split()]))
     return samples
 
+
 def _parse_proc_disk_stat_log(file):
     """
     Parse file for disk stats, but only look at the whole device, eg. sda,
@@ -491,6 +498,7 @@ def _parse_proc_disk_stat_log(file):
 
     return disk_stats
 
+
 def _parse_reduced_proc_meminfo_log(file):
     """
     Parse file for global memory statistics with
@@ -510,6 +518,7 @@ def _parse_reduced_proc_meminfo_log(file):
 
     return mem_stats
 
+
 def _parse_proc_meminfo_log(file):
     """
     Parse file for global memory statistics.
@@ -534,6 +543,7 @@ def _parse_proc_meminfo_log(file):
 
     return mem_stats
 
+
 def _parse_monitor_disk_log(file):
     """
     Parse file with information about amount of diskspace used.
@@ -640,6 +650,8 @@ def _parse_dmesg(writer, file):
 # Parse binary pacct accounting file output if we have one
 # cf. /usr/include/linux/acct.h
 #
+
+
 def _parse_pacct(writer, file):
     # read LE int32
     def _read_le_int32(file):
@@ -664,6 +676,7 @@ def _parse_pacct(writer, file):
         file.seek(16, 1)         # acct_comm
     return parent_map
 
+
 def _parse_paternity_log(writer, file):
     parent_map = {}
     parent_map[0] = 0
@@ -678,6 +691,7 @@ def _parse_paternity_log(writer, file):
             print("Odd paternity line '%s'" % (line))
     return parent_map
 
+
 def _parse_cmdline_log(writer, file):
     cmdLines = {}
     for block in file.read().split('\n\n'):
@@ -693,6 +707,7 @@ def _parse_cmdline_log(writer, file):
             cmdLines[pid] = values
     return cmdLines
 
+
 def _parse_bitbake_buildstats(writer, state, filename, file):
     paths = filename.split("/")
     task = paths[-1]
@@ -707,6 +722,7 @@ def _parse_bitbake_buildstats(writer, state, filename, file):
     if start and end:
         state.add_process(pn + ":" + task, start, end)
 
+
 def get_num_cpus(headers):
     """Get the number of CPUs from the system.cpu header property. As the
     CPU utilization graphs are relative, the number of CPUs currently makes
@@ -723,6 +739,7 @@ def get_num_cpus(headers):
         return 1
     return max(int(mat.group(1)), 1)
 
+
 def _do_parse(writer, state, filename, file):
     writer.info("parsing '%s'" % filename)
     t1 = time.process_time()
@@ -749,6 +766,7 @@ def _do_parse(writer, state, filename, file):
     writer.info("  %s seconds" % str(t2 - t1))
     return state
 
+
 def parse_file(writer, state, filename):
     if state.filename is None:
         state.filename = filename
@@ -756,6 +774,7 @@ def parse_file(writer, state, filename):
     with open(filename, "r") as file:
         return _do_parse(writer, state, filename, file)
 
+
 def parse_paths(writer, state, paths):
     for path in paths:
         if state.filename is None:
@@ -789,6 +808,7 @@ def parse_paths(writer, state, paths):
             state = parse_file(writer, state, path)
     return state
 
+
 def split_res(res, options):
     """ Split the res into n pieces """
     res_list = []
diff --git a/scripts/pybootchartgui/pybootchartgui/process_tree.py b/scripts/pybootchartgui/pybootchartgui/process_tree.py
index 3e94db3f3a..35ee8f080c 100644
--- a/scripts/pybootchartgui/pybootchartgui/process_tree.py
+++ b/scripts/pybootchartgui/pybootchartgui/process_tree.py
@@ -13,6 +13,7 @@
 #  You should have received a copy of the GNU General Public License
 #  along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>.
 
+
 class ProcessTree:
     """ProcessTree encapsulates a process tree.  The tree is built from log files
        retrieved during the boot process.  When building the process tree, it is
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py
index 301583e9aa..2b4cf15cb4 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -18,9 +18,11 @@ class DiskStatSample:
     def __init__(self, time):
         self.time = time
         self.diskdata = [0, 0, 0]
+
     def add_diskdata(self, new_diskdata):
         self.diskdata = [a + b for a, b in zip(self.diskdata, new_diskdata)]
 
+
 class CPUSample:
     def __init__(self, time, user, sys, io=0.0, swap=0.0):
         self.time = time
@@ -37,6 +39,7 @@ class CPUSample:
         return str(self.time) + "\t" + str(self.user) + "\t" + \
                str(self.sys) + "\t" + str(self.io) + "\t" + str(self.swap)
 
+
 class MemSample:
     used_values = ('MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree',)
 
@@ -53,12 +56,14 @@ class MemSample:
         # discard incomplete samples
         return [v for v in MemSample.used_values if v not in keys] == []
 
+
 class DrawMemSample:
     """
     Condensed version of a MemSample with exactly the values used by the drawing code.
     Initialized either from a valid MemSample or
     a tuple/list of buffer/used/cached/swap values.
     """
+
     def __init__(self, mem_sample):
         self.time = mem_sample.time
         if isinstance(mem_sample, MemSample):
@@ -69,6 +74,7 @@ class DrawMemSample:
         else:
             self.buffers, self.used, self.cached, self.swap = mem_sample
 
+
 class DiskSpaceSample:
     def __init__(self, time):
         self.time = time
@@ -80,6 +86,7 @@ class DiskSpaceSample:
     def valid(self):
         return bool(self.records)
 
+
 class ProcessSample:
     def __init__(self, time, state, cpu_sample):
         self.time = time
@@ -89,6 +96,7 @@ class ProcessSample:
     def __str__(self):
         return str(self.time) + "\t" + str(self.state) + "\t" + str(self.cpu_sample)
 
+
 class ProcessStats:
     def __init__(self, writer, process_map, sample_count, sample_period, start_time, end_time):
         self.process_map = process_map
@@ -99,6 +107,7 @@ class ProcessStats:
         writer.info("%d samples, avg. sample length %f" % (self.sample_count, self.sample_period))
         writer.info("process list size: %d" % len(self.process_map.values()))
 
+
 class Process:
     def __init__(self, writer, pid, cmd, ppid, start_time):
         self.writer = writer
@@ -166,6 +175,7 @@ class Process:
     def get_end_time(self):
         return self.start_time + self.duration
 
+
 class DiskSample:
     def __init__(self, time, read, write, util):
         self.time = time
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
index 3ea3592441..2890091488 100644
--- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
+++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
@@ -14,14 +14,17 @@ import pybootchartgui.main as main
 
 debug = False
 
+
 def floatEq(f1, f2):
 	return math.fabs(f1 - f2) < 0.00001
 
+
 bootchart_dir = os.path.join(os.path.dirname(sys.argv[0]), '../../examples/1/')
 parser = main._mk_options_parser()
 options, args = parser.parse_args(['--q', bootchart_dir])
 writer = main._mk_writer(options)
 
+
 class TestBCParser(unittest.TestCase):
     
 	def setUp(self):
@@ -105,6 +108,7 @@ class TestBCParser(unittest.TestCase):
 			self.assert_(floatEq(float(tokens[3]), sample.io))
 		stat_data.close()
 
+
 if __name__ == '__main__':
     unittest.main()
 
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py b/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
index f9f49cc340..03cde2ef32 100644
--- a/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
+++ b/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py
@@ -11,6 +11,7 @@ import pybootchartgui.main as main
 if sys.version_info >= (3, 0):
     long = int
 
+
 class TestProcessTree(unittest.TestCase):
 
     def setUp(self):
@@ -88,5 +89,6 @@ class TestProcessTree(unittest.TestCase):
         process_tree = self.processtree.process_tree
         self.checkAgainstJavaExtract(self.mk_fname('extract.processtree.3e.log'), process_tree)
 
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/scripts/pythondeps b/scripts/pythondeps
index 7b41c336a1..eb36abdd2e 100755
--- a/scripts/pythondeps
+++ b/scripts/pythondeps
@@ -22,6 +22,7 @@ logger = logging.getLogger('pythondeps')
 
 suffixes = importlib.machinery.all_suffixes()
 
+
 class PythonDepError(Exception):
     pass
 
diff --git a/scripts/recipetool b/scripts/recipetool
index e2d585d2c5..79d82c954e 100755
--- a/scripts/recipetool
+++ b/scripts/recipetool
@@ -22,6 +22,7 @@ logger = scriptutils.logger_create('recipetool')
 
 plugins = []
 
+
 def tinfoil_init(parserecipes):
     import bb.tinfoil
     import logging
@@ -30,6 +31,7 @@ def tinfoil_init(parserecipes):
     tinfoil.prepare(not parserecipes)
     return tinfoil
 
+
 def main():
 
     if not os.environ.get('BUILDDIR', ''):
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index 4269eacb34..b4a46a8d51 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -29,6 +29,7 @@ else:
 
 old_prefix = re.compile(b("##DEFAULT_INSTALL_DIR##"))
 
+
 def get_arch():
     f.seek(0)
     e_ident = f.read(16)
@@ -42,6 +43,7 @@ def get_arch():
     elif ei_class == 2:
         return 64
 
+
 def parse_elf_header():
     global e_type, e_machine, e_version, e_entry, e_phoff, e_shoff, e_flags,\
            e_ehsize, e_phentsize, e_phnum, e_shentsize, e_shnum, e_shstrndx
@@ -62,6 +64,7 @@ def parse_elf_header():
     e_ehsize, e_phentsize, e_phnum, e_shentsize, e_shnum, e_shstrndx =\
         struct.unpack(hdr_fmt, elf_header[16:hdr_size])
 
+
 def change_interpreter(elf_file_name):
     if arch == 32:
         ph_fmt = "<IIIIIIII"
@@ -103,6 +106,7 @@ def change_interpreter(elf_file_name):
             f.write(dl_path)
             break
 
+
 def change_dl_sysdirs(elf_file_name):
     if arch == 32:
         sh_fmt = "<IIIIIIIIII"
@@ -200,6 +204,7 @@ def change_dl_sysdirs(elf_file_name):
         f.seek(sysdirslen_off)
         f.write(sysdirslen)
 
+
 # MAIN
 if len(sys.argv) < 4:
     sys.exit(-1)
diff --git a/scripts/resulttool b/scripts/resulttool
index fc282bda6c..b0ba87df95 100755
--- a/scripts/resulttool
+++ b/scripts/resulttool
@@ -45,6 +45,7 @@ import resulttool.manualexecution
 import resulttool.log
 logger = scriptutils.logger_create('resulttool')
 
+
 def main():
     parser = argparse_oe.ArgumentParser(description="OEQA test result manipulation tool.",
                                         epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
@@ -74,5 +75,6 @@ def main():
         parser.error_subcommand(ae.message, ae.subcommand)
     return ret
 
+
 if __name__ == "__main__":
     sys.exit(main())
diff --git a/scripts/runqemu b/scripts/runqemu
index 259d32cd2a..c5fc7fcf5a 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -20,12 +20,15 @@ import configparser
 import signal
 import time
 
+
 class RunQemuError(Exception):
     """Custom exception to raise on known errors."""
     pass
 
+
 class OEPathError(RunQemuError):
     """Custom Exception to give better guidance on missing binaries"""
+
     def __init__(self, message):
         super().__init__("In order for this script to dynamically infer paths\n \
 kernels or filesystem images, you either need bitbake in your PATH\n \
@@ -53,8 +56,10 @@ def create_logger():
 
     return logger
 
+
 logger = create_logger()
 
+
 def print_usage():
     print("""
 Usage: you can run this script with any valid combination
@@ -105,6 +110,7 @@ Examples:
   runqemu path/to/<image>-<machine>.wic.vhd
 """)
 
+
 def check_tun():
     """Check /dev/net/tun"""
     dev_tun = '/dev/net/tun'
@@ -114,6 +120,7 @@ def check_tun():
     if not os.access(dev_tun, os.W_OK):
         raise RunQemuError("TUN control device %s is not writable, please fix (e.g. sudo chmod 666 %s)" % (dev_tun, dev_tun))
 
+
 def get_first_file(cmds):
     """Return first file found in wildcard cmds"""
     for cmd in cmds:
@@ -124,6 +131,7 @@ def get_first_file(cmds):
                     return f
     return ''
 
+
 class BaseConfig(object):
     def __init__(self):
         # The self.d saved vars from self.set(), part of them are from qemuboot.conf
@@ -769,7 +777,6 @@ class BaseConfig(object):
         if not os.path.exists(self.bios):
             raise RunQemuError("KERNEL %s not found" % self.bios)
 
-
     def check_mem(self):
         """
         Both qemu and kernel needs memory settings, so check QB_MEM and set it
@@ -1595,5 +1602,6 @@ def main():
         # Deliberately ignore the return code of 'tput smam'.
         subprocess.call(["tput", "smam"])
 
+
 if __name__ == "__main__":
     sys.exit(main())
diff --git a/scripts/send-error-report b/scripts/send-error-report
index 3fa03af2cf..39b3fbd576 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -28,6 +28,7 @@ version = "0.3"
 log = logging.getLogger("send-error-report")
 logging.basicConfig(format='%(levelname)s: %(message)s')
 
+
 def getPayloadLimit(url):
     req = urllib.request.Request(url, None)
     try:
@@ -46,12 +47,14 @@ def getPayloadLimit(url):
 
     return 0
 
+
 def ask_for_contactdetails():
     print("Please enter your name and your email (optionally), they'll be saved in the file you send.")
     username = input("Name (required): ")
     email = input("E-mail (not required): ")
     return username, email
 
+
 def edit_content(json_file_path):
     edit = input("Review information before sending? (y/n): ")
     if 'y' in edit or 'Y' in edit:
@@ -64,6 +67,7 @@ def edit_content(json_file_path):
         return True
     return False
 
+
 def prepare_data(args):
     # attempt to get the max_log_size from the server's settings
     max_log_size = getPayloadLimit(args.protocol + args.server + "/ClientPost/JSON")
@@ -123,7 +127,6 @@ def prepare_data(args):
         if data:
             json_fp.write(data)
 
-
     if args.assume_yes == False and edit_content(args.error_file):
         #We'll need to re-read the content if we edited it
         with open(args.error_file, 'r') as json_fp:
@@ -196,8 +199,6 @@ if __name__ == '__main__':
                            dest="protocol",
                            action="store_const", const="http://", default="https://")
 
-
-
     args = arg_parse.parse_args()
 
     if (args.json == False):
diff --git a/scripts/sysroot-relativelinks.py b/scripts/sysroot-relativelinks.py
index 667d95404b..a28acb7e4e 100755
--- a/scripts/sysroot-relativelinks.py
+++ b/scripts/sysroot-relativelinks.py
@@ -16,6 +16,7 @@ if len(sys.argv) != 2:
 topdir = sys.argv[1]
 topdir = os.path.abspath(topdir)
 
+
 def handlelink(filep, subdir):
     link = os.readlink(filep)
     if link[0] != "/":
@@ -27,6 +28,7 @@ def handlelink(filep, subdir):
     os.unlink(filep)
     os.symlink(os.path.relpath(topdir + link, subdir), filep)
 
+
 for subdir, dirs, files in os.walk(topdir):
     for f in dirs + files:
         filep = os.path.join(subdir, f)
diff --git a/scripts/task-time b/scripts/task-time
index a008a0ea3d..ece4f3d898 100755
--- a/scripts/task-time
+++ b/scripts/task-time
@@ -51,6 +51,7 @@ field_regexes = (("elapsed", ".*Elapsed time: ([0-9.]+)"),
 # buildstat file and <dict> maps fields from the file to their values
 task_infos = []
 
+
 def save_times_for_task(path):
     """Saves information for the buildstat file 'path' in 'task_infos'."""
 
@@ -77,6 +78,7 @@ def save_times_for_task(path):
 
         task_infos.append((path, fields))
 
+
 def save_times_for_dir(path):
     """Runs save_times_for_task() for each file in path and its subdirs, recursively."""
 
@@ -88,21 +90,26 @@ def save_times_for_dir(path):
         for fname in files:
             save_times_for_task(os.path.join(root, fname))
 
+
 for path in args.paths:
     if os.path.isfile(path):
         save_times_for_task(path)
     else:
         save_times_for_dir(path)
 
+
 def elapsed_time(task_info):
     return task_info[1]["elapsed"]
 
+
 def tot_user_time(task_info):
     return task_info[1]["user"] + task_info[1]["child user"]
 
+
 def tot_sys_time(task_info):
     return task_info[1]["sys"] + task_info[1]["child sys"]
 
+
 if args.sort != "none":
     sort_fn = {"real": elapsed_time, "user": tot_user_time, "sys": tot_sys_time}
     task_infos.sort(key=sort_fn[args.sort], reverse=True)
diff --git a/scripts/test-remote-image b/scripts/test-remote-image
index d209d22854..35e388c598 100755
--- a/scripts/test-remote-image
+++ b/scripts/test-remote-image
@@ -47,6 +47,8 @@ if not bitbakepath:
     sys.exit(1)
 
 # create a logger
+
+
 def logger_create():
     log = logging.getLogger('hwauto')
     log.setLevel(logging.DEBUG)
@@ -66,6 +68,7 @@ def logger_create():
 
     return log
 
+
 # instantiate the logger
 log = logger_create()
 
@@ -82,6 +85,7 @@ def get_args_parser():
     parser.add_argument('--skip-download', required=False, action="store_true", dest="skip_download", default=False, help='Skip downloading the images completely. This needs the correct files to be present in the directory specified by the target profile.')
     return parser
 
+
 class BaseTargetProfile(object, metaclass=ABCMeta):
     """
     This class defines the meta profile for a specific target (MACHINE type + image type).
@@ -123,6 +127,7 @@ class BaseTargetProfile(object, metaclass=ABCMeta):
 
         return files_dict
 
+
 class AutoTargetProfile(BaseTargetProfile):
 
     def __init__(self, image_type):
@@ -201,6 +206,7 @@ class BaseRepoProfile(object, metaclass=ABCMeta):
     def fetch(self, file_name, localname=None):
         pass
 
+
 class PublicAB(BaseRepoProfile):
 
     def __init__(self, repolink, localdir=None):
@@ -225,7 +231,6 @@ class PublicAB(BaseRepoProfile):
         path += distro.replace('poky', machine) + '/'
         return path
 
-
     def fetch(self, file_name, localname=None):
         repo_path = self.get_repo_path()
         link = self.repolink + repo_path + file_name
@@ -244,6 +249,7 @@ class PublicAB(BaseRepoProfile):
         wget_cmd += " -P %s '%s'" % (localdir, link)
         runCmd(wget_cmd)
 
+
 class HwAuto():
 
     def __init__(self, image_types, repolink, required_packages, targetprofile, repoprofile, skip_download):
@@ -327,7 +333,6 @@ class HwAuto():
             sys.exit(1)
 
 
-
 def main():
 
     parser = get_args_parser()
@@ -337,6 +342,7 @@ def main():
 
     hwauto.run()
 
+
 if __name__ == "__main__":
     try:
         ret = main()
diff --git a/scripts/tiny/dirsize.py b/scripts/tiny/dirsize.py
index 8e41126183..c37b9499b3 100755
--- a/scripts/tiny/dirsize.py
+++ b/scripts/tiny/dirsize.py
@@ -14,6 +14,7 @@ import os
 import sys
 import stat
 
+
 class Record:
     def create(path):
         r = Record(path)
diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
index dbdff0714f..f122b892c7 100755
--- a/scripts/tiny/ksize.py
+++ b/scripts/tiny/ksize.py
@@ -15,6 +15,7 @@ import getopt
 import os
 from subprocess import *
 
+
 def usage():
     prog = os.path.basename(sys.argv[0])
     print('Usage: %s [OPTION]...' % prog)
diff --git a/scripts/tiny/ksum.py b/scripts/tiny/ksum.py
index e1ca4033f5..fb96e1910d 100755
--- a/scripts/tiny/ksum.py
+++ b/scripts/tiny/ksum.py
@@ -23,6 +23,7 @@ import sys
 import getopt
 from subprocess import *
 
+
 def usage():
     prog = os.path.basename(sys.argv[0])
     print('Usage: %s [OPTION]...' % prog)
@@ -31,6 +32,7 @@ def usage():
     print('')
     print('Run %s from the top-level Linux kernel build directory.' % prog)
 
+
 verbose = False
 
 n_ko_files = 0
@@ -49,6 +51,7 @@ vmlinux_data = 0
 vmlinux_bss = 0
 vmlinux_total = 0
 
+
 def is_vmlinux_file(filename):
     global vmlinux_level
     if filename == ("vmlinux") and vmlinux_level == 0:
@@ -56,11 +59,13 @@ def is_vmlinux_file(filename):
         return True
     return False
 
+
 def is_ko_file(filename):
     if filename.endswith(".ko"):
         return True
     return False
 
+
 def collect_object_files():
     print("Collecting object files recursively from %s..." % os.getcwd())
     for dirpath, dirs, files in os.walk(os.getcwd()):
@@ -72,6 +77,7 @@ def collect_object_files():
                 vmlinux_file = os.path.join(dirpath, filename)
     print("Collecting object files [DONE]")
 
+
 def add_ko_file(filename):
         p = Popen("size -t " + filename, shell=True, stdout=PIPE, stderr=PIPE)
         output = p.communicate()[0].splitlines()
@@ -88,6 +94,7 @@ def add_ko_file(filename):
             ko_total += int(sizes[3])
             n_ko_files += 1
 
+
 def get_vmlinux_totals():
         p = Popen("size -t " + vmlinux_file, shell=True, stdout=PIPE, stderr=PIPE)
         output = p.communicate()[0].splitlines()
@@ -103,10 +110,12 @@ def get_vmlinux_totals():
             vmlinux_bss += int(sizes[2])
             vmlinux_total += int(sizes[3])
 
+
 def sum_ko_files():
     for ko_file in ko_file_list:
         add_ko_file(ko_file)
 
+
 def main():
     try:
         opts, args = getopt.getopt(sys.argv[1:], "vh", ["help"])
@@ -144,6 +153,7 @@ def main():
         (vmlinux_text + ko_text, vmlinux_data + ko_data,
          vmlinux_bss + ko_bss, vmlinux_total + ko_total))
 
+
 if __name__ == "__main__":
     try:
         ret = main()
diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
index 7e44af3410..8f6a2abf1b 100755
--- a/scripts/verify-bashisms
+++ b/scripts/verify-bashisms
@@ -23,15 +23,18 @@ whitelist = (
     '. $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE'
     )
 
+
 def is_whitelisted(s):
     for w in whitelist:
         if w in s:
             return True
     return False
 
+
 SCRIPT_LINENO_RE = re.compile(r' line (\d+) ')
 BASHISM_WARNING = re.compile(r'^(possible bashism in.*)$', re.MULTILINE)
 
+
 def process(filename, function, lineno, script):
     import tempfile
 
@@ -83,6 +86,7 @@ def process(filename, function, lineno, script):
         else:
             return None
 
+
 def get_tinfoil():
     scripts_path = os.path.dirname(os.path.realpath(__file__))
     lib_path = scripts_path + '/lib'
@@ -95,6 +99,7 @@ def get_tinfoil():
     # tinfoil.logger.setLevel(logging.WARNING)
     return tinfoil
 
+
 if __name__ == '__main__':
     import argparse
     import shutil
@@ -155,7 +160,6 @@ if __name__ == '__main__':
                             attributes = (filename or realfn, key, lineno)
                             scripts.setdefault(attributes, script)
 
-
     print("Scanning scripts...\n")
     for result in pool.imap(func, scripts.items()):
         if result:
diff --git a/scripts/wic b/scripts/wic
index 6c62f9e84e..ccfd61cea8 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -72,8 +72,10 @@ def wic_logger():
 
     return logger
 
+
 logger = wic_logger()
 
+
 def rootfs_dir_to_args(krootfs_dir):
     """
     Get a rootfs_dir dict and serialize to string
@@ -236,6 +238,7 @@ def wic_ls_subcommand(args, usage_str):
     """
     engine.wic_ls(args, args.native_sysroot)
 
+
 def wic_cp_subcommand(args, usage_str):
     """
     Command-line handling for copying files/dirs to images.
@@ -243,6 +246,7 @@ def wic_cp_subcommand(args, usage_str):
     """
     engine.wic_cp(args, args.native_sysroot)
 
+
 def wic_rm_subcommand(args, usage_str):
     """
     Command-line handling for removing files/dirs from images.
@@ -250,6 +254,7 @@ def wic_rm_subcommand(args, usage_str):
     """
     engine.wic_rm(args, args.native_sysroot)
 
+
 def wic_write_subcommand(args, usage_str):
     """
     Command-line handling for writing images.
@@ -257,6 +262,7 @@ def wic_write_subcommand(args, usage_str):
     """
     engine.wic_write(args, args.native_sysroot)
 
+
 def wic_help_subcommand(args, usage_str):
     """
     Command-line handling for help subcommand to keep the current
@@ -360,6 +366,7 @@ def wic_init_parser_list(subparser):
                              "defined inside the .wks file")
     return
 
+
 def imgtype(arg):
     """
     Custom type for ArgumentParser
@@ -380,18 +387,21 @@ def imgtype(arg):
 
     return namedtuple('ImgType', 'image part path')(image, part, path)
 
+
 def wic_init_parser_ls(subparser):
     subparser.add_argument("path", type=imgtype,
                         help="image spec: <image>[:<vfat partition>[<path>]]")
     subparser.add_argument("-n", "--native-sysroot",
                         help="path to the native sysroot containing the tools")
 
+
 def imgpathtype(arg):
     img = imgtype(arg)
     if img.part is None:
         raise argparse.ArgumentTypeError("partition number is not specified")
     return img
 
+
 def wic_init_parser_cp(subparser):
     subparser.add_argument("src",
                         help="image spec: <image>:<vfat partition>[<path>] or <file>")
@@ -400,6 +410,7 @@ def wic_init_parser_cp(subparser):
     subparser.add_argument("-n", "--native-sysroot",
                         help="path to the native sysroot containing the tools")
 
+
 def wic_init_parser_rm(subparser):
     subparser.add_argument("path", type=imgpathtype,
                         help="path: <image>:<vfat partition><path>")
@@ -409,6 +420,7 @@ def wic_init_parser_rm(subparser):
                         help="remove directories and their contents recursively, "
                         " this only applies to ext* partition")
 
+
 def expandtype(rules):
     """
     Custom type for ArgumentParser
@@ -440,6 +452,7 @@ def expandtype(rules):
 
     return result
 
+
 def wic_init_parser_write(subparser):
     subparser.add_argument("image",
                         help="path to the wic image")
@@ -450,6 +463,7 @@ def wic_init_parser_write(subparser):
     subparser.add_argument("-n", "--native-sysroot",
                         help="path to the native sysroot containing the tools")
 
+
 def wic_init_parser_help(subparser):
     helpparsers = subparser.add_subparsers(dest='help_topic', help=hlp.wic_usage)
     for helptopic in helptopics:
@@ -500,10 +514,12 @@ def init_parser(parser):
         subparser = subparsers.add_parser(subcmd, help=subcommands[subcmd][2])
         subcommands[subcmd][3](subparser)
 
+
 class WicArgumentParser(argparse.ArgumentParser):
      def format_help(self):
          return hlp.wic_help
 
+
 def main(argv):
     parser = WicArgumentParser(
         description="wic version %s" % __version__)
diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer
index 58f180e889..fd68c1a230 100755
--- a/scripts/yocto-check-layer
+++ b/scripts/yocto-check-layer
@@ -32,6 +32,7 @@ CASES_PATHS = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
                 'lib', 'checklayer', 'cases')]
 logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout)
 
+
 def test_layer(td, layer, test_software_layer_signatures):
     from checklayer.context import CheckLayerTestContext
     logger.info("Starting to analyze: %s" % layer['name'])
@@ -41,6 +42,7 @@ def test_layer(td, layer, test_software_layer_signatures):
     tc.loadTests(CASES_PATHS)
     return tc.runTests()
 
+
 def main():
     parser = argparse.ArgumentParser(
             description="Yocto Project layer checking tool",
@@ -122,6 +124,7 @@ def main():
         return 1
 
     shutil.copyfile(bblayersconf, bblayersconf + '.backup')
+
     def cleanup_bblayers(signum, frame):
         shutil.copyfile(bblayersconf + '.backup', bblayersconf)
         os.unlink(bblayersconf + '.backup')
@@ -217,6 +220,7 @@ def main():
 
     return ret
 
+
 if __name__ == '__main__':
     try:
         ret = main()
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 8/8] PEP8 double aggressive W291 ~ W293 and W391
  2021-06-28  5:59 [PATCH 1/8] PEP8 double aggressive E401 Khem Raj
                   ` (5 preceding siblings ...)
  2021-06-28  5:59 ` [PATCH 7/8] PEP8 double aggressive E301 ~ E306 Khem Raj
@ 2021-06-28  5:59 ` Khem Raj
  2021-06-28  6:12 ` [OE-core] [PATCH 1/8] PEP8 double aggressive E401 Alexander Kanavin
  7 siblings, 0 replies; 16+ messages in thread
From: Khem Raj @ 2021-06-28  5:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: persianpros, Khem Raj

From: persianpros <persianpros@yahoo.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 contrib/git-hooks/sendemail-validate.sample   |  1 -
 meta/lib/bblayers/create.py                   |  1 -
 meta/lib/oe/cachedpath.py                     |  4 ++--
 meta/lib/oe/elf.py                            |  8 ++++----
 meta/lib/oe/license.py                        |  2 +-
 meta/lib/oe/package.py                        |  2 +-
 meta/lib/oe/patch.py                          |  3 +--
 meta/lib/oe/path.py                           |  4 ++--
 meta/lib/oe/recipeutils.py                    |  2 +-
 meta/lib/oe/reproducible.py                   |  1 -
 meta/lib/oe/sdk.py                            |  2 +-
 meta/lib/oe/sstatesig.py                      |  2 --
 meta/lib/oe/utils.py                          |  2 +-
 meta/lib/oeqa/controllers/testtargetloader.py |  8 ++++----
 meta/lib/oeqa/core/case.py                    |  1 -
 meta/lib/oeqa/core/decorator/__init__.py      |  1 -
 meta/lib/oeqa/core/decorator/data.py          |  1 -
 meta/lib/oeqa/core/loader.py                  |  2 +-
 meta/lib/oeqa/core/target/qemu.py             |  2 +-
 meta/lib/oeqa/core/tests/cases/oetag.py       |  1 -
 meta/lib/oeqa/core/utils/concurrencytest.py   |  1 -
 meta/lib/oeqa/core/utils/path.py              |  1 -
 meta/lib/oeqa/runtime/cases/buildlzip.py      |  1 -
 .../oeqa/runtime/cases/ethernet_ip_connman.py | 20 +++++++++----------
 meta/lib/oeqa/runtime/cases/logrotate.py      | 10 ++++------
 meta/lib/oeqa/runtime/cases/ltp.py            |  6 +++---
 meta/lib/oeqa/runtime/cases/ltp_compliance.py |  6 +++---
 meta/lib/oeqa/runtime/cases/ltp_stress.py     |  4 ++--
 meta/lib/oeqa/runtime/cases/opkg.py           |  4 ++--
 meta/lib/oeqa/runtime/cases/rpm.py            |  2 --
 meta/lib/oeqa/runtime/cases/rtc.py            |  5 ++---
 meta/lib/oeqa/runtime/cases/runlevel.py       |  6 +++---
 meta/lib/oeqa/runtime/cases/storage.py        |  6 +++---
 meta/lib/oeqa/runtime/cases/suspend.py        | 14 ++++++-------
 meta/lib/oeqa/runtime/cases/terminal.py       |  4 ++--
 meta/lib/oeqa/runtime/cases/usb_hid.py        | 10 +++++-----
 meta/lib/oeqa/sdk/cases/gcc.py                |  2 +-
 meta/lib/oeqa/sdk/context.py                  |  2 +-
 meta/lib/oeqa/sdk/testsdk.py                  |  2 --
 meta/lib/oeqa/sdkext/testsdk.py               |  1 -
 meta/lib/oeqa/selftest/cases/binutils.py      |  1 -
 meta/lib/oeqa/selftest/cases/eSDK.py          |  1 -
 meta/lib/oeqa/selftest/cases/gcc.py           |  1 -
 meta/lib/oeqa/selftest/cases/glibc.py         |  1 -
 meta/lib/oeqa/selftest/cases/imagefeatures.py |  2 +-
 .../oeqa/selftest/cases/incompatible_lic.py   |  1 -
 meta/lib/oeqa/selftest/cases/meta_ide.py      |  2 +-
 .../oeqa/selftest/cases/oelib/buildhistory.py |  1 -
 meta/lib/oeqa/selftest/cases/oescripts.py     |  5 ++---
 meta/lib/oeqa/selftest/cases/prservice.py     |  1 -
 meta/lib/oeqa/selftest/cases/recipeutils.py   | 16 +++++++--------
 meta/lib/oeqa/selftest/cases/reproducible.py  |  1 -
 .../oeqa/selftest/cases/resulttooltests.py    |  1 -
 meta/lib/oeqa/selftest/cases/runtime_test.py  |  3 +--
 meta/lib/oeqa/selftest/cases/selftest.py      |  1 -
 meta/lib/oeqa/selftest/cases/signing.py       |  2 +-
 meta/lib/oeqa/selftest/cases/sysroot.py       |  2 +-
 meta/lib/oeqa/selftest/cases/tinfoil.py       |  4 ++--
 meta/lib/oeqa/selftest/cases/wic.py           |  2 +-
 meta/lib/oeqa/selftest/context.py             |  4 ++--
 meta/lib/oeqa/utils/__init__.py               |  4 ++--
 meta/lib/oeqa/utils/commands.py               |  2 +-
 meta/lib/oeqa/utils/git.py                    |  2 --
 meta/lib/oeqa/utils/gitarchive.py             |  1 -
 meta/lib/oeqa/utils/httpserver.py             |  3 +--
 meta/lib/oeqa/utils/nfs.py                    |  1 -
 meta/lib/oeqa/utils/qemurunner.py             |  4 ++--
 meta/lib/oeqa/utils/testexport.py             |  3 +--
 .../glibc/glibc/check-test-wrapper            |  1 -
 .../systemd/systemd-systemctl/systemctl       |  2 +-
 .../python-numpy/files/run-ptest              |  1 -
 .../python3/check_build_completeness.py       |  1 -
 .../python/python3/create_manifest3.py        | 13 ++++++------
 .../python/python3/get_module_deps3.py        | 10 +++++-----
 .../python/python3/reformat_sysconfig.py      |  1 -
 .../perf/perf/sort-pmuevents.py               |  7 +++----
 scripts/cp-noerror                            |  2 +-
 scripts/lib/build_perf/__init__.py            |  1 -
 scripts/lib/build_perf/report.py              |  1 -
 scripts/lib/checklayer/cases/bsp.py           |  2 +-
 scripts/lib/checklayer/cases/distro.py        |  2 +-
 scripts/lib/recipetool/create.py              |  1 -
 scripts/lib/resulttool/log.py                 |  1 -
 scripts/lib/resulttool/regression.py          |  1 -
 scripts/lib/resulttool/resultutils.py         |  1 -
 scripts/lib/wic/partition.py                  |  1 -
 scripts/oe-build-perf-test                    |  1 -
 scripts/oe-trim-schemas                       |  1 -
 scripts/oepydevshell-internal.py              |  2 +-
 scripts/opkg-query-helper.py                  |  1 -
 .../pybootchartgui/pybootchartgui/batch.py    |  1 -
 scripts/pybootchartgui/pybootchartgui/gui.py  |  2 +-
 .../pybootchartgui/pybootchartgui/main.py.in  | 10 +++++-----
 .../pybootchartgui/tests/parser_test.py       | 11 +++++-----
 scripts/relocate_sdk.py                       |  1 -
 95 files changed, 125 insertions(+), 183 deletions(-)

diff --git a/contrib/git-hooks/sendemail-validate.sample b/contrib/git-hooks/sendemail-validate.sample
index af5d55cb00..f1a956736f 100755
--- a/contrib/git-hooks/sendemail-validate.sample
+++ b/contrib/git-hooks/sendemail-validate.sample
@@ -75,4 +75,3 @@ def main():
 
 if __name__ == "__main__":
     sys.exit(main())
-
diff --git a/meta/lib/bblayers/create.py b/meta/lib/bblayers/create.py
index f5af56f215..4de31211a1 100644
--- a/meta/lib/bblayers/create.py
+++ b/meta/lib/bblayers/create.py
@@ -79,4 +79,3 @@ class CreatePlugin(LayerPlugin):
         parser_create_layer.add_argument('--priority', '-p', default=6, help='Priority of recipes in layer')
         parser_create_layer.add_argument('--example-recipe-name', '-e', dest='examplerecipe', default='example', help='Filename of the example recipe')
         parser_create_layer.add_argument('--example-recipe-version', '-v', dest='version', default='0.1', help='Version number for the example recipe')
-
diff --git a/meta/lib/oe/cachedpath.py b/meta/lib/oe/cachedpath.py
index a94b03f6d2..89cf479ce2 100644
--- a/meta/lib/oe/cachedpath.py
+++ b/meta/lib/oe/cachedpath.py
@@ -43,7 +43,7 @@ class CachedPath(object):
             self.statcache[path] = False
             return False
 
-    # We might as well call lstat and then only 
+    # We might as well call lstat and then only
     # call stat as well in the symbolic link case
     # since this turns out to be much more optimal
     # in real world usage of this cache
@@ -183,7 +183,7 @@ class CachedPath(object):
 
             loop_cnt -= 1
             target = os.path.normpath(os.readlink(file))
-    
+
             if not os.path.isabs(target):
                 tdir = os.path.dirname(file)
                 assert(self.__is_path_below(tdir, root))
diff --git a/meta/lib/oe/elf.py b/meta/lib/oe/elf.py
index 5e8be92592..039d348118 100644
--- a/meta/lib/oe/elf.py
+++ b/meta/lib/oe/elf.py
@@ -6,7 +6,7 @@
 def machine_dict(d):
 #           TARGET_OS  TARGET_ARCH   MACHINE, OSABI, ABIVERSION, Little Endian, 32bit?
     machdata = {
-            "darwin9": { 
+            "darwin9": {
                         "arm": (40, 0, 0, True, 32),
                       },
             "eabi": {
@@ -28,7 +28,7 @@ def machine_dict(d):
                         "riscv32": (243, 0, 0, True, 32),
                         "riscv64": (243, 0, 0, True, 64),
                       },
-            "linux": { 
+            "linux": {
                         "aarch64": (183, 0, 0, True, 64),
                         "aarch64_be": (183, 0, 0, False, 64),
                         "arm": (40, 97, 0, True, 32),
@@ -62,7 +62,7 @@ def machine_dict(d):
                         "microblaze": (189, 0, 0, False, 32),
                         "microblazeel": (189, 0, 0, True, 32),
                       },
-            "linux-musl": { 
+            "linux-musl": {
                         "aarch64": (183, 0, 0, True, 64),
                         "aarch64_be": (183, 0, 0, False, 64),
                         "arm": (40, 97, 0, True, 32),
@@ -87,7 +87,7 @@ def machine_dict(d):
                       },
             "uclinux-uclibc": {
                         "bfin": (106, 0, 0, True, 32),
-                      }, 
+                      },
             "linux-gnueabi": {
                         "arm": (40, 0, 0, True, 32),
                         "armeb": (40, 0, 0, False, 32),
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index 98e65c32be..393b50e201 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -190,7 +190,7 @@ class ManifestVisitor(LicenseVisitor):
                             elif ops[-1] in ['[', ']']:
                                 ops.append(op)
                             else:
-                                ops[-1] = op 
+                                ops[-1] = op
 
                     for op in ops:
                         if op == '[' or op == ']':
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 0113f97b83..92456a4b52 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -27,7 +27,7 @@ def runstrip(arg):
 
     stripcmd = [strip]
     skip_strip = False
-    # kernel module    
+    # kernel module
     if elftype & 16:
         if is_kernel_module_signed(file):
             bb.debug(1, "Skip strip on signed module %s" % file)
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 2bf13ec34b..cfa6a6884d 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -218,7 +218,7 @@ class PatchTree(PatchSet):
         with open(self.seriespath, 'w') as f:
             for p in patches:
                 f.write(p)
-         
+
     def Import(self, patch, force=None):
         """"""
         PatchSet.Import(self, patch, force)
@@ -905,4 +905,3 @@ def should_apply(parm, d):
             return False, "applies to later version"
 
     return True, None
-
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index 1ac9c2cfcf..50c09d227a 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -91,7 +91,7 @@ def format_display(path, metadata):
 
 def copytree(src, dst):
     # We could use something like shutil.copytree here but it turns out to
-    # to be slow. It takes twice as long copying to an empty directory. 
+    # to be slow. It takes twice as long copying to an empty directory.
     # If dst already has contents performance can be 15 time slower
     # This way we also preserve hardlinks between files in the tree.
 
@@ -122,7 +122,7 @@ def copyhardlinktree(src, dst):
             bb.debug(2, "Hardlink test failed with " + str(e))
 
     if (canhard):
-        # Need to copy directories only with tar first since cp will error if two 
+        # Need to copy directories only with tar first since cp will error if two
         # writers try and create a directory at the same time
         cmd = "cd %s; find . -type d -print | tar --xattrs --xattrs-include='*' -cf - -S -C %s -p --no-recursion --files-from - | tar --xattrs --xattrs-include='*' -xhf - -C %s" % (src, src, dst)
         subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 610500b6a0..406aea9def 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -1038,7 +1038,7 @@ def get_recipe_upstream_version(rd):
             revision = ud.method.latest_revision(ud, rd, 'default')
             upversion = pv
             if revision != rd.getVar("SRCREV"):
-                upversion = upversion + "-new-commits-available" 
+                upversion = upversion + "-new-commits-available"
         else:
             pupver = ud.method.latest_versionstring(ud, rd)
             (upversion, revision) = pupver
diff --git a/meta/lib/oe/reproducible.py b/meta/lib/oe/reproducible.py
index fd9f9354fd..0f9e673a5a 100644
--- a/meta/lib/oe/reproducible.py
+++ b/meta/lib/oe/reproducible.py
@@ -111,4 +111,3 @@ def get_source_date_epoch(d, sourcedir):
         get_source_date_epoch_from_youngest_file(d, sourcedir) or
         fixed_source_date_epoch(d)       # Last resort
     )
-
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index 7dca15b65c..fb719a9b82 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -139,7 +139,7 @@ def get_extra_sdkinfo(sstate_dir):
     This function is going to be used for generating the target and host manifest files packages of eSDK.
     """
     import math
-    
+
     extra_info = {}
     extra_info['tasksizes'] = {}
     extra_info['filesizes'] = {}
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 588332042d..96843413d3 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -630,5 +630,3 @@ def OEOuthashBasic(path, sigfile, task, d):
         os.chdir(prev_dir)
 
     return h.hexdigest()
-
-
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 60cd4cb446..feadf946b6 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -284,7 +284,7 @@ def execute_pre_post_process(d, cmds):
             bb.note("Executing %s ..." % cmd)
             bb.build.exec_func(cmd, d)
 
-# For each item in items, call the function 'target' with item as the first 
+# For each item in items, call the function 'target' with item as the first
 # argument, extraargs as the other arguments and handle any exceptions in the
 # parent thread
 
diff --git a/meta/lib/oeqa/controllers/testtargetloader.py b/meta/lib/oeqa/controllers/testtargetloader.py
index 038d29bd39..6be0614ee5 100644
--- a/meta/lib/oeqa/controllers/testtargetloader.py
+++ b/meta/lib/oeqa/controllers/testtargetloader.py
@@ -11,8 +11,8 @@ import os
 
 class TestTargetLoader:
 
-    # Search oeqa.controllers module directory for and return a controller  
-    # corresponding to the given target name. 
+    # Search oeqa.controllers module directory for and return a controller
+    # corresponding to the given target name.
     # AttributeError raised if not found.
     # ImportError raised if a provided module can not be imported.
     def get_controller_module(self, target, bbpath):
@@ -46,7 +46,7 @@ class TestTargetLoader:
         return controllerslist
 
     # Search for and return a controller from given target name and
-    # set of module names. 
+    # set of module names.
     # Raise AttributeError if not found.
     # Raise ImportError if a provided module can not be imported
     def load_controller_from_name(self, target, modulenames):
@@ -65,7 +65,7 @@ class TestTargetLoader:
         # is valid that a module may not have the target class.
         try:
             obj = getattr(module, target)
-            if obj: 
+            if obj:
                 from oeqa.targetcontrol import BaseTarget
                 if(not issubclass(obj, BaseTarget)):
                     bb.warn("Target {0} found, but subclass is not BaseTarget".format(target))
diff --git a/meta/lib/oeqa/core/case.py b/meta/lib/oeqa/core/case.py
index afb34a35cf..eac01d8693 100644
--- a/meta/lib/oeqa/core/case.py
+++ b/meta/lib/oeqa/core/case.py
@@ -105,4 +105,3 @@ class OEPTestResultTestCase:
             sections[section] = {}
         resultname = "ptestresult.{}.{}".format(section, test)
         self.extraresults[resultname] = {"status": result}
-
diff --git a/meta/lib/oeqa/core/decorator/__init__.py b/meta/lib/oeqa/core/decorator/__init__.py
index d581597aba..016bf3fe3b 100644
--- a/meta/lib/oeqa/core/decorator/__init__.py
+++ b/meta/lib/oeqa/core/decorator/__init__.py
@@ -81,4 +81,3 @@ def OETestTag(*tags):
             item.__oeqa_testtags = expandedtags
         return item
     return decorator
-
diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py
index 82aac0b873..3fd3009a98 100644
--- a/meta/lib/oeqa/core/decorator/data.py
+++ b/meta/lib/oeqa/core/decorator/data.py
@@ -235,4 +235,3 @@ class skipIfQemu(OETestDecorator):
         self.logger.debug(msg)
         if is_qemu(self.case.td, self.value):
              self.case.skipTest(self.msg)
-
diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
index 3cc1d6b669..7f6ee74d09 100644
--- a/meta/lib/oeqa/core/loader.py
+++ b/meta/lib/oeqa/core/loader.py
@@ -201,7 +201,7 @@ class OETestLoader(unittest.TestLoader):
             # a setUpDecorators/tearDownDecorators that methods
             # will call setUp/tearDown original methods.
             setattr(testCaseClass, 'setUpMethod',
-                    getattr(testCaseClass, 'setUp')) 
+                    getattr(testCaseClass, 'setUp'))
             setattr(testCaseClass, 'tearDownMethod',
                     getattr(testCaseClass, 'tearDown'))
             setattr(testCaseClass, 'setUp', testCaseClass._oeSetUp)
diff --git a/meta/lib/oeqa/core/target/qemu.py b/meta/lib/oeqa/core/target/qemu.py
index 6d6561333b..7cb4aac572 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -47,7 +47,7 @@ class OEQemuTarget(OESSHTarget):
                                  logfile=bootlog, boottime=boottime,
                                  use_kvm=kvm, use_slirp=slirp, dump_dir=dump_dir,
                                  dump_host_cmds=dump_host_cmds, logger=logger,
-                                 serial_ports=serial_ports, boot_patterns=boot_patterns, 
+                                 serial_ports=serial_ports, boot_patterns=boot_patterns,
                                  use_ovmf=ovmf, tmpfsdir=tmpfsdir)
         dump_monitor_cmds = kwargs.get("testimage_dump_monitor")
         self.monitor_dumper = MonitorDumper(dump_monitor_cmds, dump_dir, self.runner)
diff --git a/meta/lib/oeqa/core/tests/cases/oetag.py b/meta/lib/oeqa/core/tests/cases/oetag.py
index 6b89e011e6..725a5ece00 100644
--- a/meta/lib/oeqa/core/tests/cases/oetag.py
+++ b/meta/lib/oeqa/core/tests/cases/oetag.py
@@ -37,4 +37,3 @@ class TagClassTest(OETestCase):
 
     def testTagNone(self):
         self.assertTrue(True, msg='How is this possible?')
-
diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py b/meta/lib/oeqa/core/utils/concurrencytest.py
index 089ee8e665..726dedff40 100644
--- a/meta/lib/oeqa/core/utils/concurrencytest.py
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -346,4 +346,3 @@ def partition_tests(suite, count):
 
     # No point in empty threads so drop them
     return [p for p in partitions if p]
-
diff --git a/meta/lib/oeqa/core/utils/path.py b/meta/lib/oeqa/core/utils/path.py
index 803601ddf7..3464d333c2 100644
--- a/meta/lib/oeqa/core/utils/path.py
+++ b/meta/lib/oeqa/core/utils/path.py
@@ -21,4 +21,3 @@ def findFile(file_name, directory):
 def remove_safe(path):
     if os.path.exists(path):
         os.remove(path)
-
diff --git a/meta/lib/oeqa/runtime/cases/buildlzip.py b/meta/lib/oeqa/runtime/cases/buildlzip.py
index 78c1661968..e8ec3121e4 100644
--- a/meta/lib/oeqa/runtime/cases/buildlzip.py
+++ b/meta/lib/oeqa/runtime/cases/buildlzip.py
@@ -32,4 +32,3 @@ class BuildLzipTest(OERuntimeTestCase):
         self.project.run_configure()
         self.project.run_make()
         self.project.run_install()
-
diff --git a/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py b/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
index 3c71a7c600..e55533e6c3 100644
--- a/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
+++ b/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
@@ -5,30 +5,30 @@ from oeqa.core.decorator.data import skipIfQemu
 
 class Ethernet_Test(OERuntimeTestCase):
 
-    def set_ip(self, x): 
+    def set_ip(self, x):
         x = x.split(".")
-        sample_host_address = '150'        
+        sample_host_address = '150'
         x[3] = sample_host_address
         x = '.'.join(x)
         return x
-    
-    @skipIfQemu('qemuall', 'Test only runs on real hardware')    
+
+    @skipIfQemu('qemuall', 'Test only runs on real hardware')
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     def test_set_virtual_ip(self):
         (status, output) = self.target.run("ifconfig eth0 | grep 'inet ' | awk '{print $2}'")
         self.assertEqual(status, 0, msg='Failed to get ip address. Make sure you have an ethernet connection on your device, output: %s' % output)
-        original_ip = output 
+        original_ip = output
         virtual_ip = self.set_ip(original_ip)
-        
+
         (status, output) = self.target.run("ifconfig eth0:1 %s netmask 255.255.255.0 && sleep 2 && ping -c 5 %s && ifconfig eth0:1 down" % (virtual_ip, virtual_ip))
         self.assertEqual(status, 0, msg='Failed to create virtual ip address, output: %s' % output)
-        
-    @OETestDepends(['ethernet_ip_connman.Ethernet_Test.test_set_virtual_ip'])  
-    def test_get_ip_from_dhcp(self): 
+
+    @OETestDepends(['ethernet_ip_connman.Ethernet_Test.test_set_virtual_ip'])
+    def test_get_ip_from_dhcp(self):
         (status, output) = self.target.run("connmanctl services | grep -E '*AO Wired|*AR Wired' | awk '{print $3}'")
         self.assertEqual(status, 0, msg='No wired interfaces are detected, output: %s' % output)
         wired_interfaces = output
-        
+
         (status, output) = self.target.run("ip route | grep default | awk '{print $3}'")
         self.assertEqual(status, 0, msg='Failed to retrieve the default gateway, output: %s' % output)
         default_gateway = output
diff --git a/meta/lib/oeqa/runtime/cases/logrotate.py b/meta/lib/oeqa/runtime/cases/logrotate.py
index 9f88f2dbc0..0e5623e3c0 100644
--- a/meta/lib/oeqa/runtime/cases/logrotate.py
+++ b/meta/lib/oeqa/runtime/cases/logrotate.py
@@ -37,20 +37,20 @@ class LogrotateTest(OERuntimeTestCase):
         status, output = self.target.run('echo "create \n olddir $HOME/logrotate_dir \n include /etc/logrotate.d/wtmp" > /tmp/logrotate-test.conf')
         msg = ('Could not write to /tmp/logrotate-test.conf')
         self.assertEqual(status, 0, msg=msg)
-        
+
         # If logrotate fails to rotate the log, view the verbose output of logrotate to see what prevented it
         _, logrotate_output = self.target.run('logrotate -vf /tmp/logrotate-test.conf')
         status, _ = self.target.run('find $HOME/logrotate_dir -type f | grep wtmp.1')
         msg = ("logrotate did not successfully rotate the wtmp log. Output from logrotate -vf: \n%s" % (logrotate_output))
         self.assertEqual(status, 0, msg=msg)
-       
+
     @OETestDepends(['logrotate.LogrotateTest.test_logrotate_wtmp'])
     def test_logrotate_newlog(self):
-        
+
         status, output = self.target.run('echo "oeqa logrotate test file" > /var/log/logrotate_testfile')
         msg = ('Could not create logrotate test file in /var/log')
         self.assertEqual(status, 0, msg=msg)
-        
+
         status, output = self.target.run('echo "/var/log/logrotate_testfile {\n missingok \n monthly \n rotate 1" > /etc/logrotate.d/logrotate_testfile')
         msg = ('Could not write to /etc/logrotate.d/logrotate_testfile')
         self.assertEqual(status, 0, msg=msg)
@@ -68,5 +68,3 @@ class LogrotateTest(OERuntimeTestCase):
         status, _ = self.target.run('find $HOME/logrotate_dir -type f | grep logrotate_testfile.1')
         msg = ('logrotate did not successfully rotate the logrotate_test log. Output from logrotate -vf: \n%s' % (logrotate_output))
         self.assertEqual(status, 0, msg=msg)
-
-
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py
index 4bf2f11a19..765e66ab5f 100644
--- a/meta/lib/oeqa/runtime/cases/ltp.py
+++ b/meta/lib/oeqa/runtime/cases/ltp.py
@@ -78,7 +78,7 @@ class LtpTest(LtpTestBase):
 
             # copy nice log from DUT
             dst = os.path.join(self.ltptest_log_dir, "%s" % ltp_group)
-            remote_src = "/opt/ltp/results/%s" % ltp_group 
+            remote_src = "/opt/ltp/results/%s" % ltp_group
             (status, output) = self.target.copyFrom(remote_src, dst, True)
             msg = 'File could not be copied. Output: %s' % output
             if status:
@@ -97,7 +97,7 @@ class LtpTest(LtpTestBase):
                 testname = ("ltpresult." + ltp_group + "." + test)
                 self.extras[testname] = {'status': result}
                 if result == 'FAILED':
-                    failed_tests[ltp_group] = test 
+                    failed_tests[ltp_group] = test
 
             if failed_tests:
                 self.failmsg = self.failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests)
@@ -112,7 +112,7 @@ class LtpTest(LtpTestBase):
 
     @OETestDepends(['ltp.LtpTest.test_ltp_help'])
     def test_ltp_groups(self):
-        for ltp_group in self.ltp_groups: 
+        for ltp_group in self.ltp_groups:
             self.runltp(ltp_group)
 
     @OETestDepends(['ltp.LtpTest.test_ltp_groups'])
diff --git a/meta/lib/oeqa/runtime/cases/ltp_compliance.py b/meta/lib/oeqa/runtime/cases/ltp_compliance.py
index 8b0f8a2cdd..eab42afc39 100644
--- a/meta/lib/oeqa/runtime/cases/ltp_compliance.py
+++ b/meta/lib/oeqa/runtime/cases/ltp_compliance.py
@@ -77,14 +77,14 @@ class LtpPosixTest(LtpPosixBase):
             runtime = int(endtime - starttime)
             sections['duration'] = runtime
             self.sections[posix_group] = sections
- 
+
             failed_tests = {}
             for test in results:
                 result = results[test]
                 testname = ("ltpposixresult." + posix_group + "." + test)
                 self.extras[testname] = {'status': result}
                 if result == 'FAILED':
-                    failed_tests[posix_group] = test 
+                    failed_tests[posix_group] = test
 
             if failed_tests:
                 self.failmsg = self.failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests)
@@ -94,5 +94,5 @@ class LtpPosixTest(LtpPosixBase):
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     @OEHasPackage(["ltp"])
     def test_posix_groups(self):
-        for posix_group in self.posix_groups: 
+        for posix_group in self.posix_groups:
             self.runltp(posix_group)
diff --git a/meta/lib/oeqa/runtime/cases/ltp_stress.py b/meta/lib/oeqa/runtime/cases/ltp_stress.py
index beb47710e4..dd1a7138b2 100644
--- a/meta/lib/oeqa/runtime/cases/ltp_stress.py
+++ b/meta/lib/oeqa/runtime/cases/ltp_stress.py
@@ -76,14 +76,14 @@ class LtpStressTest(LtpStressBase):
             runtime = int(endtime - starttime)
             sections['duration'] = runtime
             self.sections[stress_group] = sections
- 
+
             failed_tests = {}
             for test in results:
                 result = results[test]
                 testname = ("ltpstressresult." + stress_group + "." + test)
                 self.extras[testname] = {'status': result}
                 if result == 'FAILED':
-                    failed_tests[stress_group] = test 
+                    failed_tests[stress_group] = test
 
             if failed_tests:
                 self.failmsg = self.failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests)
diff --git a/meta/lib/oeqa/runtime/cases/opkg.py b/meta/lib/oeqa/runtime/cases/opkg.py
index c810575180..b203b62c8c 100644
--- a/meta/lib/oeqa/runtime/cases/opkg.py
+++ b/meta/lib/oeqa/runtime/cases/opkg.py
@@ -40,11 +40,11 @@ class OpkgRepoTest(OpkgTest):
         apt_get_source_server = 'http://%s:%s/' % (self.tc.target.server_ip, self.repo_server.port)
         apt_get_sourceslist_dir = '/etc/opkg/'
         self.target.run('cd %s; echo src/gz all %s >> opkg.conf' % (apt_get_sourceslist_dir, apt_get_source_server))
-        
+
     def cleanup_source_config_for_package_install(self):
         apt_get_sourceslist_dir = '/etc/opkg/'
         self.target.run('cd %s; sed -i "/^src/d" opkg.conf' % (apt_get_sourceslist_dir))
-        
+
     @skipIfNotFeature('package-management',
                       'Test requires package-management to be in IMAGE_FEATURES')
     @skipIfNotDataVar('IMAGE_PKGTYPE', 'ipk',
diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py
index 9c7a50c567..d98c34250f 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -141,5 +141,3 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
             self.assertEqual(0, status, msg=msg)
 
         self.tc.target.run('rm -f %s' % self.dst)
-
-
diff --git a/meta/lib/oeqa/runtime/cases/rtc.py b/meta/lib/oeqa/runtime/cases/rtc.py
index 43de30a23f..3b0e32ee14 100644
--- a/meta/lib/oeqa/runtime/cases/rtc.py
+++ b/meta/lib/oeqa/runtime/cases/rtc.py
@@ -22,7 +22,7 @@ class RTCTest(OERuntimeTestCase):
     def test_rtc(self):
         (status, output) = self.target.run('hwclock -r')
         self.assertEqual(status, 0, msg='Failed to get RTC time, output: %s' % output)
-        
+
         (status, current_datetime) = self.target.run('date +"%m%d%H%M%Y"')
         self.assertEqual(status, 0, msg='Failed to get system current date & time, output: %s' % current_datetime)
 
@@ -33,7 +33,6 @@ class RTCTest(OERuntimeTestCase):
 
         (status, output) = self.target.run('date %s' % current_datetime)
         self.assertEqual(status, 0, msg='Failed to reset system date & time, output: %s' % output)
-        
+
         (status, output) = self.target.run('hwclock -w')
         self.assertEqual(status, 0, msg='Failed to reset RTC time, output: %s' % output)
-        
diff --git a/meta/lib/oeqa/runtime/cases/runlevel.py b/meta/lib/oeqa/runtime/cases/runlevel.py
index 8dbb2e4f13..b5802bf37a 100644
--- a/meta/lib/oeqa/runtime/cases/runlevel.py
+++ b/meta/lib/oeqa/runtime/cases/runlevel.py
@@ -5,7 +5,7 @@ import time
 
 
 class RunLevel_Test(OERuntimeTestCase):
-    
+
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     def test_runlevel_3(self):
         (status, output) = self.target.run("init 3 && sleep 5 && runlevel")
@@ -13,8 +13,8 @@ class RunLevel_Test(OERuntimeTestCase):
         self.assertEqual(output, runlevel, msg='Failed to set current runlevel to runlevel 3, current runlevel : %s' % output[-1])
         (status, output) = self.target.run("uname -a")
         self.assertEqual(status, 0, msg='Failed to run uname command, output: %s' % output)
-        
-    @OETestDepends(['runlevel.RunLevel_Test.test_runlevel_3']) 
+
+    @OETestDepends(['runlevel.RunLevel_Test.test_runlevel_3'])
     def test_runlevel_5(self):
         (status, output) = self.target.run("init 5 && sleep 5 && runlevel")
         runlevel = '3 5'
diff --git a/meta/lib/oeqa/runtime/cases/storage.py b/meta/lib/oeqa/runtime/cases/storage.py
index cd640e214e..c7ff552283 100644
--- a/meta/lib/oeqa/runtime/cases/storage.py
+++ b/meta/lib/oeqa/runtime/cases/storage.py
@@ -36,7 +36,7 @@ class StorageBase(OERuntimeTestCase):
         msg = ('File %s not created on %s' % (cls.test_file, cls.device))
         cls.assertFalse(status, msg=msg)
         # move file
-        (status, output) = cls.target.run('mv %s/%s %s/%s1' %  
+        (status, output) = cls.target.run('mv %s/%s %s/%s1' %
                 (cls.test_dir, cls.test_file, cls.test_dir, cls.test_file))
         msg = ('File %s not moved to %s' % (cls.test_file, cls.device))
         cls.assertFalse(status, msg=msg)
@@ -47,7 +47,7 @@ class StorageBase(OERuntimeTestCase):
 
     def storage_read(cls):
         # check if message is in file
-        (status, output) = cls.target.run('cat  %s/%s' % 
+        (status, output) = cls.target.run('cat  %s/%s' %
                 (cls.test_dir, cls.test_file))
 
         match = re.search('%s' % cls.test_msg, output)
@@ -56,7 +56,7 @@ class StorageBase(OERuntimeTestCase):
 
     def storage_write(cls):
         # create test message in file on device
-        (status, output) = cls.target.run('echo "%s" >  %s/%s' % 
+        (status, output) = cls.target.run('echo "%s" >  %s/%s' %
                 (cls.test_msg, cls.test_dir, cls.test_file))
         msg = ('File %s not create test message on %s' % (cls.test_file, cls.device))
         cls.assertEqual(status, 0, msg=msg)
diff --git a/meta/lib/oeqa/runtime/cases/suspend.py b/meta/lib/oeqa/runtime/cases/suspend.py
index 84e2e3f710..bf63489732 100644
--- a/meta/lib/oeqa/runtime/cases/suspend.py
+++ b/meta/lib/oeqa/runtime/cases/suspend.py
@@ -7,23 +7,23 @@ import time
 
 class Suspend_Test(OERuntimeTestCase):
 
-    def test_date(self): 
+    def test_date(self):
         (status, output) = self.target.run('date')
         self.assertEqual(status, 0, msg='Failed to run date command, output : %s' % output)
-        
+
     def test_ping(self):
         t_thread = threading.Thread(target=self.target.run, args=("ping 8.8.8.8",))
         t_thread.start()
         time.sleep(2)
-        
+
         status, output = self.target.run('pidof ping')
         self.target.run('kill -9 %s' % output)
-        self.assertEqual(status, 0, msg='Not able to find process that runs ping, output : %s' % output)  
-        
-    def set_suspend(self): 
+        self.assertEqual(status, 0, msg='Not able to find process that runs ping, output : %s' % output)
+
+    def set_suspend(self):
         (status, output) = self.target.run('sudo rtcwake -m mem -s 10')
         self.assertEqual(status, 0, msg='Failed to suspends your system to RAM, output : %s' % output)
-    
+
     @skipIfQemu('qemuall', 'Test only runs on real hardware')
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     def test_suspend(self):
diff --git a/meta/lib/oeqa/runtime/cases/terminal.py b/meta/lib/oeqa/runtime/cases/terminal.py
index fe1cd68118..77328ab928 100644
--- a/meta/lib/oeqa/runtime/cases/terminal.py
+++ b/meta/lib/oeqa/runtime/cases/terminal.py
@@ -14,9 +14,9 @@ class TerminalTest(OERuntimeTestCase):
         t_thread = threading.Thread(target=self.target.run, args=("export DISPLAY=:0 && matchbox-terminal -e 'sh -c \"uname -a && exec sh\"'",))
         t_thread.start()
         time.sleep(2)
-        
+
         status, output = self.target.run('pidof matchbox-terminal')
         number_of_terminal = len(output.split())
         self.assertEqual(number_of_terminal, 1, msg='There should be only one terminal being launched. Number of terminal launched : %s' % number_of_terminal)
         self.target.run('kill -9 %s' % output)
-        self.assertEqual(status, 0, msg='Not able to find process that runs terminal.')     
+        self.assertEqual(status, 0, msg='Not able to find process that runs terminal.')
diff --git a/meta/lib/oeqa/runtime/cases/usb_hid.py b/meta/lib/oeqa/runtime/cases/usb_hid.py
index e8451b4658..6f7f0e2aa5 100644
--- a/meta/lib/oeqa/runtime/cases/usb_hid.py
+++ b/meta/lib/oeqa/runtime/cases/usb_hid.py
@@ -6,18 +6,18 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 class USB_HID_Test(OERuntimeTestCase):
 
-    def keyboard_mouse_simulation(self): 
+    def keyboard_mouse_simulation(self):
         (status, output) = self.target.run('export DISPLAY=:0 && xdotool key F2 && xdotool mousemove 100 100')
         return self.assertEqual(status, 0, msg='Failed to simulate keyboard/mouse input event, output : %s' % output)
-             
-    def set_suspend(self): 
+
+    def set_suspend(self):
         (status, output) = self.target.run('sudo rtcwake -m mem -s 10')
         return self.assertEqual(status, 0, msg='Failed to suspends your system to RAM, output : %s' % output)
-    
+
     @OEHasPackage(['xdotool'])
     @skipIfQemu('qemuall', 'Test only runs on real hardware')
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     def test_USB_Hid_input(self):
         self.keyboard_mouse_simulation()
         self.set_suspend()
-        self.keyboard_mouse_simulation()  
+        self.keyboard_mouse_simulation()
diff --git a/meta/lib/oeqa/sdk/cases/gcc.py b/meta/lib/oeqa/sdk/cases/gcc.py
index f943cd3fe3..f2da2637b8 100644
--- a/meta/lib/oeqa/sdk/cases/gcc.py
+++ b/meta/lib/oeqa/sdk/cases/gcc.py
@@ -19,7 +19,7 @@ class GccCompileTest(OESDKTestCase):
     @classmethod
     def setUpClass(self):
         files = {'test.c': self.tc.files_dir, 'test.cpp': self.tc.files_dir,
-                'testsdkmakefile': self.tc.sdk_files_dir} 
+                'testsdkmakefile': self.tc.sdk_files_dir}
         for f in files:
             shutil.copyfile(os.path.join(files[f], f),
                     os.path.join(self.tc.sdk_dir, f))
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py
index 4e4eb8e5fa..67da429c51 100644
--- a/meta/lib/oeqa/sdk/context.py
+++ b/meta/lib/oeqa/sdk/context.py
@@ -80,7 +80,7 @@ class OESDKTestContextExecutor(OETestContextExecutor):
         # required options, seems that don't keep track of already parsed
         # options
         sdk_rgroup = self.parser.add_argument_group('sdk required options')
-        sdk_rgroup.add_argument('--sdk-dir', required=False, action='store', 
+        sdk_rgroup.add_argument('--sdk-dir', required=False, action='store',
             help='sdk installed directory')
 
         self.parser.add_argument('-j', '--num-processes', dest='processes', action='store',
diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
index 80c2002ecd..05363c36df 100644
--- a/meta/lib/oeqa/sdk/testsdk.py
+++ b/meta/lib/oeqa/sdk/testsdk.py
@@ -144,5 +144,3 @@ class TestSDK(TestSDKBase):
 
         if fail:
             bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
-
-
diff --git a/meta/lib/oeqa/sdkext/testsdk.py b/meta/lib/oeqa/sdkext/testsdk.py
index 6d552a8edf..8631a9e6d1 100644
--- a/meta/lib/oeqa/sdkext/testsdk.py
+++ b/meta/lib/oeqa/sdkext/testsdk.py
@@ -105,4 +105,3 @@ class TestSDKExt(TestSDKBase):
 
         if fail:
             bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
-
diff --git a/meta/lib/oeqa/selftest/cases/binutils.py b/meta/lib/oeqa/selftest/cases/binutils.py
index 87b0e8b438..9c9538de85 100644
--- a/meta/lib/oeqa/selftest/cases/binutils.py
+++ b/meta/lib/oeqa/selftest/cases/binutils.py
@@ -49,4 +49,3 @@ class BinutilsCrossSelfTest(OESelftestTestCase, OEPTestResultTestCase):
         with open(sumspath, "r") as f:
             for test, result in parse_values(f):
                 self.ptest_result(ptestsuite, test, result)
-
diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py b/meta/lib/oeqa/selftest/cases/eSDK.py
index d40ff86c4a..10518d4cf9 100644
--- a/meta/lib/oeqa/selftest/cases/eSDK.py
+++ b/meta/lib/oeqa/selftest/cases/eSDK.py
@@ -118,4 +118,3 @@ SSTATE_MIRRORS =  "file://.* file://%s/PATH"
         image = 'core-image-minimal'
         cmd = "devtool build-image %s" % image
         oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
-
diff --git a/meta/lib/oeqa/selftest/cases/gcc.py b/meta/lib/oeqa/selftest/cases/gcc.py
index 843746418f..070b01b645 100644
--- a/meta/lib/oeqa/selftest/cases/gcc.py
+++ b/meta/lib/oeqa/selftest/cases/gcc.py
@@ -165,4 +165,3 @@ class GccLibItmSelfTestSystemEmulated(GccSelfTestBase):
     def test_libitm(self):
         self.check_skip("libitm")
         self.run_check_emulated("libitm")
-
diff --git a/meta/lib/oeqa/selftest/cases/glibc.py b/meta/lib/oeqa/selftest/cases/glibc.py
index 842b663bdc..d41dd49ab3 100644
--- a/meta/lib/oeqa/selftest/cases/glibc.py
+++ b/meta/lib/oeqa/selftest/cases/glibc.py
@@ -90,4 +90,3 @@ class GlibcSelfTest(GlibcSelfTestBase):
 class GlibcSelfTestSystemEmulated(GlibcSelfTestBase):
     def test_glibc(self):
         self.run_check_emulated()
-
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 6f982b52c2..dbd3ccc517 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -262,7 +262,7 @@ PNBLACKLIST[busybox] = "Don't build this"
         Author:      Humberto Ibarra <humberto.ibarra.lopez@intel.com>
                      Yeoh Ee Peng <ee.peng.yeoh@intel.com>
         """
-      
+
         image_name = 'core-image-minimal'
         features = 'IMAGE_GEN_DEBUGFS = "1"\n'
         features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"\n'
diff --git a/meta/lib/oeqa/selftest/cases/incompatible_lic.py b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
index 22a38a3f1a..d85ef5e59c 100644
--- a/meta/lib/oeqa/selftest/cases/incompatible_lic.py
+++ b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
@@ -135,4 +135,3 @@ RDEPENDS_packagegroup-core-full-cmdline-multiuser_remove = "gzip"\n
 """)
         bitbake('core-image-full-cmdline')
         bitbake('-c testimage core-image-full-cmdline')
-
diff --git a/meta/lib/oeqa/selftest/cases/meta_ide.py b/meta/lib/oeqa/selftest/cases/meta_ide.py
index cf111fa781..4685683e3c 100644
--- a/meta/lib/oeqa/selftest/cases/meta_ide.py
+++ b/meta/lib/oeqa/selftest/cases/meta_ide.py
@@ -23,7 +23,7 @@ class MetaIDE(OESelftestTestCase):
         cls.environment_script_path = '%s/%s' % (cls.tmpdir, cls.environment_script)
         cls.corebasedir = bb_vars['COREBASE']
         cls.tmpdir_metaideQA = tempfile.mkdtemp(prefix='metaide')
-        
+
     @classmethod
     def tearDownClass(cls):
         shutil.rmtree(cls.tmpdir_metaideQA, ignore_errors=True)
diff --git a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
index 18a877ee72..02ed94b1ef 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py
@@ -144,4 +144,3 @@ class TestFileListCompare(OESelftestTestCase):
 
         self.maxDiff = None
         self.assertCountEqual(rendered, expectedResult)
-
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
index cf432d9d35..e7571aac34 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -109,7 +109,7 @@ class OEGitproxyTests(OESelftestTestCase):
         res = runCmd('%s%s/oe-git-proxy 127.1.2.3 9418' %
                      (prefix, self.scripts_dir))
         self.assertIn('TCP:', res.output)
-        
+
         # test that * globbering is off
         os.environ['NO_PROXY'] = "*"
         res = runCmd('%s%s/oe-git-proxy host.example.com 9418' %
@@ -135,7 +135,7 @@ class OeRunNativeTest(OESelftestTestCase):
 
 class OEListPackageconfigTests(OEScriptTests):
     #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags
-    def check_endlines(self, results, expected_endlines): 
+    def check_endlines(self, results, expected_endlines):
         for line in results.output.splitlines():
             for el in expected_endlines:
                 if line.split() == el.split():
@@ -188,4 +188,3 @@ class OEListPackageconfigTests(OEScriptTests):
         expected_endlines.append("pinentry                     gtk2 libcap ncurses qt secret")
 
         self.check_endlines(results, expected_endlines)
-
diff --git a/meta/lib/oeqa/selftest/cases/prservice.py b/meta/lib/oeqa/selftest/cases/prservice.py
index 0b248addda..90426889a4 100644
--- a/meta/lib/oeqa/selftest/cases/prservice.py
+++ b/meta/lib/oeqa/selftest/cases/prservice.py
@@ -123,4 +123,3 @@ class BitbakePrTests(OESelftestTestCase):
         ret = runCmd('bitbake-prserv --host localhost --port %s --loglevel=DEBUG --stop' % port)
 
         self.assertEqual(ret.status, 0)
-
diff --git a/meta/lib/oeqa/selftest/cases/recipeutils.py b/meta/lib/oeqa/selftest/cases/recipeutils.py
index 4883d15b51..50fea291e2 100644
--- a/meta/lib/oeqa/selftest/cases/recipeutils.py
+++ b/meta/lib/oeqa/selftest/cases/recipeutils.py
@@ -43,15 +43,15 @@ class RecipeUtilsTests(OESelftestTestCase):
 -LICENSE = "BSD"
 +LICENSE = "something"
  LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
- 
+
  inherit pypi
- 
+
  PYPI_PACKAGE = "async"
- 
+
 -SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
 +SRC_URI[md5sum] = "aaaaaa"
  SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
- 
+
  RDEPENDS_${PN} += "${PYTHON_PN}-threading"
 """
         patchlines = []
@@ -74,9 +74,9 @@ class RecipeUtilsTests(OESelftestTestCase):
 --- a/recipes-test/recipeutils/recipeutils-test_1.2.bb
 +++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb
 @@ -8,6 +8,4 @@
- 
+
  BBCLASSEXTEND = "native nativesdk"
- 
+
 -SRC_URI += "file://somefile"
 -
  SRC_URI_append = " file://anotherfile"
@@ -98,9 +98,9 @@ class RecipeUtilsTests(OESelftestTestCase):
 --- a/recipes-test/recipeutils/recipeutils-test_1.2.bb
 +++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb
 @@ -8,6 +8,3 @@
- 
+
  BBCLASSEXTEND = "native nativesdk"
- 
+
 -SRC_URI += "file://somefile"
 -
 -SRC_URI_append = " file://anotherfile"
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index d2053b1473..d6c924a300 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -334,4 +334,3 @@ class ReproducibleTests(OESelftestTestCase):
 
         if fails:
             self.fail('\n'.join(fails))
-
diff --git a/meta/lib/oeqa/selftest/cases/resulttooltests.py b/meta/lib/oeqa/selftest/cases/resulttooltests.py
index aa3b87c031..fe560fc064 100644
--- a/meta/lib/oeqa/selftest/cases/resulttooltests.py
+++ b/meta/lib/oeqa/selftest/cases/resulttooltests.py
@@ -96,4 +96,3 @@ class ResultToolTests(OESelftestTestCase):
         resultutils.append_resultsdata(results, ResultToolTests.base_results_data, configmap=resultutils.flatten_map)
         resultutils.append_resultsdata(results, ResultToolTests.target_results_data, configmap=resultutils.flatten_map)
         self.assertEqual(len(results[''].keys()), 5, msg="Flattened results not correct %s" % str(results))
-
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 95c37e2ec9..a2d806256f 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -388,7 +388,7 @@ IMAGE_INSTALL_append = " systemtap-runtime"
             bitbake(self.image)
 
             with runqemu(self.image) as qemu:
-                cmd = "crosstap -r root@192.168.7.2 -s %s/general/helloworld.stp " % systemtap_examples 
+                cmd = "crosstap -r root@192.168.7.2 -s %s/general/helloworld.stp " % systemtap_examples
                 result = runCmd(cmd)
                 self.assertEqual(0, result.status, 'crosstap helloworld returned a non 0 status:%s' % result.output)
 
@@ -427,4 +427,3 @@ IMAGE_INSTALL_append = " systemtap-runtime"
                 cmd = "crosstap -r root@192.168.7.2 -s %s/process/ syscalls_by_pid.stp" % systemtap_examples
                 result = runCmd(cmd)
                 self.assertEqual(0, result.status, 'crosstap  syscalls_by_pid returned a non 0 status:%s' % result.output)
-
diff --git a/meta/lib/oeqa/selftest/cases/selftest.py b/meta/lib/oeqa/selftest/cases/selftest.py
index a5d9a06d36..c9c2c267b0 100644
--- a/meta/lib/oeqa/selftest/cases/selftest.py
+++ b/meta/lib/oeqa/selftest/cases/selftest.py
@@ -53,4 +53,3 @@ def search_method(module, method):
                 if m == method:
                     return True
     return False
-
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py
index 865a71e93e..9074f71ace 100644
--- a/meta/lib/oeqa/selftest/cases/signing.py
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -130,7 +130,7 @@ class Signing(OESelftestTestCase):
 
         test_recipe = 'ed'
 
-        # Since we need gpg but we can't use gpg-native for sstate signatures, we 
+        # Since we need gpg but we can't use gpg-native for sstate signatures, we
         # build gpg-native in our original builddir then run the tests in a second one.
         builddir = os.environ.get('BUILDDIR') + "-testsign"
         sstatedir = os.path.join(builddir, 'test-sstate')
diff --git a/meta/lib/oeqa/selftest/cases/sysroot.py b/meta/lib/oeqa/selftest/cases/sysroot.py
index 937bc49af6..b4232f7f4e 100644
--- a/meta/lib/oeqa/selftest/cases/sysroot.py
+++ b/meta/lib/oeqa/selftest/cases/sysroot.py
@@ -16,7 +16,7 @@ class SysrootTests(OESelftestTestCase):
         sysroot is correctly cleaned up. The files in the two providers overlap
         so can cause errors if the sysroot code doesn't function correctly.
         Yes, sysroot-test should be machine specific really to avoid this, however
-        the sysroot cleanup should also work [YOCTO #13702]. 
+        the sysroot cleanup should also work [YOCTO #13702].
         """
 
         uuid1 = uuid.uuid4()
diff --git a/meta/lib/oeqa/selftest/cases/tinfoil.py b/meta/lib/oeqa/selftest/cases/tinfoil.py
index 01c2ffe5ee..85cc542df1 100644
--- a/meta/lib/oeqa/selftest/cases/tinfoil.py
+++ b/meta/lib/oeqa/selftest/cases/tinfoil.py
@@ -103,9 +103,9 @@ class TinfoilTests(OESelftestTestCase):
             start = time.time()
             # Wait for maximum 60s in total so we'd detect spurious heartbeat events for example
             # The test is IO load sensitive too
-            while (not (eventreceived == True and commandcomplete == True) 
+            while (not (eventreceived == True and commandcomplete == True)
                     and (time.time() - start < 60)):
-                # if we received both events (on let's say a good day), we are done  
+                # if we received both events (on let's say a good day), we are done
                 event = tinfoil.wait_event(1)
                 if event:
                     if isinstance(event, bb.command.CommandCompleted):
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 36ab91c4f2..f1f63ddcd9 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -247,7 +247,7 @@ class Wic(WicTestCase):
         runCmd(cmd)
         sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
         images = glob(self.resultdir + "mkefidisk-*.direct")
-        result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))       
+        result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
         self.assertIn("kernel", result.output)
 
     def test_sdimage_bootpart(self):
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index e4d3d88b54..7bfbe97f7a 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -199,14 +199,14 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
         machines = []
 
         bbpath = self.tc_kwargs['init']['td']['BBPATH'].split(':')
-    
+
         for path in bbpath:
             found_machines = glob.glob(os.path.join(path, 'conf', 'machine', '*.conf'))
             if found_machines:
                 for i in found_machines:
                     # eg: '/home/<user>/poky/meta-intel/conf/machine/intel-core2-32.conf'
                     machines.append(os.path.splitext(os.path.basename(i))[0])
-    
+
         return machines
 
     def _get_cases_paths(self, bbpath):
diff --git a/meta/lib/oeqa/utils/__init__.py b/meta/lib/oeqa/utils/__init__.py
index 40af6e73f8..03f0fc8ad9 100644
--- a/meta/lib/oeqa/utils/__init__.py
+++ b/meta/lib/oeqa/utils/__init__.py
@@ -46,8 +46,8 @@ def avoid_paths_in_environ(paths):
 def make_logger_bitbake_compatible(logger):
     import logging
 
-    """ 
-    We need to raise the log level of the info output so unittest 
+    """
+    We need to raise the log level of the info output so unittest
     messages are visible on the console.
     """
     def _bitbake_log_info(msg, *args, **kwargs):
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 1b13c5df22..60314f08d0 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -117,7 +117,7 @@ class Command(object):
             else:
                 deadline = time.time() + self.timeout
                 for thread in self.threads:
-                    timeout = deadline - time.time() 
+                    timeout = deadline - time.time()
                     if timeout < 0:
                         timeout = 0
                     thread.join(timeout)
diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py
index b3d96d1562..dd56f0b69b 100644
--- a/meta/lib/oeqa/utils/git.py
+++ b/meta/lib/oeqa/utils/git.py
@@ -78,5 +78,3 @@ class GitRepo(object):
             return self.run_cmd(['symbolic-ref', 'HEAD'])[11:]
         except GitError:
             return None
-
-
diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py
index 13713d9eca..1a40c640fb 100644
--- a/meta/lib/oeqa/utils/gitarchive.py
+++ b/meta/lib/oeqa/utils/gitarchive.py
@@ -241,4 +241,3 @@ def rev_find(revs, attr, val):
         if getattr(rev, attr) == val:
             return i
     raise ValueError("Unable to find '{}' value '{}'".format(attr, val))
-
diff --git a/meta/lib/oeqa/utils/httpserver.py b/meta/lib/oeqa/utils/httpserver.py
index 3bdccbf2ed..5f0d894b36 100644
--- a/meta/lib/oeqa/utils/httpserver.py
+++ b/meta/lib/oeqa/utils/httpserver.py
@@ -42,7 +42,7 @@ class HTTPService(object):
         self.process = multiprocessing.Process(target=self.server.server_start, args=[self.root_dir, self.logger])
 
         # The signal handler from testimage.bbclass can cause deadlocks here
-        # if the HTTPServer is terminated before it can restore the standard 
+        # if the HTTPServer is terminated before it can restore the standard
         #signal behaviour
         orig = signal.getsignal(signal.SIGTERM)
         signal.signal(signal.SIGTERM, signal.SIG_DFL)
@@ -60,4 +60,3 @@ class HTTPService(object):
             self.process.join()
         if self.logger:
             self.logger.info("Stopped HTTPService on %s:%s" % (self.host, self.port))
-
diff --git a/meta/lib/oeqa/utils/nfs.py b/meta/lib/oeqa/utils/nfs.py
index 745168985f..e0e5dcc9a3 100644
--- a/meta/lib/oeqa/utils/nfs.py
+++ b/meta/lib/oeqa/utils/nfs.py
@@ -37,4 +37,3 @@ def unfs_server(directory, logger=None):
         if exports is not None:
             # clean up exports file
             os.unlink(exports.name)
-
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 59caf5b1fc..096ca4d0a8 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -192,7 +192,7 @@ class QemuRunner:
         qmp_file = "." + next(tempfile._get_candidate_names())
         qmp_param = ' -S -qmp unix:./%s,server,wait' % (qmp_file)
         qmp_port = self.tmpdir + "/" + qmp_file
-        # Create a second socket connection for debugging use, 
+        # Create a second socket connection for debugging use,
         # note this will NOT cause qemu to block waiting for the connection
         qmp_file2 = "." + next(tempfile._get_candidate_names())
         qmp_param += ' -qmp unix:./%s,server,nowait' % (qmp_file2)
@@ -354,7 +354,7 @@ class QemuRunner:
             os.chdir(origpath)
 
         # We worry that mmap'd libraries may cause page faults which hang the qemu VM for periods
-        # causing failures. Before we "start" qemu, read through it's mapped files to try and 
+        # causing failures. Before we "start" qemu, read through it's mapped files to try and
         # ensure we don't hit page faults later
         mapdir = "/proc/" + str(self.qemupid) + "/map_files/"
         try:
diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py
index ae95ecd34a..8817e15965 100644
--- a/meta/lib/oeqa/utils/testexport.py
+++ b/meta/lib/oeqa/utils/testexport.py
@@ -34,7 +34,7 @@ except ImportError:
             if msg:
                 print("FATAL:" + msg)
                 sys.exit(1)
-    bb = my_log()    
+    bb = my_log()
 
 
 def determine_if_poky_env():
@@ -271,4 +271,3 @@ def rm_bin(removal_list): # need to know both if the binary is sent archived and
         if status != 0:
             bb.warn("Failed to remove: %s. Please ensure connection with the target device is up and running and "
                      "you have the needed rights." % item)
-
diff --git a/meta/recipes-core/glibc/glibc/check-test-wrapper b/meta/recipes-core/glibc/glibc/check-test-wrapper
index d1c328d318..30a9e6b14e 100644
--- a/meta/recipes-core/glibc/glibc/check-test-wrapper
+++ b/meta/recipes-core/glibc/glibc/check-test-wrapper
@@ -77,4 +77,3 @@ try:
     sys.exit(r.returncode)
 except subprocess.TimeoutExpired:
     sys.exit(-1)
-
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 00ccbcd1b8..0cdd95f598 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -31,7 +31,7 @@ class SystemdFile():
         self._parse(root, path)
         dirname = os.path.basename(path.name) + ".d"
         for location in locations:
-            for path2 in sorted((root / location / "system" / dirname).glob("*.conf")):                
+            for path2 in sorted((root / location / "system" / dirname).glob("*.conf")):
                 self._parse(root, path2)
 
     def _parse(self, root, path):
diff --git a/meta/recipes-devtools/python-numpy/files/run-ptest b/meta/recipes-devtools/python-numpy/files/run-ptest
index 9a1c72aeb1..7a205817f9 100644
--- a/meta/recipes-devtools/python-numpy/files/run-ptest
+++ b/meta/recipes-devtools/python-numpy/files/run-ptest
@@ -2,4 +2,3 @@
 
 import numpy
 numpy.test(label='full', verbose=2)
-
diff --git a/meta/recipes-devtools/python/python3/check_build_completeness.py b/meta/recipes-devtools/python/python3/check_build_completeness.py
index 0f7da37d25..0bdc7b224f 100755
--- a/meta/recipes-devtools/python/python3/check_build_completeness.py
+++ b/meta/recipes-devtools/python/python3/check_build_completeness.py
@@ -14,4 +14,3 @@ if failed_to_build != -1:
 
 if necessary_bits != -1 or failed_to_build != -1:
     sys.exit(1)
-
diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py
index b936d8406e..0d0b27400d 100644
--- a/meta/recipes-devtools/python/python3/create_manifest3.py
+++ b/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -5,7 +5,7 @@
 # packages only when the user needs them, hence why we split upstream python
 # into several packages.
 #
-# In a very simplistic way what this does is: 
+# In a very simplistic way what this does is:
 # Launch python and see specifically what is required for it to run at a minimum
 #
 # Go through the python-manifest file and launch a separate task for every single
@@ -136,9 +136,9 @@ for coredep in output.split():
 
 
 # The second step is to loop through the existing files contained in the core package
-# according to the old manifest, identify if they are  modules, or some other type 
+# according to the old manifest, identify if they are  modules, or some other type
 # of file that we cant import (directories, binaries, configs) in which case we
-# can only assume they were added correctly (manually) so we ignore those and 
+# can only assume they were added correctly (manually) so we ignore those and
 # pass them to the manifest directly.
 
 for filedep in old_manifest['core']['files']:
@@ -216,7 +216,7 @@ for pypkg in old_manifest:
 # each of them by launching a separate task.
 # The output of that task is then parsed and the manifest is updated
 # accordingly, wether it should add the module on FILES for the current package
-# or if that module already belongs to another package then the current one 
+# or if that module already belongs to another package then the current one
 # will RDEPEND on it
 
 for pypkg in old_manifest:
@@ -237,7 +237,7 @@ for pypkg in old_manifest:
     print('Handling package %s' % pypkg)
     print('--------------------------')
 
-    # Handle special cases, we assume that when they were manually added 
+    # Handle special cases, we assume that when they were manually added
     # to the manifest we knew what we were doing.
     special_packages = ['misc', 'modules', 'dev', 'tests']
     if pypkg in special_packages or 'staticdev' in pypkg:
@@ -315,7 +315,7 @@ for pypkg in old_manifest:
             #
             # 2 - We do it the other way around, checking if the folder is contained in the path
             #   e.g. path/folder1/folder2/filename  folder_string= path/folder1/folder2
-            #   is folder_string inside path/folder1/folder2/filename?, 
+            #   is folder_string inside path/folder1/folder2/filename?,
             #   Yes, it works, but we waste a couple of milliseconds.
 
             pymodule_dep = pymodule_dep.replace(pyversion, '${PYTHON_MAJMIN}')
@@ -438,4 +438,3 @@ if (repeated):
     error_msg += '\n'.join(repeated)
     error_msg += '\n'
     sys.exit(error_msg)
-
diff --git a/meta/recipes-devtools/python/python3/get_module_deps3.py b/meta/recipes-devtools/python/python3/get_module_deps3.py
index b9cf5068df..60e8cfaed8 100644
--- a/meta/recipes-devtools/python/python3/get_module_deps3.py
+++ b/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -1,5 +1,5 @@
 # This script is launched on separate task for each python module
-# It checks for dependencies for that specific module and prints 
+# It checks for dependencies for that specific module and prints
 # them out, the output of this execution will have all dependencies
 # for a specific module, which will be parsed an dealt on create_manifest.py
 #
@@ -106,8 +106,8 @@ for item in dif:
         # Deals with NameError: name 'dep_path' is not defined
         # because module is not found (wasn't compiled?), e.g. bddsm
         if debug == True:
-            log.write(item + ' ') 
-            log.write(str(e))                                              
+            log.write(item + ' ')
+            log.write(str(e))
         pass
 
     if dep_path == '':
@@ -158,8 +158,8 @@ for item in dif:
     except NameError as e:
         # Deals with NameError: name 'cached' is not defined
         if debug == True:
-            log.write(item + ' ') 
-            log.write(str(e))                                              
+            log.write(item + ' ')
+            log.write(str(e))
         pass
     if cached is not None:
         if debug == True:
diff --git a/meta/recipes-devtools/python/python3/reformat_sysconfig.py b/meta/recipes-devtools/python/python3/reformat_sysconfig.py
index c4164313e8..65afdcab2e 100644
--- a/meta/recipes-devtools/python/python3/reformat_sysconfig.py
+++ b/meta/recipes-devtools/python/python3/reformat_sysconfig.py
@@ -18,4 +18,3 @@ with open(sys.argv[1], 'w') as f:
         f.write('%s = ' % k)
         pprint.pprint(l[k], stream=f, width=sys.maxsize)
         f.write('\n')
-
diff --git a/meta/recipes-kernel/perf/perf/sort-pmuevents.py b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
index 5e29fab2ce..95fa98fa11 100755
--- a/meta/recipes-kernel/perf/perf/sort-pmuevents.py
+++ b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
@@ -55,12 +55,12 @@ for struct in re.findall(struct_block_regex, data):
         if cpuid:
             #print( "    cpuid found: %s" % cpuid.group(1) )
             entry_dict[struct[1]]['fields'][cpuid.group(1)] = entry
-            
+
         name = re.search(name_regex, entry)
         if name:
             #print( "    name found: %s" % name.group(1) )
             entry_dict[struct[1]]['fields'][name.group(1)] = entry
-        
+
 
 # created ordered dictionaries from the captured values. These are ordered by
 # a sorted() iteration of the keys. We don't care about the order we read
@@ -75,7 +75,7 @@ for i in sorted(entry_dict.keys()):
     entry_dict_sorted[i]['type'] = entry_dict[i]['type']
     entry_dict_sorted[i]['fields'] = {}
     for f in sorted(entry_dict[i]['fields'].keys()):
-        entry_dict_sorted[i]['fields'][f] = entry_dict[i]['fields'][f] 
+        entry_dict_sorted[i]['fields'][f] = entry_dict[i]['fields'][f]
 
 # dump the sorted elements to the outfile
 outf = open(outfile, 'w')
@@ -90,4 +90,3 @@ for d in entry_dict_sorted:
     outf.write("};\n")
 
 outf.close()
-    
diff --git a/scripts/cp-noerror b/scripts/cp-noerror
index 99fce16a10..e93760726c 100755
--- a/scripts/cp-noerror
+++ b/scripts/cp-noerror
@@ -17,7 +17,7 @@ def copytree(src, dst, symlinks=False, ignore=None):
     names = os.listdir(src)
     try:
         os.makedirs(dst)
-    except OSError: 
+    except OSError:
         # Already exists
         pass
     errors = []
diff --git a/scripts/lib/build_perf/__init__.py b/scripts/lib/build_perf/__init__.py
index 0bc0d74206..addabff281 100644
--- a/scripts/lib/build_perf/__init__.py
+++ b/scripts/lib/build_perf/__init__.py
@@ -22,4 +22,3 @@ def print_table(rows, row_fmt=None):
 
     for row in rows:
         print(*[row_fmt[i].format(col, wid=col_widths[i]) for i, col in enumerate(row)])
-
diff --git a/scripts/lib/build_perf/report.py b/scripts/lib/build_perf/report.py
index fc8bba7cd7..087cbef8a5 100644
--- a/scripts/lib/build_perf/report.py
+++ b/scripts/lib/build_perf/report.py
@@ -336,4 +336,3 @@ def measurement_stats(meas, prefix=''):
     stats[prefix + 'plus'] = val_cls(max_val - mean_val)
 
     return stats
-
diff --git a/scripts/lib/checklayer/cases/bsp.py b/scripts/lib/checklayer/cases/bsp.py
index c80200426d..da1e5e76e0 100644
--- a/scripts/lib/checklayer/cases/bsp.py
+++ b/scripts/lib/checklayer/cases/bsp.py
@@ -17,7 +17,7 @@ class BSPCheckLayer(OECheckLayerTestCase):
                 self.tc.layer['name'])
 
     def test_bsp_defines_machines(self):
-        self.assertTrue(self.tc.layer['conf']['machines'], 
+        self.assertTrue(self.tc.layer['conf']['machines'],
                 "Layer is BSP but doesn't defines machines.")
 
     def test_bsp_no_set_machine(self):
diff --git a/scripts/lib/checklayer/cases/distro.py b/scripts/lib/checklayer/cases/distro.py
index decac32ffd..ec0714e751 100644
--- a/scripts/lib/checklayer/cases/distro.py
+++ b/scripts/lib/checklayer/cases/distro.py
@@ -17,7 +17,7 @@ class DistroCheckLayer(OECheckLayerTestCase):
                 self.tc.layer['name'])
 
     def test_distro_defines_distros(self):
-        self.assertTrue(self.tc.layer['conf']['distros'], 
+        self.assertTrue(self.tc.layer['conf']['distros'],
                 "Layer is BSP but doesn't defines machines.")
 
     def test_distro_no_set_distros(self):
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index cd8ac24af4..138524a80f 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -1335,4 +1335,3 @@ def register_commands(subparsers):
     parser_create.add_argument('--devtool', action="store_true", help=argparse.SUPPRESS)
     parser_create.add_argument('--mirrors', action="store_true", help='Enable PREMIRRORS and MIRRORS for source tree fetching (disabled by default).')
     parser_create.set_defaults(func=create_recipe)
-
diff --git a/scripts/lib/resulttool/log.py b/scripts/lib/resulttool/log.py
index c46d5b4b5c..6cba8cd2f0 100644
--- a/scripts/lib/resulttool/log.py
+++ b/scripts/lib/resulttool/log.py
@@ -105,4 +105,3 @@ def register_commands(subparsers):
             help='show raw ptest log')
     parser.add_argument('--raw-reproducible', action='store_true',
             help='show raw reproducible build logs')
-
diff --git a/scripts/lib/resulttool/regression.py b/scripts/lib/resulttool/regression.py
index c1f9460f2e..9ea1bf9ad1 100644
--- a/scripts/lib/resulttool/regression.py
+++ b/scripts/lib/resulttool/regression.py
@@ -189,4 +189,3 @@ def register_commands(subparsers):
     parser_build.add_argument('--commit-number', help="Revision number to search for, redundant if --commit is specified")
     parser_build.add_argument('--commit2', help="Revision to compare with")
     parser_build.add_argument('--commit-number2', help="Revision number to compare with, redundant if --commit2 is specified")
-
diff --git a/scripts/lib/resulttool/resultutils.py b/scripts/lib/resulttool/resultutils.py
index d882b6d322..a23611a2f4 100644
--- a/scripts/lib/resulttool/resultutils.py
+++ b/scripts/lib/resulttool/resultutils.py
@@ -237,4 +237,3 @@ def test_run_results(results):
             if not 'result' in test_run:
                 continue
             yield path, run_name, test_run, test_run['result']
-
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 5f5af5f70c..d569cc2657 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -493,4 +493,3 @@ class Partition():
                     logger.warn("%s Inodes (of size %d) are too small." %
                                 (get_err_str(self), size))
                 break
-
diff --git a/scripts/oe-build-perf-test b/scripts/oe-build-perf-test
index 280eef261d..6e2ab26f13 100755
--- a/scripts/oe-build-perf-test
+++ b/scripts/oe-build-perf-test
@@ -214,4 +214,3 @@ def main(argv=None):
 
 if __name__ == '__main__':
     sys.exit(main())
-
diff --git a/scripts/oe-trim-schemas b/scripts/oe-trim-schemas
index 7bf5b7bdeb..5d3be8fb80 100755
--- a/scripts/oe-trim-schemas
+++ b/scripts/oe-trim-schemas
@@ -61,4 +61,3 @@ for schema in child(xml.getroot(), "schemalist").getchildren():
                 locale.remove(e)
 
 xml.write(sys.stdout, "UTF-8")
-
diff --git a/scripts/oepydevshell-internal.py b/scripts/oepydevshell-internal.py
index e54d84982b..821a970a83 100755
--- a/scripts/oepydevshell-internal.py
+++ b/scripts/oepydevshell-internal.py
@@ -74,7 +74,7 @@ try:
                     if readdata:
                         i = i + readdata.decode('utf-8')
                 if i:
-                    # Write a page at a time to avoid overflowing output 
+                    # Write a page at a time to avoid overflowing output
                     # d.keys() is a good way to do that
                     sys.stdout.write(i[:4096])
                     sys.stdout.flush()
diff --git a/scripts/opkg-query-helper.py b/scripts/opkg-query-helper.py
index 9e50f30962..270bac0c2a 100755
--- a/scripts/opkg-query-helper.py
+++ b/scripts/opkg-query-helper.py
@@ -69,4 +69,3 @@ for line in fileinput.input(args):
                     for rec in recs:
                         rec = verregex.sub('', rec)
                         print("%s|%s [REC]" % (pkg, rec))
-
diff --git a/scripts/pybootchartgui/pybootchartgui/batch.py b/scripts/pybootchartgui/pybootchartgui/batch.py
index 6d9fbce830..9b5a7512b2 100644
--- a/scripts/pybootchartgui/pybootchartgui/batch.py
+++ b/scripts/pybootchartgui/pybootchartgui/batch.py
@@ -44,4 +44,3 @@ def render(writer, trace, app_options, filename):
     draw.render(ctx, options, 1.0, trace)
     write_surface(surface)
     writer.status("bootchart written to '%s'" % filename)
-
diff --git a/scripts/pybootchartgui/pybootchartgui/gui.py b/scripts/pybootchartgui/pybootchartgui/gui.py
index 6a59b2f222..c2136f0551 100644
--- a/scripts/pybootchartgui/pybootchartgui/gui.py
+++ b/scripts/pybootchartgui/pybootchartgui/gui.py
@@ -14,7 +14,7 @@
 #  along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>.
 
 import gi
-gi.require_version('Gtk', '3.0') 
+gi.require_version('Gtk', '3.0')
 from gi.repository import Gtk as gtk
 from gi.repository import Gtk
 from gi.repository import Gdk
diff --git a/scripts/pybootchartgui/pybootchartgui/main.py.in b/scripts/pybootchartgui/pybootchartgui/main.py.in
index cc9471dc21..2e110e272a 100644
--- a/scripts/pybootchartgui/pybootchartgui/main.py.in
+++ b/scripts/pybootchartgui/pybootchartgui/main.py.in
@@ -29,7 +29,7 @@ def _mk_options_parser():
 	usage = "%prog [options] /path/to/tmp/buildstats/<recipe-machine>/<BUILDNAME>/"
 	version = "%prog v1.0.0"
 	parser = optparse.OptionParser(usage, version=version)
-	parser.add_option("-i", "--interactive", action="store_true", dest="interactive", default=False, 
+	parser.add_option("-i", "--interactive", action="store_true", dest="interactive", default=False,
 			  help="start in active mode")
 	parser.add_option("-f", "--format", dest="format", default="png", choices=["png", "svg", "pdf"],
 			  help="image format (png, svg, pdf); default format png")
@@ -46,7 +46,7 @@ def _mk_options_parser():
 	parser.add_option("-q", "--quiet", action="store_true", dest="quiet", default=False,
 			  help="suppress informational messages")
 #	parser.add_option("-t", "--boot-time", action="store_true", dest="boottime", default=False,
-#			  help="only display the boot time of the boot in text format (stdout)")	
+#			  help="only display the boot time of the boot in text format (stdout)")
 	parser.add_option("--very-quiet", action="store_true", dest="veryquiet", default=False,
 			  help="suppress all messages except errors")
 	parser.add_option("--verbose", action="store_true", dest="verbose", default=False,
@@ -73,7 +73,7 @@ class Writer:
 	def __init__(self, write, options):
 		self.write = write
 		self.options = options
-		
+
 	def error(self, msg):
 		self.write(msg)
 
@@ -94,7 +94,7 @@ def _mk_writer(options):
 	def write(s):
 		print(s)
 	return Writer(write, options)
-	
+
 
 def _get_filename(path):
 	"""Construct a usable filename for outputs"""
@@ -112,7 +112,7 @@ def main(argv=None):
 	try:
 		if argv is None:
 			argv = sys.argv[1:]
-	
+
 		parser = _mk_options_parser()
 		options, args = parser.parse_args(argv)
 
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
index 2890091488..748ddf9f27 100644
--- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
+++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
@@ -26,7 +26,7 @@ writer = main._mk_writer(options)
 
 
 class TestBCParser(unittest.TestCase):
-    
+
 	def setUp(self):
 		self.name = "My first unittest"
 		self.rootdir = bootchart_dir
@@ -43,7 +43,7 @@ class TestBCParser(unittest.TestCase):
 	def test_parseTimedBlocks(self):
 		trace = parsing.Trace(writer, args, options)
 		state = parsing.parse_file(writer, trace, self.mk_fname('proc_diskstats.log'))
-		self.assertEqual(141, len(state.disk_stats))		
+		self.assertEqual(141, len(state.disk_stats))
 
 	def testParseProcPsLog(self):
 		trace = parsing.Trace(writer, args, options)
@@ -78,17 +78,17 @@ class TestBCParser(unittest.TestCase):
 		for index, line in enumerate(diskstats_data):
 			tokens = line.split('\t')
 			sample = samples[index]
-			if debug:		
+			if debug:
 				print(line.rstrip())
 				print(sample)
 				print('-------------------')
-			
+
 			self.assertEqual(tokens[0], str(sample.time))
 			self.assert_(floatEq(float(tokens[1]), sample.read))
 			self.assert_(floatEq(float(tokens[2]), sample.write))
 			self.assert_(floatEq(float(tokens[3]), sample.util))
 		diskstats_data.close()
-	
+
 	def testparseProcStatLog(self):
 		trace = parsing.Trace(writer, args, options)
 		samples = parsing.parse_file(writer, trace, self.mk_fname('proc_stat.log')).cpu_stats
@@ -111,4 +111,3 @@ class TestBCParser(unittest.TestCase):
 
 if __name__ == '__main__':
     unittest.main()
-
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index b4a46a8d51..12f8f52d2b 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -257,4 +257,3 @@ for e in executables_list:
     if old_size != os.path.getsize(e):
         print("New file size for %s is different. Looks like a relocation error!", e)
         sys.exit(-1)
-
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [OE-core] [PATCH 1/8] PEP8 double aggressive E401
  2021-06-28  5:59 [PATCH 1/8] PEP8 double aggressive E401 Khem Raj
                   ` (6 preceding siblings ...)
  2021-06-28  5:59 ` [PATCH 8/8] PEP8 double aggressive W291 ~ W293 and W391 Khem Raj
@ 2021-06-28  6:12 ` Alexander Kanavin
  2021-06-28  6:16   ` Khem Raj
  7 siblings, 1 reply; 16+ messages in thread
From: Alexander Kanavin @ 2021-06-28  6:12 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE-core, persianpros

[-- Attachment #1: Type: text/plain, Size: 13978 bytes --]

Wait, what is this patchset all about?

Alex

On Mon, 28 Jun 2021 at 07:59, Khem Raj <raj.khem@gmail.com> wrote:

> From: persianpros <persianpros@yahoo.com>
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/lib/oe/package.py                                |  9 +++++++--
>  meta/lib/oe/qa.py                                     |  4 +++-
>  meta/lib/oe/utils.py                                  |  6 ++++--
>  meta/lib/oeqa/oetest.py                               |  4 +++-
>  meta/lib/oeqa/sdk/case.py                             |  3 ++-
>  meta/lib/oeqa/sdk/cases/buildlzip.py                  |  5 ++++-
>  meta/lib/oeqa/sdk/cases/python.py                     |  3 ++-
>  meta/lib/oeqa/sdk/testsdk.py                          |  3 ++-
>  meta/lib/oeqa/selftest/cases/oelib/path.py            |  3 ++-
>  meta/lib/oeqa/selftest/cases/package.py               |  7 +++++--
>  meta/lib/oeqa/selftest/cases/runtime_test.py          |  3 ++-
>  meta/lib/oeqa/utils/testexport.py                     |  6 +++++-
>  .../texinfo-dummy-native/texinfo-dummy/template.py    |  4 +++-
>  scripts/combo-layer                                   |  3 ++-
>  scripts/contrib/patchreview.py                        | 11 ++++++++---
>  scripts/lnr                                           |  3 ++-
>  scripts/oe-pkgdata-browser                            |  5 ++++-
>  .../pybootchartgui/tests/parser_test.py               |  7 ++++++-
>  scripts/send-error-report                             |  3 ++-
>  scripts/verify-bashisms                               |  9 +++++++--
>  20 files changed, 75 insertions(+), 26 deletions(-)
>
> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
> index dd700cbb0c..fc5408d5f8 100644
> --- a/meta/lib/oe/package.py
> +++ b/meta/lib/oe/package.py
> @@ -107,7 +107,10 @@ def strip_execs(pn, dstdir, strip_cmd, libdir,
> base_libdir, d, qa_already_stripp
>      :param qa_already_stripped: Set to True if already-stripped' in
> ${INSANE_SKIP}
>      This is for proper logging and messages only.
>      """
> -    import stat, errno, oe.path, oe.utils
> +    import stat
> +    import errno
> +    import oe.path
> +    import oe.utils
>
>      elffiles = {}
>      inodes = {}
> @@ -187,7 +190,9 @@ def file_translate(file):
>      return ft
>
>  def filedeprunner(arg):
> -    import re, subprocess, shlex
> +    import re
> +    import subprocess
> +    import shlex
>
>      (pkg, pkgfiles, rpmdeps, pkgdest) = arg
>      provides = {}
> diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
> index e8a854a302..38c2e0cc1c 100644
> --- a/meta/lib/oe/qa.py
> +++ b/meta/lib/oe/qa.py
> @@ -2,7 +2,9 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  #
>
> -import os, struct, mmap
> +import os
> +import struct
> +import mmap
>
>  class NotELFFileError(Exception):
>      pass
> diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
> index a84039f585..789bad33f6 100644
> --- a/meta/lib/oe/utils.py
> +++ b/meta/lib/oe/utils.py
> @@ -376,7 +376,8 @@ def format_pkg_list(pkg_dict, ret_format=None):
>  # Helper function to get the host compiler version
>  # Do not assume the compiler is gcc
>  def get_host_compiler_version(d, taskcontextonly=False):
> -    import re, subprocess
> +    import re
> +    import subprocess
>
>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
>          return
> @@ -404,7 +405,8 @@ def get_host_compiler_version(d,
> taskcontextonly=False):
>
>
>  def host_gcc_version(d, taskcontextonly=False):
> -    import re, subprocess
> +    import re
> +    import subprocess
>
>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
>          return
> diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
> index 9c84466dd0..3136ac2ce5 100644
> --- a/meta/lib/oeqa/oetest.py
> +++ b/meta/lib/oeqa/oetest.py
> @@ -9,7 +9,9 @@
>
>  # It also has some helper functions and it's responsible for actually
> starting the tests
>
> -import os, re, sys
> +import os
> +import re
> +import sys
>  import unittest
>  import inspect
>  import subprocess
> diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
> index c45882689c..86ac199197 100644
> --- a/meta/lib/oeqa/sdk/case.py
> +++ b/meta/lib/oeqa/sdk/case.py
> @@ -35,7 +35,8 @@ class OESDKTestCase(OETestCase):
>          OS/architecture, or if not specified the currently configured
> MACHINE's
>          OS/architecture.
>          """
> -        import oe.qa, oe.elf
> +        import oe.qa
> +        import oe.elf
>
>          if not target_os or not target_arch:
>              output = self._run("echo
> $OECORE_TARGET_OS:$OECORE_TARGET_ARCH")
> diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py
> b/meta/lib/oeqa/sdk/cases/buildlzip.py
> index 49ae756bf3..04c4a0ec16 100644
> --- a/meta/lib/oeqa/sdk/cases/buildlzip.py
> +++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
> @@ -2,7 +2,10 @@
>  # SPDX-License-Identifier: MIT
>  #
>
> -import os, tempfile, subprocess, unittest
> +import os
> +import tempfile
> +import subprocess
> +import unittest
>  from oeqa.sdk.case import OESDKTestCase
>  from oeqa.utils.subprocesstweak import errors_have_output
>  errors_have_output()
> diff --git a/meta/lib/oeqa/sdk/cases/python.py
> b/meta/lib/oeqa/sdk/cases/python.py
> index a334abce5f..2848481f33 100644
> --- a/meta/lib/oeqa/sdk/cases/python.py
> +++ b/meta/lib/oeqa/sdk/cases/python.py
> @@ -2,7 +2,8 @@
>  # SPDX-License-Identifier: MIT
>  #
>
> -import subprocess, unittest
> +import subprocess
> +import unittest
>  from oeqa.sdk.case import OESDKTestCase
>
>  from oeqa.utils.subprocesstweak import errors_have_output
> diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
> index 35e40187bc..18e03cb8ef 100644
> --- a/meta/lib/oeqa/sdk/testsdk.py
> +++ b/meta/lib/oeqa/sdk/testsdk.py
> @@ -95,7 +95,8 @@ class TestSDK(TestSDKBase):
>          processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or
> d.getVar("BB_NUMBER_THREADS")
>          if processes:
>              try:
> -                import testtools, subunit
> +                import testtools
> +                import subunit
>              except ImportError:
>                  bb.warn("Failed to import testtools or subunit, the
> testcases will run serially")
>                  processes = None
> diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py
> b/meta/lib/oeqa/selftest/cases/oelib/path.py
> index a1cfa08c09..098734fa5d 100644
> --- a/meta/lib/oeqa/selftest/cases/oelib/path.py
> +++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
> @@ -3,7 +3,8 @@
>  #
>
>  from unittest.case import TestCase
> -import oe, oe.path
> +import oe
> +import oe.path
>  import tempfile
>  import os
>  import errno
> diff --git a/meta/lib/oeqa/selftest/cases/package.py
> b/meta/lib/oeqa/selftest/cases/package.py
> index 7166c3991f..82aa1bde1c 100644
> --- a/meta/lib/oeqa/selftest/cases/package.py
> +++ b/meta/lib/oeqa/selftest/cases/package.py
> @@ -5,7 +5,8 @@
>  from oeqa.selftest.case import OESelftestTestCase
>  from oeqa.utils.commands import bitbake, get_bb_vars, get_bb_var, runqemu
>  import stat
> -import subprocess, os
> +import subprocess
> +import os
>  import oe.path
>  import re
>
> @@ -150,7 +151,9 @@ class PackageTests(OESelftestTestCase):
>                      self.fail('GDB %s failed' % binary)
>
>      def test_preserve_ownership(self):
> -        import os, stat, oe.cachedpath
> +        import os
> +        import stat
> +        import oe.cachedpath
>          features = 'IMAGE_INSTALL_append = " selftest-chown"\n'
>          self.write_config(features)
>          bitbake("core-image-minimal")
> diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py
> b/meta/lib/oeqa/selftest/cases/runtime_test.py
> index d0c2440722..54a80dfdc0 100644
> --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> @@ -211,7 +211,8 @@ class TestImage(OESelftestTestCase):
>          Product: oe-core
>          Author: Alexander Kanavin <alex.kanavin@gmail.com>
>          """
> -        import subprocess, os
> +        import subprocess
> +        import os
>          try:
>              content = os.listdir("/dev/dri")
>              if len([i for i in content if i.startswith('render')]) == 0:
> diff --git a/meta/lib/oeqa/utils/testexport.py
> b/meta/lib/oeqa/utils/testexport.py
> index e89d130a9c..383e57a6b2 100644
> --- a/meta/lib/oeqa/utils/testexport.py
> +++ b/meta/lib/oeqa/utils/testexport.py
> @@ -6,7 +6,11 @@
>
>  # Provides functions to help with exporting binaries obtained from built
> targets
>
> -import os, re, glob as g, shutil as sh,sys
> +import os
> +import re
> +import glob as g
> +import shutil as sh
> +import sys
>  from time import sleep
>  from .commands import runCmd
>  from difflib import SequenceMatcher as SM
> diff --git
> a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> index 86c7c1811a..75c01b83bf 100644
> --- a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> @@ -28,7 +28,9 @@
>  # of the executable from argv[0] and emulate the corresponding program, so
>  # multiple copies of this script will exist under different names.
>
> -import sys, os, argparse
> +import sys
> +import os
> +import argparse
>
>
>  this_binary = sys.argv[0].split("/")[-1]
> diff --git a/scripts/combo-layer b/scripts/combo-layer
> index 045de65642..835a6bcd09 100755
> --- a/scripts/combo-layer
> +++ b/scripts/combo-layer
> @@ -11,7 +11,8 @@
>  #
>
>  import fnmatch
> -import os, sys
> +import os
> +import sys
>  import optparse
>  import logging
>  import subprocess
> diff --git a/scripts/contrib/patchreview.py
> b/scripts/contrib/patchreview.py
> index 62c509f51c..744dcfb49e 100755
> --- a/scripts/contrib/patchreview.py
> +++ b/scripts/contrib/patchreview.py
> @@ -40,7 +40,8 @@ def blame_patch(patch):
>                                      "--",
> patch)).decode("utf-8").splitlines()
>
>  def patchreview(path, patches):
> -    import re, os.path
> +    import re
> +    import os.path
>
>      # General pattern: start of line, optional whitespace, tag with
> optional
>      # hyphen or spaces, maybe a colon, some whitespace, then the value,
> all case
> @@ -198,7 +199,9 @@ def histogram(results):
>
>
>  if __name__ == "__main__":
> -    import argparse, subprocess, os
> +    import argparse
> +    import subprocess
> +    import os
>
>      args = argparse.ArgumentParser(description="Patch Review Tool")
>      args.add_argument("-b", "--blame", action="store_true", help="show
> blame for malformed patches")
> @@ -213,7 +216,9 @@ if __name__ == "__main__":
>      analyse(results, want_blame=args.blame, verbose=args.verbose)
>
>      if args.json:
> -        import json, os.path, collections
> +        import json
> +        import os.path
> +        import collections
>          if os.path.isfile(args.json):
>              data = json.load(open(args.json))
>          else:
> diff --git a/scripts/lnr b/scripts/lnr
> index a2ac4fec0f..e223b1e0e6 100755
> --- a/scripts/lnr
> +++ b/scripts/lnr
> @@ -6,7 +6,8 @@
>  # Create a *relative* symlink, just like ln --relative does but without
> needing
>  # coreutils 8.16.
>
> -import sys, os
> +import sys
> +import os
>
>  if len(sys.argv) != 3:
>     print("$ lnr TARGET LINK_NAME")
> diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
> index 8d223185a4..5834f59845 100755
> --- a/scripts/oe-pkgdata-browser
> +++ b/scripts/oe-pkgdata-browser
> @@ -1,6 +1,9 @@
>  #! /usr/bin/env python3
>
> -import os, sys, enum, ast
> +import os
> +import sys
> +import enum
> +import ast
>
>  scripts_path = os.path.dirname(os.path.realpath(__file__))
>  lib_path = scripts_path + '/lib'
> diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> index 00fb3bf797..c005cf341f 100644
> --- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> +++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> @@ -1,4 +1,9 @@
> -import sys, os, re, struct, operator, math
> +import sys
> +import os
> +import re
> +import struct
> +import operator
> +import math
>  from collections import defaultdict
>  import unittest
>
> diff --git a/scripts/send-error-report b/scripts/send-error-report
> index cfbcaa52cb..ffa0a199b1 100755
> --- a/scripts/send-error-report
> +++ b/scripts/send-error-report
> @@ -10,7 +10,8 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  #
>
> -import urllib.request, urllib.error
> +import urllib.request
> +import urllib.error
>  import sys
>  import json
>  import os
> diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
> index 14d8c298e9..a63f6c8115 100755
> --- a/scripts/verify-bashisms
> +++ b/scripts/verify-bashisms
> @@ -3,7 +3,11 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  #
>
> -import sys, os, subprocess, re, shutil
> +import sys
> +import os
> +import subprocess
> +import re
> +import shutil
>
>  whitelist = (
>      # type is supported by dash
> @@ -92,7 +96,8 @@ def get_tinfoil():
>      return tinfoil
>
>  if __name__=='__main__':
> -    import argparse, shutil
> +    import argparse
> +    import shutil
>
>      parser = argparse.ArgumentParser(description='Bashim detector for
> shell fragments in recipes.')
>      parser.add_argument("recipes", metavar="RECIPE", nargs="*",
> help="recipes to check (if not specified, all will be checked)")
> --
> 2.32.0
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 16434 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core] [PATCH 1/8] PEP8 double aggressive E401
  2021-06-28  6:12 ` [OE-core] [PATCH 1/8] PEP8 double aggressive E401 Alexander Kanavin
@ 2021-06-28  6:16   ` Khem Raj
  2021-06-28  6:20     ` Alexander Kanavin
  0 siblings, 1 reply; 16+ messages in thread
From: Khem Raj @ 2021-06-28  6:16 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core, persianpros

On Sun, Jun 27, 2021 at 11:13 PM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> Wait, what is this patchset all about?
>

its fixes for python linter (pylint) found issues.

> Alex
>
> On Mon, 28 Jun 2021 at 07:59, Khem Raj <raj.khem@gmail.com> wrote:
>>
>> From: persianpros <persianpros@yahoo.com>
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  meta/lib/oe/package.py                                |  9 +++++++--
>>  meta/lib/oe/qa.py                                     |  4 +++-
>>  meta/lib/oe/utils.py                                  |  6 ++++--
>>  meta/lib/oeqa/oetest.py                               |  4 +++-
>>  meta/lib/oeqa/sdk/case.py                             |  3 ++-
>>  meta/lib/oeqa/sdk/cases/buildlzip.py                  |  5 ++++-
>>  meta/lib/oeqa/sdk/cases/python.py                     |  3 ++-
>>  meta/lib/oeqa/sdk/testsdk.py                          |  3 ++-
>>  meta/lib/oeqa/selftest/cases/oelib/path.py            |  3 ++-
>>  meta/lib/oeqa/selftest/cases/package.py               |  7 +++++--
>>  meta/lib/oeqa/selftest/cases/runtime_test.py          |  3 ++-
>>  meta/lib/oeqa/utils/testexport.py                     |  6 +++++-
>>  .../texinfo-dummy-native/texinfo-dummy/template.py    |  4 +++-
>>  scripts/combo-layer                                   |  3 ++-
>>  scripts/contrib/patchreview.py                        | 11 ++++++++---
>>  scripts/lnr                                           |  3 ++-
>>  scripts/oe-pkgdata-browser                            |  5 ++++-
>>  .../pybootchartgui/tests/parser_test.py               |  7 ++++++-
>>  scripts/send-error-report                             |  3 ++-
>>  scripts/verify-bashisms                               |  9 +++++++--
>>  20 files changed, 75 insertions(+), 26 deletions(-)
>>
>> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
>> index dd700cbb0c..fc5408d5f8 100644
>> --- a/meta/lib/oe/package.py
>> +++ b/meta/lib/oe/package.py
>> @@ -107,7 +107,10 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d, qa_already_stripp
>>      :param qa_already_stripped: Set to True if already-stripped' in ${INSANE_SKIP}
>>      This is for proper logging and messages only.
>>      """
>> -    import stat, errno, oe.path, oe.utils
>> +    import stat
>> +    import errno
>> +    import oe.path
>> +    import oe.utils
>>
>>      elffiles = {}
>>      inodes = {}
>> @@ -187,7 +190,9 @@ def file_translate(file):
>>      return ft
>>
>>  def filedeprunner(arg):
>> -    import re, subprocess, shlex
>> +    import re
>> +    import subprocess
>> +    import shlex
>>
>>      (pkg, pkgfiles, rpmdeps, pkgdest) = arg
>>      provides = {}
>> diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
>> index e8a854a302..38c2e0cc1c 100644
>> --- a/meta/lib/oe/qa.py
>> +++ b/meta/lib/oe/qa.py
>> @@ -2,7 +2,9 @@
>>  # SPDX-License-Identifier: GPL-2.0-only
>>  #
>>
>> -import os, struct, mmap
>> +import os
>> +import struct
>> +import mmap
>>
>>  class NotELFFileError(Exception):
>>      pass
>> diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
>> index a84039f585..789bad33f6 100644
>> --- a/meta/lib/oe/utils.py
>> +++ b/meta/lib/oe/utils.py
>> @@ -376,7 +376,8 @@ def format_pkg_list(pkg_dict, ret_format=None):
>>  # Helper function to get the host compiler version
>>  # Do not assume the compiler is gcc
>>  def get_host_compiler_version(d, taskcontextonly=False):
>> -    import re, subprocess
>> +    import re
>> +    import subprocess
>>
>>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
>>          return
>> @@ -404,7 +405,8 @@ def get_host_compiler_version(d, taskcontextonly=False):
>>
>>
>>  def host_gcc_version(d, taskcontextonly=False):
>> -    import re, subprocess
>> +    import re
>> +    import subprocess
>>
>>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
>>          return
>> diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
>> index 9c84466dd0..3136ac2ce5 100644
>> --- a/meta/lib/oeqa/oetest.py
>> +++ b/meta/lib/oeqa/oetest.py
>> @@ -9,7 +9,9 @@
>>
>>  # It also has some helper functions and it's responsible for actually starting the tests
>>
>> -import os, re, sys
>> +import os
>> +import re
>> +import sys
>>  import unittest
>>  import inspect
>>  import subprocess
>> diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
>> index c45882689c..86ac199197 100644
>> --- a/meta/lib/oeqa/sdk/case.py
>> +++ b/meta/lib/oeqa/sdk/case.py
>> @@ -35,7 +35,8 @@ class OESDKTestCase(OETestCase):
>>          OS/architecture, or if not specified the currently configured MACHINE's
>>          OS/architecture.
>>          """
>> -        import oe.qa, oe.elf
>> +        import oe.qa
>> +        import oe.elf
>>
>>          if not target_os or not target_arch:
>>              output = self._run("echo $OECORE_TARGET_OS:$OECORE_TARGET_ARCH")
>> diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py b/meta/lib/oeqa/sdk/cases/buildlzip.py
>> index 49ae756bf3..04c4a0ec16 100644
>> --- a/meta/lib/oeqa/sdk/cases/buildlzip.py
>> +++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
>> @@ -2,7 +2,10 @@
>>  # SPDX-License-Identifier: MIT
>>  #
>>
>> -import os, tempfile, subprocess, unittest
>> +import os
>> +import tempfile
>> +import subprocess
>> +import unittest
>>  from oeqa.sdk.case import OESDKTestCase
>>  from oeqa.utils.subprocesstweak import errors_have_output
>>  errors_have_output()
>> diff --git a/meta/lib/oeqa/sdk/cases/python.py b/meta/lib/oeqa/sdk/cases/python.py
>> index a334abce5f..2848481f33 100644
>> --- a/meta/lib/oeqa/sdk/cases/python.py
>> +++ b/meta/lib/oeqa/sdk/cases/python.py
>> @@ -2,7 +2,8 @@
>>  # SPDX-License-Identifier: MIT
>>  #
>>
>> -import subprocess, unittest
>> +import subprocess
>> +import unittest
>>  from oeqa.sdk.case import OESDKTestCase
>>
>>  from oeqa.utils.subprocesstweak import errors_have_output
>> diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
>> index 35e40187bc..18e03cb8ef 100644
>> --- a/meta/lib/oeqa/sdk/testsdk.py
>> +++ b/meta/lib/oeqa/sdk/testsdk.py
>> @@ -95,7 +95,8 @@ class TestSDK(TestSDKBase):
>>          processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or d.getVar("BB_NUMBER_THREADS")
>>          if processes:
>>              try:
>> -                import testtools, subunit
>> +                import testtools
>> +                import subunit
>>              except ImportError:
>>                  bb.warn("Failed to import testtools or subunit, the testcases will run serially")
>>                  processes = None
>> diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py b/meta/lib/oeqa/selftest/cases/oelib/path.py
>> index a1cfa08c09..098734fa5d 100644
>> --- a/meta/lib/oeqa/selftest/cases/oelib/path.py
>> +++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
>> @@ -3,7 +3,8 @@
>>  #
>>
>>  from unittest.case import TestCase
>> -import oe, oe.path
>> +import oe
>> +import oe.path
>>  import tempfile
>>  import os
>>  import errno
>> diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py
>> index 7166c3991f..82aa1bde1c 100644
>> --- a/meta/lib/oeqa/selftest/cases/package.py
>> +++ b/meta/lib/oeqa/selftest/cases/package.py
>> @@ -5,7 +5,8 @@
>>  from oeqa.selftest.case import OESelftestTestCase
>>  from oeqa.utils.commands import bitbake, get_bb_vars, get_bb_var, runqemu
>>  import stat
>> -import subprocess, os
>> +import subprocess
>> +import os
>>  import oe.path
>>  import re
>>
>> @@ -150,7 +151,9 @@ class PackageTests(OESelftestTestCase):
>>                      self.fail('GDB %s failed' % binary)
>>
>>      def test_preserve_ownership(self):
>> -        import os, stat, oe.cachedpath
>> +        import os
>> +        import stat
>> +        import oe.cachedpath
>>          features = 'IMAGE_INSTALL_append = " selftest-chown"\n'
>>          self.write_config(features)
>>          bitbake("core-image-minimal")
>> diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
>> index d0c2440722..54a80dfdc0 100644
>> --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
>> +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
>> @@ -211,7 +211,8 @@ class TestImage(OESelftestTestCase):
>>          Product: oe-core
>>          Author: Alexander Kanavin <alex.kanavin@gmail.com>
>>          """
>> -        import subprocess, os
>> +        import subprocess
>> +        import os
>>          try:
>>              content = os.listdir("/dev/dri")
>>              if len([i for i in content if i.startswith('render')]) == 0:
>> diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py
>> index e89d130a9c..383e57a6b2 100644
>> --- a/meta/lib/oeqa/utils/testexport.py
>> +++ b/meta/lib/oeqa/utils/testexport.py
>> @@ -6,7 +6,11 @@
>>
>>  # Provides functions to help with exporting binaries obtained from built targets
>>
>> -import os, re, glob as g, shutil as sh,sys
>> +import os
>> +import re
>> +import glob as g
>> +import shutil as sh
>> +import sys
>>  from time import sleep
>>  from .commands import runCmd
>>  from difflib import SequenceMatcher as SM
>> diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>> index 86c7c1811a..75c01b83bf 100644
>> --- a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>> +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>> @@ -28,7 +28,9 @@
>>  # of the executable from argv[0] and emulate the corresponding program, so
>>  # multiple copies of this script will exist under different names.
>>
>> -import sys, os, argparse
>> +import sys
>> +import os
>> +import argparse
>>
>>
>>  this_binary = sys.argv[0].split("/")[-1]
>> diff --git a/scripts/combo-layer b/scripts/combo-layer
>> index 045de65642..835a6bcd09 100755
>> --- a/scripts/combo-layer
>> +++ b/scripts/combo-layer
>> @@ -11,7 +11,8 @@
>>  #
>>
>>  import fnmatch
>> -import os, sys
>> +import os
>> +import sys
>>  import optparse
>>  import logging
>>  import subprocess
>> diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
>> index 62c509f51c..744dcfb49e 100755
>> --- a/scripts/contrib/patchreview.py
>> +++ b/scripts/contrib/patchreview.py
>> @@ -40,7 +40,8 @@ def blame_patch(patch):
>>                                      "--", patch)).decode("utf-8").splitlines()
>>
>>  def patchreview(path, patches):
>> -    import re, os.path
>> +    import re
>> +    import os.path
>>
>>      # General pattern: start of line, optional whitespace, tag with optional
>>      # hyphen or spaces, maybe a colon, some whitespace, then the value, all case
>> @@ -198,7 +199,9 @@ def histogram(results):
>>
>>
>>  if __name__ == "__main__":
>> -    import argparse, subprocess, os
>> +    import argparse
>> +    import subprocess
>> +    import os
>>
>>      args = argparse.ArgumentParser(description="Patch Review Tool")
>>      args.add_argument("-b", "--blame", action="store_true", help="show blame for malformed patches")
>> @@ -213,7 +216,9 @@ if __name__ == "__main__":
>>      analyse(results, want_blame=args.blame, verbose=args.verbose)
>>
>>      if args.json:
>> -        import json, os.path, collections
>> +        import json
>> +        import os.path
>> +        import collections
>>          if os.path.isfile(args.json):
>>              data = json.load(open(args.json))
>>          else:
>> diff --git a/scripts/lnr b/scripts/lnr
>> index a2ac4fec0f..e223b1e0e6 100755
>> --- a/scripts/lnr
>> +++ b/scripts/lnr
>> @@ -6,7 +6,8 @@
>>  # Create a *relative* symlink, just like ln --relative does but without needing
>>  # coreutils 8.16.
>>
>> -import sys, os
>> +import sys
>> +import os
>>
>>  if len(sys.argv) != 3:
>>     print("$ lnr TARGET LINK_NAME")
>> diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
>> index 8d223185a4..5834f59845 100755
>> --- a/scripts/oe-pkgdata-browser
>> +++ b/scripts/oe-pkgdata-browser
>> @@ -1,6 +1,9 @@
>>  #! /usr/bin/env python3
>>
>> -import os, sys, enum, ast
>> +import os
>> +import sys
>> +import enum
>> +import ast
>>
>>  scripts_path = os.path.dirname(os.path.realpath(__file__))
>>  lib_path = scripts_path + '/lib'
>> diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>> index 00fb3bf797..c005cf341f 100644
>> --- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>> +++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>> @@ -1,4 +1,9 @@
>> -import sys, os, re, struct, operator, math
>> +import sys
>> +import os
>> +import re
>> +import struct
>> +import operator
>> +import math
>>  from collections import defaultdict
>>  import unittest
>>
>> diff --git a/scripts/send-error-report b/scripts/send-error-report
>> index cfbcaa52cb..ffa0a199b1 100755
>> --- a/scripts/send-error-report
>> +++ b/scripts/send-error-report
>> @@ -10,7 +10,8 @@
>>  # SPDX-License-Identifier: GPL-2.0-only
>>  #
>>
>> -import urllib.request, urllib.error
>> +import urllib.request
>> +import urllib.error
>>  import sys
>>  import json
>>  import os
>> diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
>> index 14d8c298e9..a63f6c8115 100755
>> --- a/scripts/verify-bashisms
>> +++ b/scripts/verify-bashisms
>> @@ -3,7 +3,11 @@
>>  # SPDX-License-Identifier: GPL-2.0-only
>>  #
>>
>> -import sys, os, subprocess, re, shutil
>> +import sys
>> +import os
>> +import subprocess
>> +import re
>> +import shutil
>>
>>  whitelist = (
>>      # type is supported by dash
>> @@ -92,7 +96,8 @@ def get_tinfoil():
>>      return tinfoil
>>
>>  if __name__=='__main__':
>> -    import argparse, shutil
>> +    import argparse
>> +    import shutil
>>
>>      parser = argparse.ArgumentParser(description='Bashim detector for shell fragments in recipes.')
>>      parser.add_argument("recipes", metavar="RECIPE", nargs="*", help="recipes to check (if not specified, all will be checked)")
>> --
>> 2.32.0
>>
>>
>> 
>>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core] [PATCH 1/8] PEP8 double aggressive E401
  2021-06-28  6:16   ` Khem Raj
@ 2021-06-28  6:20     ` Alexander Kanavin
       [not found]       ` <1709447933.2675529.1624908347132@mail.yahoo.com>
  0 siblings, 1 reply; 16+ messages in thread
From: Alexander Kanavin @ 2021-06-28  6:20 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE-core, persianpros

[-- Attachment #1: Type: text/plain, Size: 15646 bytes --]

Right, but can you please write something more descriptive than "PEP8
double aggressive W291 ~ W293 and W391" ?

Also I'm not sure fiddling about with whitespace or whether imports all
need their own line really helps.

Alex

On Mon, 28 Jun 2021 at 08:16, Khem Raj <raj.khem@gmail.com> wrote:

> On Sun, Jun 27, 2021 at 11:13 PM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > Wait, what is this patchset all about?
> >
>
> its fixes for python linter (pylint) found issues.
>
> > Alex
> >
> > On Mon, 28 Jun 2021 at 07:59, Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >> From: persianpros <persianpros@yahoo.com>
> >>
> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> ---
> >>  meta/lib/oe/package.py                                |  9 +++++++--
> >>  meta/lib/oe/qa.py                                     |  4 +++-
> >>  meta/lib/oe/utils.py                                  |  6 ++++--
> >>  meta/lib/oeqa/oetest.py                               |  4 +++-
> >>  meta/lib/oeqa/sdk/case.py                             |  3 ++-
> >>  meta/lib/oeqa/sdk/cases/buildlzip.py                  |  5 ++++-
> >>  meta/lib/oeqa/sdk/cases/python.py                     |  3 ++-
> >>  meta/lib/oeqa/sdk/testsdk.py                          |  3 ++-
> >>  meta/lib/oeqa/selftest/cases/oelib/path.py            |  3 ++-
> >>  meta/lib/oeqa/selftest/cases/package.py               |  7 +++++--
> >>  meta/lib/oeqa/selftest/cases/runtime_test.py          |  3 ++-
> >>  meta/lib/oeqa/utils/testexport.py                     |  6 +++++-
> >>  .../texinfo-dummy-native/texinfo-dummy/template.py    |  4 +++-
> >>  scripts/combo-layer                                   |  3 ++-
> >>  scripts/contrib/patchreview.py                        | 11 ++++++++---
> >>  scripts/lnr                                           |  3 ++-
> >>  scripts/oe-pkgdata-browser                            |  5 ++++-
> >>  .../pybootchartgui/tests/parser_test.py               |  7 ++++++-
> >>  scripts/send-error-report                             |  3 ++-
> >>  scripts/verify-bashisms                               |  9 +++++++--
> >>  20 files changed, 75 insertions(+), 26 deletions(-)
> >>
> >> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
> >> index dd700cbb0c..fc5408d5f8 100644
> >> --- a/meta/lib/oe/package.py
> >> +++ b/meta/lib/oe/package.py
> >> @@ -107,7 +107,10 @@ def strip_execs(pn, dstdir, strip_cmd, libdir,
> base_libdir, d, qa_already_stripp
> >>      :param qa_already_stripped: Set to True if already-stripped' in
> ${INSANE_SKIP}
> >>      This is for proper logging and messages only.
> >>      """
> >> -    import stat, errno, oe.path, oe.utils
> >> +    import stat
> >> +    import errno
> >> +    import oe.path
> >> +    import oe.utils
> >>
> >>      elffiles = {}
> >>      inodes = {}
> >> @@ -187,7 +190,9 @@ def file_translate(file):
> >>      return ft
> >>
> >>  def filedeprunner(arg):
> >> -    import re, subprocess, shlex
> >> +    import re
> >> +    import subprocess
> >> +    import shlex
> >>
> >>      (pkg, pkgfiles, rpmdeps, pkgdest) = arg
> >>      provides = {}
> >> diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
> >> index e8a854a302..38c2e0cc1c 100644
> >> --- a/meta/lib/oe/qa.py
> >> +++ b/meta/lib/oe/qa.py
> >> @@ -2,7 +2,9 @@
> >>  # SPDX-License-Identifier: GPL-2.0-only
> >>  #
> >>
> >> -import os, struct, mmap
> >> +import os
> >> +import struct
> >> +import mmap
> >>
> >>  class NotELFFileError(Exception):
> >>      pass
> >> diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
> >> index a84039f585..789bad33f6 100644
> >> --- a/meta/lib/oe/utils.py
> >> +++ b/meta/lib/oe/utils.py
> >> @@ -376,7 +376,8 @@ def format_pkg_list(pkg_dict, ret_format=None):
> >>  # Helper function to get the host compiler version
> >>  # Do not assume the compiler is gcc
> >>  def get_host_compiler_version(d, taskcontextonly=False):
> >> -    import re, subprocess
> >> +    import re
> >> +    import subprocess
> >>
> >>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
> >>          return
> >> @@ -404,7 +405,8 @@ def get_host_compiler_version(d,
> taskcontextonly=False):
> >>
> >>
> >>  def host_gcc_version(d, taskcontextonly=False):
> >> -    import re, subprocess
> >> +    import re
> >> +    import subprocess
> >>
> >>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
> >>          return
> >> diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
> >> index 9c84466dd0..3136ac2ce5 100644
> >> --- a/meta/lib/oeqa/oetest.py
> >> +++ b/meta/lib/oeqa/oetest.py
> >> @@ -9,7 +9,9 @@
> >>
> >>  # It also has some helper functions and it's responsible for actually
> starting the tests
> >>
> >> -import os, re, sys
> >> +import os
> >> +import re
> >> +import sys
> >>  import unittest
> >>  import inspect
> >>  import subprocess
> >> diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
> >> index c45882689c..86ac199197 100644
> >> --- a/meta/lib/oeqa/sdk/case.py
> >> +++ b/meta/lib/oeqa/sdk/case.py
> >> @@ -35,7 +35,8 @@ class OESDKTestCase(OETestCase):
> >>          OS/architecture, or if not specified the currently configured
> MACHINE's
> >>          OS/architecture.
> >>          """
> >> -        import oe.qa, oe.elf
> >> +        import oe.qa
> >> +        import oe.elf
> >>
> >>          if not target_os or not target_arch:
> >>              output = self._run("echo
> $OECORE_TARGET_OS:$OECORE_TARGET_ARCH")
> >> diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py
> b/meta/lib/oeqa/sdk/cases/buildlzip.py
> >> index 49ae756bf3..04c4a0ec16 100644
> >> --- a/meta/lib/oeqa/sdk/cases/buildlzip.py
> >> +++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
> >> @@ -2,7 +2,10 @@
> >>  # SPDX-License-Identifier: MIT
> >>  #
> >>
> >> -import os, tempfile, subprocess, unittest
> >> +import os
> >> +import tempfile
> >> +import subprocess
> >> +import unittest
> >>  from oeqa.sdk.case import OESDKTestCase
> >>  from oeqa.utils.subprocesstweak import errors_have_output
> >>  errors_have_output()
> >> diff --git a/meta/lib/oeqa/sdk/cases/python.py
> b/meta/lib/oeqa/sdk/cases/python.py
> >> index a334abce5f..2848481f33 100644
> >> --- a/meta/lib/oeqa/sdk/cases/python.py
> >> +++ b/meta/lib/oeqa/sdk/cases/python.py
> >> @@ -2,7 +2,8 @@
> >>  # SPDX-License-Identifier: MIT
> >>  #
> >>
> >> -import subprocess, unittest
> >> +import subprocess
> >> +import unittest
> >>  from oeqa.sdk.case import OESDKTestCase
> >>
> >>  from oeqa.utils.subprocesstweak import errors_have_output
> >> diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
> >> index 35e40187bc..18e03cb8ef 100644
> >> --- a/meta/lib/oeqa/sdk/testsdk.py
> >> +++ b/meta/lib/oeqa/sdk/testsdk.py
> >> @@ -95,7 +95,8 @@ class TestSDK(TestSDKBase):
> >>          processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or
> d.getVar("BB_NUMBER_THREADS")
> >>          if processes:
> >>              try:
> >> -                import testtools, subunit
> >> +                import testtools
> >> +                import subunit
> >>              except ImportError:
> >>                  bb.warn("Failed to import testtools or subunit, the
> testcases will run serially")
> >>                  processes = None
> >> diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py
> b/meta/lib/oeqa/selftest/cases/oelib/path.py
> >> index a1cfa08c09..098734fa5d 100644
> >> --- a/meta/lib/oeqa/selftest/cases/oelib/path.py
> >> +++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
> >> @@ -3,7 +3,8 @@
> >>  #
> >>
> >>  from unittest.case import TestCase
> >> -import oe, oe.path
> >> +import oe
> >> +import oe.path
> >>  import tempfile
> >>  import os
> >>  import errno
> >> diff --git a/meta/lib/oeqa/selftest/cases/package.py
> b/meta/lib/oeqa/selftest/cases/package.py
> >> index 7166c3991f..82aa1bde1c 100644
> >> --- a/meta/lib/oeqa/selftest/cases/package.py
> >> +++ b/meta/lib/oeqa/selftest/cases/package.py
> >> @@ -5,7 +5,8 @@
> >>  from oeqa.selftest.case import OESelftestTestCase
> >>  from oeqa.utils.commands import bitbake, get_bb_vars, get_bb_var,
> runqemu
> >>  import stat
> >> -import subprocess, os
> >> +import subprocess
> >> +import os
> >>  import oe.path
> >>  import re
> >>
> >> @@ -150,7 +151,9 @@ class PackageTests(OESelftestTestCase):
> >>                      self.fail('GDB %s failed' % binary)
> >>
> >>      def test_preserve_ownership(self):
> >> -        import os, stat, oe.cachedpath
> >> +        import os
> >> +        import stat
> >> +        import oe.cachedpath
> >>          features = 'IMAGE_INSTALL_append = " selftest-chown"\n'
> >>          self.write_config(features)
> >>          bitbake("core-image-minimal")
> >> diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py
> b/meta/lib/oeqa/selftest/cases/runtime_test.py
> >> index d0c2440722..54a80dfdc0 100644
> >> --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> >> +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> >> @@ -211,7 +211,8 @@ class TestImage(OESelftestTestCase):
> >>          Product: oe-core
> >>          Author: Alexander Kanavin <alex.kanavin@gmail.com>
> >>          """
> >> -        import subprocess, os
> >> +        import subprocess
> >> +        import os
> >>          try:
> >>              content = os.listdir("/dev/dri")
> >>              if len([i for i in content if i.startswith('render')]) ==
> 0:
> >> diff --git a/meta/lib/oeqa/utils/testexport.py
> b/meta/lib/oeqa/utils/testexport.py
> >> index e89d130a9c..383e57a6b2 100644
> >> --- a/meta/lib/oeqa/utils/testexport.py
> >> +++ b/meta/lib/oeqa/utils/testexport.py
> >> @@ -6,7 +6,11 @@
> >>
> >>  # Provides functions to help with exporting binaries obtained from
> built targets
> >>
> >> -import os, re, glob as g, shutil as sh,sys
> >> +import os
> >> +import re
> >> +import glob as g
> >> +import shutil as sh
> >> +import sys
> >>  from time import sleep
> >>  from .commands import runCmd
> >>  from difflib import SequenceMatcher as SM
> >> diff --git
> a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> >> index 86c7c1811a..75c01b83bf 100644
> >> ---
> a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> >> +++
> b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> >> @@ -28,7 +28,9 @@
> >>  # of the executable from argv[0] and emulate the corresponding
> program, so
> >>  # multiple copies of this script will exist under different names.
> >>
> >> -import sys, os, argparse
> >> +import sys
> >> +import os
> >> +import argparse
> >>
> >>
> >>  this_binary = sys.argv[0].split("/")[-1]
> >> diff --git a/scripts/combo-layer b/scripts/combo-layer
> >> index 045de65642..835a6bcd09 100755
> >> --- a/scripts/combo-layer
> >> +++ b/scripts/combo-layer
> >> @@ -11,7 +11,8 @@
> >>  #
> >>
> >>  import fnmatch
> >> -import os, sys
> >> +import os
> >> +import sys
> >>  import optparse
> >>  import logging
> >>  import subprocess
> >> diff --git a/scripts/contrib/patchreview.py
> b/scripts/contrib/patchreview.py
> >> index 62c509f51c..744dcfb49e 100755
> >> --- a/scripts/contrib/patchreview.py
> >> +++ b/scripts/contrib/patchreview.py
> >> @@ -40,7 +40,8 @@ def blame_patch(patch):
> >>                                      "--",
> patch)).decode("utf-8").splitlines()
> >>
> >>  def patchreview(path, patches):
> >> -    import re, os.path
> >> +    import re
> >> +    import os.path
> >>
> >>      # General pattern: start of line, optional whitespace, tag with
> optional
> >>      # hyphen or spaces, maybe a colon, some whitespace, then the
> value, all case
> >> @@ -198,7 +199,9 @@ def histogram(results):
> >>
> >>
> >>  if __name__ == "__main__":
> >> -    import argparse, subprocess, os
> >> +    import argparse
> >> +    import subprocess
> >> +    import os
> >>
> >>      args = argparse.ArgumentParser(description="Patch Review Tool")
> >>      args.add_argument("-b", "--blame", action="store_true", help="show
> blame for malformed patches")
> >> @@ -213,7 +216,9 @@ if __name__ == "__main__":
> >>      analyse(results, want_blame=args.blame, verbose=args.verbose)
> >>
> >>      if args.json:
> >> -        import json, os.path, collections
> >> +        import json
> >> +        import os.path
> >> +        import collections
> >>          if os.path.isfile(args.json):
> >>              data = json.load(open(args.json))
> >>          else:
> >> diff --git a/scripts/lnr b/scripts/lnr
> >> index a2ac4fec0f..e223b1e0e6 100755
> >> --- a/scripts/lnr
> >> +++ b/scripts/lnr
> >> @@ -6,7 +6,8 @@
> >>  # Create a *relative* symlink, just like ln --relative does but
> without needing
> >>  # coreutils 8.16.
> >>
> >> -import sys, os
> >> +import sys
> >> +import os
> >>
> >>  if len(sys.argv) != 3:
> >>     print("$ lnr TARGET LINK_NAME")
> >> diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
> >> index 8d223185a4..5834f59845 100755
> >> --- a/scripts/oe-pkgdata-browser
> >> +++ b/scripts/oe-pkgdata-browser
> >> @@ -1,6 +1,9 @@
> >>  #! /usr/bin/env python3
> >>
> >> -import os, sys, enum, ast
> >> +import os
> >> +import sys
> >> +import enum
> >> +import ast
> >>
> >>  scripts_path = os.path.dirname(os.path.realpath(__file__))
> >>  lib_path = scripts_path + '/lib'
> >> diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> >> index 00fb3bf797..c005cf341f 100644
> >> --- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> >> +++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> >> @@ -1,4 +1,9 @@
> >> -import sys, os, re, struct, operator, math
> >> +import sys
> >> +import os
> >> +import re
> >> +import struct
> >> +import operator
> >> +import math
> >>  from collections import defaultdict
> >>  import unittest
> >>
> >> diff --git a/scripts/send-error-report b/scripts/send-error-report
> >> index cfbcaa52cb..ffa0a199b1 100755
> >> --- a/scripts/send-error-report
> >> +++ b/scripts/send-error-report
> >> @@ -10,7 +10,8 @@
> >>  # SPDX-License-Identifier: GPL-2.0-only
> >>  #
> >>
> >> -import urllib.request, urllib.error
> >> +import urllib.request
> >> +import urllib.error
> >>  import sys
> >>  import json
> >>  import os
> >> diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
> >> index 14d8c298e9..a63f6c8115 100755
> >> --- a/scripts/verify-bashisms
> >> +++ b/scripts/verify-bashisms
> >> @@ -3,7 +3,11 @@
> >>  # SPDX-License-Identifier: GPL-2.0-only
> >>  #
> >>
> >> -import sys, os, subprocess, re, shutil
> >> +import sys
> >> +import os
> >> +import subprocess
> >> +import re
> >> +import shutil
> >>
> >>  whitelist = (
> >>      # type is supported by dash
> >> @@ -92,7 +96,8 @@ def get_tinfoil():
> >>      return tinfoil
> >>
> >>  if __name__=='__main__':
> >> -    import argparse, shutil
> >> +    import argparse
> >> +    import shutil
> >>
> >>      parser = argparse.ArgumentParser(description='Bashim detector for
> shell fragments in recipes.')
> >>      parser.add_argument("recipes", metavar="RECIPE", nargs="*",
> help="recipes to check (if not specified, all will be checked)")
> >> --
> >> 2.32.0
> >>
> >>
> >> 
> >>
>

[-- Attachment #2: Type: text/html, Size: 20620 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core] [PATCH 1/8] PEP8 double aggressive E401
       [not found]       ` <1709447933.2675529.1624908347132@mail.yahoo.com>
@ 2021-06-28 19:41         ` Khem Raj
  2021-06-28 19:47           ` Alexander Kanavin
  0 siblings, 1 reply; 16+ messages in thread
From: Khem Raj @ 2021-06-28 19:41 UTC (permalink / raw)
  To: Persian Prince; +Cc: Alexander Kanavin, OE-core

On Mon, Jun 28, 2021 at 12:25 PM Persian Prince <persianpros@yahoo.com> wrote:
>
> When we can follow PEP8 we should as it's how developers could follow a common coding style and avoid creating different files.
>
> In "Safe PEP8" PRs some PEP8 codes carefully added so it won't change tabs to spaces but makes the code cleaner in a safe way. PEP8 also fixes some small problems (won't do huge changes like futurize) which is good and sometime we miss them by mistake.
>
> We at https://github.com/OpenVisionE2 , https://github.com/oe-alliance and https://github.com/OpenPLi applied safe PEP8 changes to so many repositories and we're using it via PEP8.sh on GitHub Actions as an online cleaner tool. (PEP8.sh: https://github.com/OpenVisionE2/enigma2-openvision/blob/develop/CI/PEP8.sh)
>
> Also applied before on https://github.com/openembedded/meta-openembedded which is why that repo is clean and won't need a PR (for now), keep in mind that these are common standards so even if we don't like them that much still they help for having a good common style and less mistakes.
>
> If you needed more assistance from me please don't hesitate to ask, I'm all in.


can you improve the commit msgs in pull request as asked.

>
> Regards,
> Persian Prince
>
> On Monday, June 28, 2021, 10:56:40 AM GMT+4:30, Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
>
> Right, but can you please write something more descriptive than "PEP8 double aggressive W291 ~ W293 and W391" ?
>
> Also I'm not sure fiddling about with whitespace or whether imports all need their own line really helps.
>
> Alex
>
> On Mon, 28 Jun 2021 at 08:16, Khem Raj <raj.khem@gmail.com> wrote:
>
> On Sun, Jun 27, 2021 at 11:13 PM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > Wait, what is this patchset all about?
> >
>
> its fixes for python linter (pylint) found issues.
>
> > Alex
> >
> > On Mon, 28 Jun 2021 at 07:59, Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >> From: persianpros <persianpros@yahoo.com>
> >>
> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> ---
> >>  meta/lib/oe/package.py                                |  9 +++++++--
> >>  meta/lib/oe/qa.py                                     |  4 +++-
> >>  meta/lib/oe/utils.py                                  |  6 ++++--
> >>  meta/lib/oeqa/oetest.py                               |  4 +++-
> >>  meta/lib/oeqa/sdk/case.py                             |  3 ++-
> >>  meta/lib/oeqa/sdk/cases/buildlzip.py                  |  5 ++++-
> >>  meta/lib/oeqa/sdk/cases/python.py                     |  3 ++-
> >>  meta/lib/oeqa/sdk/testsdk.py                          |  3 ++-
> >>  meta/lib/oeqa/selftest/cases/oelib/path.py            |  3 ++-
> >>  meta/lib/oeqa/selftest/cases/package.py               |  7 +++++--
> >>  meta/lib/oeqa/selftest/cases/runtime_test.py          |  3 ++-
> >>  meta/lib/oeqa/utils/testexport.py                     |  6 +++++-
> >>  .../texinfo-dummy-native/texinfo-dummy/template.py    |  4 +++-
> >>  scripts/combo-layer                                   |  3 ++-
> >>  scripts/contrib/patchreview.py                        | 11 ++++++++---
> >>  scripts/lnr                                           |  3 ++-
> >>  scripts/oe-pkgdata-browser                            |  5 ++++-
> >>  .../pybootchartgui/tests/parser_test.py               |  7 ++++++-
> >>  scripts/send-error-report                             |  3 ++-
> >>  scripts/verify-bashisms                               |  9 +++++++--
> >>  20 files changed, 75 insertions(+), 26 deletions(-)
> >>
> >> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
> >> index dd700cbb0c..fc5408d5f8 100644
> >> --- a/meta/lib/oe/package.py
> >> +++ b/meta/lib/oe/package.py
> >> @@ -107,7 +107,10 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d, qa_already_stripp
> >>      :param qa_already_stripped: Set to True if already-stripped' in ${INSANE_SKIP}
> >>      This is for proper logging and messages only.
> >>      """
> >> -    import stat, errno, oe.path, oe.utils
> >> +    import stat
> >> +    import errno
> >> +    import oe.path
> >> +    import oe.utils
> >>
> >>      elffiles = {}
> >>      inodes = {}
> >> @@ -187,7 +190,9 @@ def file_translate(file):
> >>      return ft
> >>
> >>  def filedeprunner(arg):
> >> -    import re, subprocess, shlex
> >> +    import re
> >> +    import subprocess
> >> +    import shlex
> >>
> >>      (pkg, pkgfiles, rpmdeps, pkgdest) = arg
> >>      provides = {}
> >> diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
> >> index e8a854a302..38c2e0cc1c 100644
> >> --- a/meta/lib/oe/qa.py
> >> +++ b/meta/lib/oe/qa.py
> >> @@ -2,7 +2,9 @@
> >>  # SPDX-License-Identifier: GPL-2.0-only
> >>  #
> >>
> >> -import os, struct, mmap
> >> +import os
> >> +import struct
> >> +import mmap
> >>
> >>  class NotELFFileError(Exception):
> >>      pass
> >> diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
> >> index a84039f585..789bad33f6 100644
> >> --- a/meta/lib/oe/utils.py
> >> +++ b/meta/lib/oe/utils.py
> >> @@ -376,7 +376,8 @@ def format_pkg_list(pkg_dict, ret_format=None):
> >>  # Helper function to get the host compiler version
> >>  # Do not assume the compiler is gcc
> >>  def get_host_compiler_version(d, taskcontextonly=False):
> >> -    import re, subprocess
> >> +    import re
> >> +    import subprocess
> >>
> >>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
> >>          return
> >> @@ -404,7 +405,8 @@ def get_host_compiler_version(d, taskcontextonly=False):
> >>
> >>
> >>  def host_gcc_version(d, taskcontextonly=False):
> >> -    import re, subprocess
> >> +    import re
> >> +    import subprocess
> >>
> >>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
> >>          return
> >> diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
> >> index 9c84466dd0..3136ac2ce5 100644
> >> --- a/meta/lib/oeqa/oetest.py
> >> +++ b/meta/lib/oeqa/oetest.py
> >> @@ -9,7 +9,9 @@
> >>
> >>  # It also has some helper functions and it's responsible for actually starting the tests
> >>
> >> -import os, re, sys
> >> +import os
> >> +import re
> >> +import sys
> >>  import unittest
> >>  import inspect
> >>  import subprocess
> >> diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
> >> index c45882689c..86ac199197 100644
> >> --- a/meta/lib/oeqa/sdk/case.py
> >> +++ b/meta/lib/oeqa/sdk/case.py
> >> @@ -35,7 +35,8 @@ class OESDKTestCase(OETestCase):
> >>          OS/architecture, or if not specified the currently configured MACHINE's
> >>          OS/architecture.
> >>          """
> >> -        import oe.qa, oe.elf
> >> +        import oe.qa
> >> +        import oe.elf
> >>
> >>          if not target_os or not target_arch:
> >>              output = self._run("echo $OECORE_TARGET_OS:$OECORE_TARGET_ARCH")
> >> diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py b/meta/lib/oeqa/sdk/cases/buildlzip.py
> >> index 49ae756bf3..04c4a0ec16 100644
> >> --- a/meta/lib/oeqa/sdk/cases/buildlzip.py
> >> +++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
> >> @@ -2,7 +2,10 @@
> >>  # SPDX-License-Identifier: MIT
> >>  #
> >>
> >> -import os, tempfile, subprocess, unittest
> >> +import os
> >> +import tempfile
> >> +import subprocess
> >> +import unittest
> >>  from oeqa.sdk.case import OESDKTestCase
> >>  from oeqa.utils.subprocesstweak import errors_have_output
> >>  errors_have_output()
> >> diff --git a/meta/lib/oeqa/sdk/cases/python.py b/meta/lib/oeqa/sdk/cases/python.py
> >> index a334abce5f..2848481f33 100644
> >> --- a/meta/lib/oeqa/sdk/cases/python.py
> >> +++ b/meta/lib/oeqa/sdk/cases/python.py
> >> @@ -2,7 +2,8 @@
> >>  # SPDX-License-Identifier: MIT
> >>  #
> >>
> >> -import subprocess, unittest
> >> +import subprocess
> >> +import unittest
> >>  from oeqa.sdk.case import OESDKTestCase
> >>
> >>  from oeqa.utils.subprocesstweak import errors_have_output
> >> diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
> >> index 35e40187bc..18e03cb8ef 100644
> >> --- a/meta/lib/oeqa/sdk/testsdk.py
> >> +++ b/meta/lib/oeqa/sdk/testsdk.py
> >> @@ -95,7 +95,8 @@ class TestSDK(TestSDKBase):
> >>          processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or d.getVar("BB_NUMBER_THREADS")
> >>          if processes:
> >>              try:
> >> -                import testtools, subunit
> >> +                import testtools
> >> +                import subunit
> >>              except ImportError:
> >>                  bb.warn("Failed to import testtools or subunit, the testcases will run serially")
> >>                  processes = None
> >> diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py b/meta/lib/oeqa/selftest/cases/oelib/path.py
> >> index a1cfa08c09..098734fa5d 100644
> >> --- a/meta/lib/oeqa/selftest/cases/oelib/path.py
> >> +++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
> >> @@ -3,7 +3,8 @@
> >>  #
> >>
> >>  from unittest.case import TestCase
> >> -import oe, oe.path
> >> +import oe
> >> +import oe.path
> >>  import tempfile
> >>  import os
> >>  import errno
> >> diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py
> >> index 7166c3991f..82aa1bde1c 100644
> >> --- a/meta/lib/oeqa/selftest/cases/package.py
> >> +++ b/meta/lib/oeqa/selftest/cases/package.py
> >> @@ -5,7 +5,8 @@
> >>  from oeqa.selftest.case import OESelftestTestCase
> >>  from oeqa.utils.commands import bitbake, get_bb_vars, get_bb_var, runqemu
> >>  import stat
> >> -import subprocess, os
> >> +import subprocess
> >> +import os
> >>  import oe.path
> >>  import re
> >>
> >> @@ -150,7 +151,9 @@ class PackageTests(OESelftestTestCase):
> >>                      self.fail('GDB %s failed' % binary)
> >>
> >>      def test_preserve_ownership(self):
> >> -        import os, stat, oe.cachedpath
> >> +        import os
> >> +        import stat
> >> +        import oe.cachedpath
> >>          features = 'IMAGE_INSTALL_append = " selftest-chown"\n'
> >>          self.write_config(features)
> >>          bitbake("core-image-minimal")
> >> diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
> >> index d0c2440722..54a80dfdc0 100644
> >> --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> >> +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> >> @@ -211,7 +211,8 @@ class TestImage(OESelftestTestCase):
> >>          Product: oe-core
> >>          Author: Alexander Kanavin <alex.kanavin@gmail.com>
> >>          """
> >> -        import subprocess, os
> >> +        import subprocess
> >> +        import os
> >>          try:
> >>              content = os.listdir("/dev/dri")
> >>              if len([i for i in content if i.startswith('render')]) == 0:
> >> diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py
> >> index e89d130a9c..383e57a6b2 100644
> >> --- a/meta/lib/oeqa/utils/testexport.py
> >> +++ b/meta/lib/oeqa/utils/testexport.py
> >> @@ -6,7 +6,11 @@
> >>
> >>  # Provides functions to help with exporting binaries obtained from built targets
> >>
> >> -import os, re, glob as g, shutil as sh,sys
> >> +import os
> >> +import re
> >> +import glob as g
> >> +import shutil as sh
> >> +import sys
> >>  from time import sleep
> >>  from .commands import runCmd
> >>  from difflib import SequenceMatcher as SM
> >> diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> >> index 86c7c1811a..75c01b83bf 100644
> >> --- a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> >> +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> >> @@ -28,7 +28,9 @@
> >>  # of the executable from argv[0] and emulate the corresponding program, so
> >>  # multiple copies of this script will exist under different names.
> >>
> >> -import sys, os, argparse
> >> +import sys
> >> +import os
> >> +import argparse
> >>
> >>
> >>  this_binary = sys.argv[0].split("/")[-1]
> >> diff --git a/scripts/combo-layer b/scripts/combo-layer
> >> index 045de65642..835a6bcd09 100755
> >> --- a/scripts/combo-layer
> >> +++ b/scripts/combo-layer
> >> @@ -11,7 +11,8 @@
> >>  #
> >>
> >>  import fnmatch
> >> -import os, sys
> >> +import os
> >> +import sys
> >>  import optparse
> >>  import logging
> >>  import subprocess
> >> diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
> >> index 62c509f51c..744dcfb49e 100755
> >> --- a/scripts/contrib/patchreview.py
> >> +++ b/scripts/contrib/patchreview.py
> >> @@ -40,7 +40,8 @@ def blame_patch(patch):
> >>                                      "--", patch)).decode("utf-8").splitlines()
> >>
> >>  def patchreview(path, patches):
> >> -    import re, os.path
> >> +    import re
> >> +    import os.path
> >>
> >>      # General pattern: start of line, optional whitespace, tag with optional
> >>      # hyphen or spaces, maybe a colon, some whitespace, then the value, all case
> >> @@ -198,7 +199,9 @@ def histogram(results):
> >>
> >>
> >>  if __name__ == "__main__":
> >> -    import argparse, subprocess, os
> >> +    import argparse
> >> +    import subprocess
> >> +    import os
> >>
> >>      args = argparse.ArgumentParser(description="Patch Review Tool")
> >>      args.add_argument("-b", "--blame", action="store_true", help="show blame for malformed patches")
> >> @@ -213,7 +216,9 @@ if __name__ == "__main__":
> >>      analyse(results, want_blame=args.blame, verbose=args.verbose)
> >>
> >>      if args.json:
> >> -        import json, os.path, collections
> >> +        import json
> >> +        import os.path
> >> +        import collections
> >>          if os.path.isfile(args.json):
> >>              data = json.load(open(args.json))
> >>          else:
> >> diff --git a/scripts/lnr b/scripts/lnr
> >> index a2ac4fec0f..e223b1e0e6 100755
> >> --- a/scripts/lnr
> >> +++ b/scripts/lnr
> >> @@ -6,7 +6,8 @@
> >>  # Create a *relative* symlink, just like ln --relative does but without needing
> >>  # coreutils 8.16.
> >>
> >> -import sys, os
> >> +import sys
> >> +import os
> >>
> >>  if len(sys.argv) != 3:
> >>     print("$ lnr TARGET LINK_NAME")
> >> diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
> >> index 8d223185a4..5834f59845 100755
> >> --- a/scripts/oe-pkgdata-browser
> >> +++ b/scripts/oe-pkgdata-browser
> >> @@ -1,6 +1,9 @@
> >>  #! /usr/bin/env python3
> >>
> >> -import os, sys, enum, ast
> >> +import os
> >> +import sys
> >> +import enum
> >> +import ast
> >>
> >>  scripts_path = os.path.dirname(os.path.realpath(__file__))
> >>  lib_path = scripts_path + '/lib'
> >> diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> >> index 00fb3bf797..c005cf341f 100644
> >> --- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> >> +++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> >> @@ -1,4 +1,9 @@
> >> -import sys, os, re, struct, operator, math
> >> +import sys
> >> +import os
> >> +import re
> >> +import struct
> >> +import operator
> >> +import math
> >>  from collections import defaultdict
> >>  import unittest
> >>
> >> diff --git a/scripts/send-error-report b/scripts/send-error-report
> >> index cfbcaa52cb..ffa0a199b1 100755
> >> --- a/scripts/send-error-report
> >> +++ b/scripts/send-error-report
> >> @@ -10,7 +10,8 @@
> >>  # SPDX-License-Identifier: GPL-2.0-only
> >>  #
> >>
> >> -import urllib.request, urllib.error
> >> +import urllib.request
> >> +import urllib.error
> >>  import sys
> >>  import json
> >>  import os
> >> diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
> >> index 14d8c298e9..a63f6c8115 100755
> >> --- a/scripts/verify-bashisms
> >> +++ b/scripts/verify-bashisms
> >> @@ -3,7 +3,11 @@
> >>  # SPDX-License-Identifier: GPL-2.0-only
> >>  #
> >>
> >> -import sys, os, subprocess, re, shutil
> >> +import sys
> >> +import os
> >> +import subprocess
> >> +import re
> >> +import shutil
> >>
> >>  whitelist = (
> >>      # type is supported by dash
> >> @@ -92,7 +96,8 @@ def get_tinfoil():
> >>      return tinfoil
> >>
> >>  if __name__=='__main__':
> >> -    import argparse, shutil
> >> +    import argparse
> >> +    import shutil
> >>
> >>      parser = argparse.ArgumentParser(description='Bashim detector for shell fragments in recipes.')
> >>      parser.add_argument("recipes", metavar="RECIPE", nargs="*", help="recipes to check (if not specified, all will be checked)")
> >> --
> >> 2.32.0
> >>
> >>
> >> 
> >>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core] [PATCH 1/8] PEP8 double aggressive E401
  2021-06-28 19:41         ` Khem Raj
@ 2021-06-28 19:47           ` Alexander Kanavin
  2021-06-28 21:08             ` Khem Raj
  2021-06-29  2:26             ` Chen Qi
  0 siblings, 2 replies; 16+ messages in thread
From: Alexander Kanavin @ 2021-06-28 19:47 UTC (permalink / raw)
  To: Khem Raj; +Cc: Persian Prince, OE-core

[-- Attachment #1: Type: text/plain, Size: 18363 bytes --]

I just generally disagree with the idea that changing a = b to a=b, or
import a,b to import a\nimport b helps readability or reduces confusion.

I'm reading a lot of python code all the time, and never once have been
confused by inconsistent whitespace.

Can the linter fix anything else, which has actual benefit?

Alex

On Mon, 28 Jun 2021 at 21:41, Khem Raj <raj.khem@gmail.com> wrote:

> On Mon, Jun 28, 2021 at 12:25 PM Persian Prince <persianpros@yahoo.com>
> wrote:
> >
> > When we can follow PEP8 we should as it's how developers could follow a
> common coding style and avoid creating different files.
> >
> > In "Safe PEP8" PRs some PEP8 codes carefully added so it won't change
> tabs to spaces but makes the code cleaner in a safe way. PEP8 also fixes
> some small problems (won't do huge changes like futurize) which is good and
> sometime we miss them by mistake.
> >
> > We at https://github.com/OpenVisionE2 , https://github.com/oe-alliance
> and https://github.com/OpenPLi applied safe PEP8 changes to so many
> repositories and we're using it via PEP8.sh on GitHub Actions as an online
> cleaner tool. (PEP8.sh:
> https://github.com/OpenVisionE2/enigma2-openvision/blob/develop/CI/PEP8.sh
> )
> >
> > Also applied before on https://github.com/openembedded/meta-openembedded
> which is why that repo is clean and won't need a PR (for now), keep in mind
> that these are common standards so even if we don't like them that much
> still they help for having a good common style and less mistakes.
> >
> > If you needed more assistance from me please don't hesitate to ask, I'm
> all in.
>
>
> can you improve the commit msgs in pull request as asked.
>
> >
> > Regards,
> > Persian Prince
> >
> > On Monday, June 28, 2021, 10:56:40 AM GMT+4:30, Alexander Kanavin <
> alex.kanavin@gmail.com> wrote:
> >
> >
> > Right, but can you please write something more descriptive than "PEP8
> double aggressive W291 ~ W293 and W391" ?
> >
> > Also I'm not sure fiddling about with whitespace or whether imports all
> need their own line really helps.
> >
> > Alex
> >
> > On Mon, 28 Jun 2021 at 08:16, Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On Sun, Jun 27, 2021 at 11:13 PM Alexander Kanavin
> > <alex.kanavin@gmail.com> wrote:
> > >
> > > Wait, what is this patchset all about?
> > >
> >
> > its fixes for python linter (pylint) found issues.
> >
> > > Alex
> > >
> > > On Mon, 28 Jun 2021 at 07:59, Khem Raj <raj.khem@gmail.com> wrote:
> > >>
> > >> From: persianpros <persianpros@yahoo.com>
> > >>
> > >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > >> ---
> > >>  meta/lib/oe/package.py                                |  9 +++++++--
> > >>  meta/lib/oe/qa.py                                     |  4 +++-
> > >>  meta/lib/oe/utils.py                                  |  6 ++++--
> > >>  meta/lib/oeqa/oetest.py                               |  4 +++-
> > >>  meta/lib/oeqa/sdk/case.py                             |  3 ++-
> > >>  meta/lib/oeqa/sdk/cases/buildlzip.py                  |  5 ++++-
> > >>  meta/lib/oeqa/sdk/cases/python.py                     |  3 ++-
> > >>  meta/lib/oeqa/sdk/testsdk.py                          |  3 ++-
> > >>  meta/lib/oeqa/selftest/cases/oelib/path.py            |  3 ++-
> > >>  meta/lib/oeqa/selftest/cases/package.py               |  7 +++++--
> > >>  meta/lib/oeqa/selftest/cases/runtime_test.py          |  3 ++-
> > >>  meta/lib/oeqa/utils/testexport.py                     |  6 +++++-
> > >>  .../texinfo-dummy-native/texinfo-dummy/template.py    |  4 +++-
> > >>  scripts/combo-layer                                   |  3 ++-
> > >>  scripts/contrib/patchreview.py                        | 11
> ++++++++---
> > >>  scripts/lnr                                           |  3 ++-
> > >>  scripts/oe-pkgdata-browser                            |  5 ++++-
> > >>  .../pybootchartgui/tests/parser_test.py               |  7 ++++++-
> > >>  scripts/send-error-report                             |  3 ++-
> > >>  scripts/verify-bashisms                               |  9 +++++++--
> > >>  20 files changed, 75 insertions(+), 26 deletions(-)
> > >>
> > >> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
> > >> index dd700cbb0c..fc5408d5f8 100644
> > >> --- a/meta/lib/oe/package.py
> > >> +++ b/meta/lib/oe/package.py
> > >> @@ -107,7 +107,10 @@ def strip_execs(pn, dstdir, strip_cmd, libdir,
> base_libdir, d, qa_already_stripp
> > >>      :param qa_already_stripped: Set to True if already-stripped' in
> ${INSANE_SKIP}
> > >>      This is for proper logging and messages only.
> > >>      """
> > >> -    import stat, errno, oe.path, oe.utils
> > >> +    import stat
> > >> +    import errno
> > >> +    import oe.path
> > >> +    import oe.utils
> > >>
> > >>      elffiles = {}
> > >>      inodes = {}
> > >> @@ -187,7 +190,9 @@ def file_translate(file):
> > >>      return ft
> > >>
> > >>  def filedeprunner(arg):
> > >> -    import re, subprocess, shlex
> > >> +    import re
> > >> +    import subprocess
> > >> +    import shlex
> > >>
> > >>      (pkg, pkgfiles, rpmdeps, pkgdest) = arg
> > >>      provides = {}
> > >> diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
> > >> index e8a854a302..38c2e0cc1c 100644
> > >> --- a/meta/lib/oe/qa.py
> > >> +++ b/meta/lib/oe/qa.py
> > >> @@ -2,7 +2,9 @@
> > >>  # SPDX-License-Identifier: GPL-2.0-only
> > >>  #
> > >>
> > >> -import os, struct, mmap
> > >> +import os
> > >> +import struct
> > >> +import mmap
> > >>
> > >>  class NotELFFileError(Exception):
> > >>      pass
> > >> diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
> > >> index a84039f585..789bad33f6 100644
> > >> --- a/meta/lib/oe/utils.py
> > >> +++ b/meta/lib/oe/utils.py
> > >> @@ -376,7 +376,8 @@ def format_pkg_list(pkg_dict, ret_format=None):
> > >>  # Helper function to get the host compiler version
> > >>  # Do not assume the compiler is gcc
> > >>  def get_host_compiler_version(d, taskcontextonly=False):
> > >> -    import re, subprocess
> > >> +    import re
> > >> +    import subprocess
> > >>
> > >>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
> > >>          return
> > >> @@ -404,7 +405,8 @@ def get_host_compiler_version(d,
> taskcontextonly=False):
> > >>
> > >>
> > >>  def host_gcc_version(d, taskcontextonly=False):
> > >> -    import re, subprocess
> > >> +    import re
> > >> +    import subprocess
> > >>
> > >>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
> > >>          return
> > >> diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
> > >> index 9c84466dd0..3136ac2ce5 100644
> > >> --- a/meta/lib/oeqa/oetest.py
> > >> +++ b/meta/lib/oeqa/oetest.py
> > >> @@ -9,7 +9,9 @@
> > >>
> > >>  # It also has some helper functions and it's responsible for
> actually starting the tests
> > >>
> > >> -import os, re, sys
> > >> +import os
> > >> +import re
> > >> +import sys
> > >>  import unittest
> > >>  import inspect
> > >>  import subprocess
> > >> diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
> > >> index c45882689c..86ac199197 100644
> > >> --- a/meta/lib/oeqa/sdk/case.py
> > >> +++ b/meta/lib/oeqa/sdk/case.py
> > >> @@ -35,7 +35,8 @@ class OESDKTestCase(OETestCase):
> > >>          OS/architecture, or if not specified the currently
> configured MACHINE's
> > >>          OS/architecture.
> > >>          """
> > >> -        import oe.qa, oe.elf
> > >> +        import oe.qa
> > >> +        import oe.elf
> > >>
> > >>          if not target_os or not target_arch:
> > >>              output = self._run("echo
> $OECORE_TARGET_OS:$OECORE_TARGET_ARCH")
> > >> diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py
> b/meta/lib/oeqa/sdk/cases/buildlzip.py
> > >> index 49ae756bf3..04c4a0ec16 100644
> > >> --- a/meta/lib/oeqa/sdk/cases/buildlzip.py
> > >> +++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
> > >> @@ -2,7 +2,10 @@
> > >>  # SPDX-License-Identifier: MIT
> > >>  #
> > >>
> > >> -import os, tempfile, subprocess, unittest
> > >> +import os
> > >> +import tempfile
> > >> +import subprocess
> > >> +import unittest
> > >>  from oeqa.sdk.case import OESDKTestCase
> > >>  from oeqa.utils.subprocesstweak import errors_have_output
> > >>  errors_have_output()
> > >> diff --git a/meta/lib/oeqa/sdk/cases/python.py
> b/meta/lib/oeqa/sdk/cases/python.py
> > >> index a334abce5f..2848481f33 100644
> > >> --- a/meta/lib/oeqa/sdk/cases/python.py
> > >> +++ b/meta/lib/oeqa/sdk/cases/python.py
> > >> @@ -2,7 +2,8 @@
> > >>  # SPDX-License-Identifier: MIT
> > >>  #
> > >>
> > >> -import subprocess, unittest
> > >> +import subprocess
> > >> +import unittest
> > >>  from oeqa.sdk.case import OESDKTestCase
> > >>
> > >>  from oeqa.utils.subprocesstweak import errors_have_output
> > >> diff --git a/meta/lib/oeqa/sdk/testsdk.py
> b/meta/lib/oeqa/sdk/testsdk.py
> > >> index 35e40187bc..18e03cb8ef 100644
> > >> --- a/meta/lib/oeqa/sdk/testsdk.py
> > >> +++ b/meta/lib/oeqa/sdk/testsdk.py
> > >> @@ -95,7 +95,8 @@ class TestSDK(TestSDKBase):
> > >>          processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or
> d.getVar("BB_NUMBER_THREADS")
> > >>          if processes:
> > >>              try:
> > >> -                import testtools, subunit
> > >> +                import testtools
> > >> +                import subunit
> > >>              except ImportError:
> > >>                  bb.warn("Failed to import testtools or subunit, the
> testcases will run serially")
> > >>                  processes = None
> > >> diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py
> b/meta/lib/oeqa/selftest/cases/oelib/path.py
> > >> index a1cfa08c09..098734fa5d 100644
> > >> --- a/meta/lib/oeqa/selftest/cases/oelib/path.py
> > >> +++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
> > >> @@ -3,7 +3,8 @@
> > >>  #
> > >>
> > >>  from unittest.case import TestCase
> > >> -import oe, oe.path
> > >> +import oe
> > >> +import oe.path
> > >>  import tempfile
> > >>  import os
> > >>  import errno
> > >> diff --git a/meta/lib/oeqa/selftest/cases/package.py
> b/meta/lib/oeqa/selftest/cases/package.py
> > >> index 7166c3991f..82aa1bde1c 100644
> > >> --- a/meta/lib/oeqa/selftest/cases/package.py
> > >> +++ b/meta/lib/oeqa/selftest/cases/package.py
> > >> @@ -5,7 +5,8 @@
> > >>  from oeqa.selftest.case import OESelftestTestCase
> > >>  from oeqa.utils.commands import bitbake, get_bb_vars, get_bb_var,
> runqemu
> > >>  import stat
> > >> -import subprocess, os
> > >> +import subprocess
> > >> +import os
> > >>  import oe.path
> > >>  import re
> > >>
> > >> @@ -150,7 +151,9 @@ class PackageTests(OESelftestTestCase):
> > >>                      self.fail('GDB %s failed' % binary)
> > >>
> > >>      def test_preserve_ownership(self):
> > >> -        import os, stat, oe.cachedpath
> > >> +        import os
> > >> +        import stat
> > >> +        import oe.cachedpath
> > >>          features = 'IMAGE_INSTALL_append = " selftest-chown"\n'
> > >>          self.write_config(features)
> > >>          bitbake("core-image-minimal")
> > >> diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py
> b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > >> index d0c2440722..54a80dfdc0 100644
> > >> --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> > >> +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > >> @@ -211,7 +211,8 @@ class TestImage(OESelftestTestCase):
> > >>          Product: oe-core
> > >>          Author: Alexander Kanavin <alex.kanavin@gmail.com>
> > >>          """
> > >> -        import subprocess, os
> > >> +        import subprocess
> > >> +        import os
> > >>          try:
> > >>              content = os.listdir("/dev/dri")
> > >>              if len([i for i in content if i.startswith('render')])
> == 0:
> > >> diff --git a/meta/lib/oeqa/utils/testexport.py
> b/meta/lib/oeqa/utils/testexport.py
> > >> index e89d130a9c..383e57a6b2 100644
> > >> --- a/meta/lib/oeqa/utils/testexport.py
> > >> +++ b/meta/lib/oeqa/utils/testexport.py
> > >> @@ -6,7 +6,11 @@
> > >>
> > >>  # Provides functions to help with exporting binaries obtained from
> built targets
> > >>
> > >> -import os, re, glob as g, shutil as sh,sys
> > >> +import os
> > >> +import re
> > >> +import glob as g
> > >> +import shutil as sh
> > >> +import sys
> > >>  from time import sleep
> > >>  from .commands import runCmd
> > >>  from difflib import SequenceMatcher as SM
> > >> diff --git
> a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> > >> index 86c7c1811a..75c01b83bf 100644
> > >> ---
> a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> > >> +++
> b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
> > >> @@ -28,7 +28,9 @@
> > >>  # of the executable from argv[0] and emulate the corresponding
> program, so
> > >>  # multiple copies of this script will exist under different names.
> > >>
> > >> -import sys, os, argparse
> > >> +import sys
> > >> +import os
> > >> +import argparse
> > >>
> > >>
> > >>  this_binary = sys.argv[0].split("/")[-1]
> > >> diff --git a/scripts/combo-layer b/scripts/combo-layer
> > >> index 045de65642..835a6bcd09 100755
> > >> --- a/scripts/combo-layer
> > >> +++ b/scripts/combo-layer
> > >> @@ -11,7 +11,8 @@
> > >>  #
> > >>
> > >>  import fnmatch
> > >> -import os, sys
> > >> +import os
> > >> +import sys
> > >>  import optparse
> > >>  import logging
> > >>  import subprocess
> > >> diff --git a/scripts/contrib/patchreview.py
> b/scripts/contrib/patchreview.py
> > >> index 62c509f51c..744dcfb49e 100755
> > >> --- a/scripts/contrib/patchreview.py
> > >> +++ b/scripts/contrib/patchreview.py
> > >> @@ -40,7 +40,8 @@ def blame_patch(patch):
> > >>                                      "--",
> patch)).decode("utf-8").splitlines()
> > >>
> > >>  def patchreview(path, patches):
> > >> -    import re, os.path
> > >> +    import re
> > >> +    import os.path
> > >>
> > >>      # General pattern: start of line, optional whitespace, tag with
> optional
> > >>      # hyphen or spaces, maybe a colon, some whitespace, then the
> value, all case
> > >> @@ -198,7 +199,9 @@ def histogram(results):
> > >>
> > >>
> > >>  if __name__ == "__main__":
> > >> -    import argparse, subprocess, os
> > >> +    import argparse
> > >> +    import subprocess
> > >> +    import os
> > >>
> > >>      args = argparse.ArgumentParser(description="Patch Review Tool")
> > >>      args.add_argument("-b", "--blame", action="store_true",
> help="show blame for malformed patches")
> > >> @@ -213,7 +216,9 @@ if __name__ == "__main__":
> > >>      analyse(results, want_blame=args.blame, verbose=args.verbose)
> > >>
> > >>      if args.json:
> > >> -        import json, os.path, collections
> > >> +        import json
> > >> +        import os.path
> > >> +        import collections
> > >>          if os.path.isfile(args.json):
> > >>              data = json.load(open(args.json))
> > >>          else:
> > >> diff --git a/scripts/lnr b/scripts/lnr
> > >> index a2ac4fec0f..e223b1e0e6 100755
> > >> --- a/scripts/lnr
> > >> +++ b/scripts/lnr
> > >> @@ -6,7 +6,8 @@
> > >>  # Create a *relative* symlink, just like ln --relative does but
> without needing
> > >>  # coreutils 8.16.
> > >>
> > >> -import sys, os
> > >> +import sys
> > >> +import os
> > >>
> > >>  if len(sys.argv) != 3:
> > >>     print("$ lnr TARGET LINK_NAME")
> > >> diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
> > >> index 8d223185a4..5834f59845 100755
> > >> --- a/scripts/oe-pkgdata-browser
> > >> +++ b/scripts/oe-pkgdata-browser
> > >> @@ -1,6 +1,9 @@
> > >>  #! /usr/bin/env python3
> > >>
> > >> -import os, sys, enum, ast
> > >> +import os
> > >> +import sys
> > >> +import enum
> > >> +import ast
> > >>
> > >>  scripts_path = os.path.dirname(os.path.realpath(__file__))
> > >>  lib_path = scripts_path + '/lib'
> > >> diff --git
> a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> > >> index 00fb3bf797..c005cf341f 100644
> > >> --- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> > >> +++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
> > >> @@ -1,4 +1,9 @@
> > >> -import sys, os, re, struct, operator, math
> > >> +import sys
> > >> +import os
> > >> +import re
> > >> +import struct
> > >> +import operator
> > >> +import math
> > >>  from collections import defaultdict
> > >>  import unittest
> > >>
> > >> diff --git a/scripts/send-error-report b/scripts/send-error-report
> > >> index cfbcaa52cb..ffa0a199b1 100755
> > >> --- a/scripts/send-error-report
> > >> +++ b/scripts/send-error-report
> > >> @@ -10,7 +10,8 @@
> > >>  # SPDX-License-Identifier: GPL-2.0-only
> > >>  #
> > >>
> > >> -import urllib.request, urllib.error
> > >> +import urllib.request
> > >> +import urllib.error
> > >>  import sys
> > >>  import json
> > >>  import os
> > >> diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
> > >> index 14d8c298e9..a63f6c8115 100755
> > >> --- a/scripts/verify-bashisms
> > >> +++ b/scripts/verify-bashisms
> > >> @@ -3,7 +3,11 @@
> > >>  # SPDX-License-Identifier: GPL-2.0-only
> > >>  #
> > >>
> > >> -import sys, os, subprocess, re, shutil
> > >> +import sys
> > >> +import os
> > >> +import subprocess
> > >> +import re
> > >> +import shutil
> > >>
> > >>  whitelist = (
> > >>      # type is supported by dash
> > >> @@ -92,7 +96,8 @@ def get_tinfoil():
> > >>      return tinfoil
> > >>
> > >>  if __name__=='__main__':
> > >> -    import argparse, shutil
> > >> +    import argparse
> > >> +    import shutil
> > >>
> > >>      parser = argparse.ArgumentParser(description='Bashim detector
> for shell fragments in recipes.')
> > >>      parser.add_argument("recipes", metavar="RECIPE", nargs="*",
> help="recipes to check (if not specified, all will be checked)")
> > >> --
> > >> 2.32.0
> > >>
> > >>
> > >> 
> > >>
>

[-- Attachment #2: Type: text/html, Size: 25320 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core] [PATCH 1/8] PEP8 double aggressive E401
  2021-06-28 19:47           ` Alexander Kanavin
@ 2021-06-28 21:08             ` Khem Raj
  2021-06-28 21:14               ` Richard Purdie
  2021-06-29  2:26             ` Chen Qi
  1 sibling, 1 reply; 16+ messages in thread
From: Khem Raj @ 2021-06-28 21:08 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Persian Prince, OE-core



On 6/28/21 12:47 PM, Alexander Kanavin wrote:
> I just generally disagree with the idea that changing a = b to a=b, or 
> import a,b to import a\nimport b helps readability or reduces confusion.

I understand that this seems change for change's sake. Consistent coding
formatting goes long way in improving quality of code and reviews too. 
this also help folks who are new to project due to it being a familiar 
format.

> 
> I'm reading a lot of python code all the time, and never once have been 
> confused by inconsistent whitespace.
>
> Can the linter fix anything else, which has actual benefit?
> 

linters always find interesting issues all the time, however the payoff 
only happens once code is clean enough to run them. otherwise looking 
through tonne of issues you want to ignore is manual effort and can not 
be sustained.

Persian Prince,

I think it would be better if we have a selftest to run linter on AB
to have this effort sustained in general.

so please think of not only from one time fix but also how can this be 
used in general workflow and implement it as well.

> Alex
> 
> On Mon, 28 Jun 2021 at 21:41, Khem Raj <raj.khem@gmail.com 
> <mailto:raj.khem@gmail.com>> wrote:
> 
>     On Mon, Jun 28, 2021 at 12:25 PM Persian Prince
>     <persianpros@yahoo.com <mailto:persianpros@yahoo.com>> wrote:
>      >
>      > When we can follow PEP8 we should as it's how developers could
>     follow a common coding style and avoid creating different files.
>      >
>      > In "Safe PEP8" PRs some PEP8 codes carefully added so it won't
>     change tabs to spaces but makes the code cleaner in a safe way. PEP8
>     also fixes some small problems (won't do huge changes like futurize)
>     which is good and sometime we miss them by mistake.
>      >
>      > We at https://github.com/OpenVisionE2
>     <https://github.com/OpenVisionE2> , https://github.com/oe-alliance
>     <https://github.com/oe-alliance> and https://github.com/OpenPLi
>     <https://github.com/OpenPLi> applied safe PEP8 changes to so many
>     repositories and we're using it via PEP8.sh on GitHub Actions as an
>     online cleaner tool. (PEP8.sh:
>     https://github.com/OpenVisionE2/enigma2-openvision/blob/develop/CI/PEP8.sh
>     <https://github.com/OpenVisionE2/enigma2-openvision/blob/develop/CI/PEP8.sh>)
>      >
>      > Also applied before on
>     https://github.com/openembedded/meta-openembedded
>     <https://github.com/openembedded/meta-openembedded> which is why
>     that repo is clean and won't need a PR (for now), keep in mind that
>     these are common standards so even if we don't like them that much
>     still they help for having a good common style and less mistakes.
>      >
>      > If you needed more assistance from me please don't hesitate to
>     ask, I'm all in.
> 
> 
>     can you improve the commit msgs in pull request as asked.
> 
>      >
>      > Regards,
>      > Persian Prince
>      >
>      > On Monday, June 28, 2021, 10:56:40 AM GMT+4:30, Alexander Kanavin
>     <alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>> wrote:
>      >
>      >
>      > Right, but can you please write something more descriptive than
>     "PEP8 double aggressive W291 ~ W293 and W391" ?
>      >
>      > Also I'm not sure fiddling about with whitespace or whether
>     imports all need their own line really helps.
>      >
>      > Alex
>      >
>      > On Mon, 28 Jun 2021 at 08:16, Khem Raj <raj.khem@gmail.com
>     <mailto:raj.khem@gmail.com>> wrote:
>      >
>      > On Sun, Jun 27, 2021 at 11:13 PM Alexander Kanavin
>      > <alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>> wrote:
>      > >
>      > > Wait, what is this patchset all about?
>      > >
>      >
>      > its fixes for python linter (pylint) found issues.
>      >
>      > > Alex
>      > >
>      > > On Mon, 28 Jun 2021 at 07:59, Khem Raj <raj.khem@gmail.com
>     <mailto:raj.khem@gmail.com>> wrote:
>      > >>
>      > >> From: persianpros <persianpros@yahoo.com
>     <mailto:persianpros@yahoo.com>>
>      > >>
>      > >> Signed-off-by: Khem Raj <raj.khem@gmail.com
>     <mailto:raj.khem@gmail.com>>
>      > >> ---
>      > >>  meta/lib/oe/package.py                                |  9
>     +++++++--
>      > >>  meta/lib/oe/qa.py                                     |  4 +++-
>      > >>  meta/lib/oe/utils.py                                  |  6 ++++--
>      > >>  meta/lib/oeqa/oetest.py                               |  4 +++-
>      > >>  meta/lib/oeqa/sdk/case.py                             |  3 ++-
>      > >>  meta/lib/oeqa/sdk/cases/buildlzip.py                  |  5 ++++-
>      > >>  meta/lib/oeqa/sdk/cases/python.py                     |  3 ++-
>      > >>  meta/lib/oeqa/sdk/testsdk.py                          |  3 ++-
>      > >>  meta/lib/oeqa/selftest/cases/oelib/path.py            |  3 ++-
>      > >>  meta/lib/oeqa/selftest/cases/package.py               |  7
>     +++++--
>      > >>  meta/lib/oeqa/selftest/cases/runtime_test.py          |  3 ++-
>      > >>  meta/lib/oeqa/utils/testexport.py                     |  6 +++++-
>      > >>  .../texinfo-dummy-native/texinfo-dummy/template.py    |  4 +++-
>      > >>  scripts/combo-layer                                   |  3 ++-
>      > >>  scripts/contrib/patchreview.py                        | 11
>     ++++++++---
>      > >>  scripts/lnr                                           |  3 ++-
>      > >>  scripts/oe-pkgdata-browser                            |  5 ++++-
>      > >>  .../pybootchartgui/tests/parser_test.py               |  7
>     ++++++-
>      > >>  scripts/send-error-report                             |  3 ++-
>      > >>  scripts/verify-bashisms                               |  9
>     +++++++--
>      > >>  20 files changed, 75 insertions(+), 26 deletions(-)
>      > >>
>      > >> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
>      > >> index dd700cbb0c..fc5408d5f8 100644
>      > >> --- a/meta/lib/oe/package.py
>      > >> +++ b/meta/lib/oe/package.py
>      > >> @@ -107,7 +107,10 @@ def strip_execs(pn, dstdir, strip_cmd,
>     libdir, base_libdir, d, qa_already_stripp
>      > >>      :param qa_already_stripped: Set to True if
>     already-stripped' in ${INSANE_SKIP}
>      > >>      This is for proper logging and messages only.
>      > >>      """
>      > >> -    import stat, errno, oe.path, oe.utils
>      > >> +    import stat
>      > >> +    import errno
>      > >> +    import oe.path
>      > >> +    import oe.utils
>      > >>
>      > >>      elffiles = {}
>      > >>      inodes = {}
>      > >> @@ -187,7 +190,9 @@ def file_translate(file):
>      > >>      return ft
>      > >>
>      > >>  def filedeprunner(arg):
>      > >> -    import re, subprocess, shlex
>      > >> +    import re
>      > >> +    import subprocess
>      > >> +    import shlex
>      > >>
>      > >>      (pkg, pkgfiles, rpmdeps, pkgdest) = arg
>      > >>      provides = {}
>      > >> diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
>      > >> index e8a854a302..38c2e0cc1c 100644
>      > >> --- a/meta/lib/oe/qa.py
>      > >> +++ b/meta/lib/oe/qa.py
>      > >> @@ -2,7 +2,9 @@
>      > >>  # SPDX-License-Identifier: GPL-2.0-only
>      > >>  #
>      > >>
>      > >> -import os, struct, mmap
>      > >> +import os
>      > >> +import struct
>      > >> +import mmap
>      > >>
>      > >>  class NotELFFileError(Exception):
>      > >>      pass
>      > >> diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
>      > >> index a84039f585..789bad33f6 100644
>      > >> --- a/meta/lib/oe/utils.py
>      > >> +++ b/meta/lib/oe/utils.py
>      > >> @@ -376,7 +376,8 @@ def format_pkg_list(pkg_dict,
>     ret_format=None):
>      > >>  # Helper function to get the host compiler version
>      > >>  # Do not assume the compiler is gcc
>      > >>  def get_host_compiler_version(d, taskcontextonly=False):
>      > >> -    import re, subprocess
>      > >> +    import re
>      > >> +    import subprocess
>      > >>
>      > >>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
>      > >>          return
>      > >> @@ -404,7 +405,8 @@ def get_host_compiler_version(d,
>     taskcontextonly=False):
>      > >>
>      > >>
>      > >>  def host_gcc_version(d, taskcontextonly=False):
>      > >> -    import re, subprocess
>      > >> +    import re
>      > >> +    import subprocess
>      > >>
>      > >>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
>      > >>          return
>      > >> diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
>      > >> index 9c84466dd0..3136ac2ce5 100644
>      > >> --- a/meta/lib/oeqa/oetest.py
>      > >> +++ b/meta/lib/oeqa/oetest.py
>      > >> @@ -9,7 +9,9 @@
>      > >>
>      > >>  # It also has some helper functions and it's responsible for
>     actually starting the tests
>      > >>
>      > >> -import os, re, sys
>      > >> +import os
>      > >> +import re
>      > >> +import sys
>      > >>  import unittest
>      > >>  import inspect
>      > >>  import subprocess
>      > >> diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
>      > >> index c45882689c..86ac199197 100644
>      > >> --- a/meta/lib/oeqa/sdk/case.py
>      > >> +++ b/meta/lib/oeqa/sdk/case.py
>      > >> @@ -35,7 +35,8 @@ class OESDKTestCase(OETestCase):
>      > >>          OS/architecture, or if not specified the currently
>     configured MACHINE's
>      > >>          OS/architecture.
>      > >>          """
>      > >> -        import oe.qa <http://oe.qa>, oe.elf
>      > >> +        import oe.qa <http://oe.qa>
>      > >> +        import oe.elf
>      > >>
>      > >>          if not target_os or not target_arch:
>      > >>              output = self._run("echo
>     $OECORE_TARGET_OS:$OECORE_TARGET_ARCH")
>      > >> diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py
>     b/meta/lib/oeqa/sdk/cases/buildlzip.py
>      > >> index 49ae756bf3..04c4a0ec16 100644
>      > >> --- a/meta/lib/oeqa/sdk/cases/buildlzip.py
>      > >> +++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
>      > >> @@ -2,7 +2,10 @@
>      > >>  # SPDX-License-Identifier: MIT
>      > >>  #
>      > >>
>      > >> -import os, tempfile, subprocess, unittest
>      > >> +import os
>      > >> +import tempfile
>      > >> +import subprocess
>      > >> +import unittest
>      > >>  from oeqa.sdk.case import OESDKTestCase
>      > >>  from oeqa.utils.subprocesstweak import errors_have_output
>      > >>  errors_have_output()
>      > >> diff --git a/meta/lib/oeqa/sdk/cases/python.py
>     b/meta/lib/oeqa/sdk/cases/python.py
>      > >> index a334abce5f..2848481f33 100644
>      > >> --- a/meta/lib/oeqa/sdk/cases/python.py
>      > >> +++ b/meta/lib/oeqa/sdk/cases/python.py
>      > >> @@ -2,7 +2,8 @@
>      > >>  # SPDX-License-Identifier: MIT
>      > >>  #
>      > >>
>      > >> -import subprocess, unittest
>      > >> +import subprocess
>      > >> +import unittest
>      > >>  from oeqa.sdk.case import OESDKTestCase
>      > >>
>      > >>  from oeqa.utils.subprocesstweak import errors_have_output
>      > >> diff --git a/meta/lib/oeqa/sdk/testsdk.py
>     b/meta/lib/oeqa/sdk/testsdk.py
>      > >> index 35e40187bc..18e03cb8ef 100644
>      > >> --- a/meta/lib/oeqa/sdk/testsdk.py
>      > >> +++ b/meta/lib/oeqa/sdk/testsdk.py
>      > >> @@ -95,7 +95,8 @@ class TestSDK(TestSDKBase):
>      > >>          processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or
>     d.getVar("BB_NUMBER_THREADS")
>      > >>          if processes:
>      > >>              try:
>      > >> -                import testtools, subunit
>      > >> +                import testtools
>      > >> +                import subunit
>      > >>              except ImportError:
>      > >>                  bb.warn("Failed to import testtools or
>     subunit, the testcases will run serially")
>      > >>                  processes = None
>      > >> diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py
>     b/meta/lib/oeqa/selftest/cases/oelib/path.py
>      > >> index a1cfa08c09..098734fa5d 100644
>      > >> --- a/meta/lib/oeqa/selftest/cases/oelib/path.py
>      > >> +++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
>      > >> @@ -3,7 +3,8 @@
>      > >>  #
>      > >>
>      > >>  from unittest.case import TestCase
>      > >> -import oe, oe.path
>      > >> +import oe
>      > >> +import oe.path
>      > >>  import tempfile
>      > >>  import os
>      > >>  import errno
>      > >> diff --git a/meta/lib/oeqa/selftest/cases/package.py
>     b/meta/lib/oeqa/selftest/cases/package.py
>      > >> index 7166c3991f..82aa1bde1c 100644
>      > >> --- a/meta/lib/oeqa/selftest/cases/package.py
>      > >> +++ b/meta/lib/oeqa/selftest/cases/package.py
>      > >> @@ -5,7 +5,8 @@
>      > >>  from oeqa.selftest.case import OESelftestTestCase
>      > >>  from oeqa.utils.commands import bitbake, get_bb_vars,
>     get_bb_var, runqemu
>      > >>  import stat
>      > >> -import subprocess, os
>      > >> +import subprocess
>      > >> +import os
>      > >>  import oe.path
>      > >>  import re
>      > >>
>      > >> @@ -150,7 +151,9 @@ class PackageTests(OESelftestTestCase):
>      > >>                      self.fail('GDB %s failed' % binary)
>      > >>
>      > >>      def test_preserve_ownership(self):
>      > >> -        import os, stat, oe.cachedpath
>      > >> +        import os
>      > >> +        import stat
>      > >> +        import oe.cachedpath
>      > >>          features = 'IMAGE_INSTALL_append = " selftest-chown"\n'
>      > >>          self.write_config(features)
>      > >>          bitbake("core-image-minimal")
>      > >> diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py
>     b/meta/lib/oeqa/selftest/cases/runtime_test.py
>      > >> index d0c2440722..54a80dfdc0 100644
>      > >> --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
>      > >> +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
>      > >> @@ -211,7 +211,8 @@ class TestImage(OESelftestTestCase):
>      > >>          Product: oe-core
>      > >>          Author: Alexander Kanavin <alex.kanavin@gmail.com
>     <mailto:alex.kanavin@gmail.com>>
>      > >>          """
>      > >> -        import subprocess, os
>      > >> +        import subprocess
>      > >> +        import os
>      > >>          try:
>      > >>              content = os.listdir("/dev/dri")
>      > >>              if len([i for i in content if
>     i.startswith('render')]) == 0:
>      > >> diff --git a/meta/lib/oeqa/utils/testexport.py
>     b/meta/lib/oeqa/utils/testexport.py
>      > >> index e89d130a9c..383e57a6b2 100644
>      > >> --- a/meta/lib/oeqa/utils/testexport.py
>      > >> +++ b/meta/lib/oeqa/utils/testexport.py
>      > >> @@ -6,7 +6,11 @@
>      > >>
>      > >>  # Provides functions to help with exporting binaries obtained
>     from built targets
>      > >>
>      > >> -import os, re, glob as g, shutil as sh,sys
>      > >> +import os
>      > >> +import re
>      > >> +import glob as g
>      > >> +import shutil as sh
>      > >> +import sys
>      > >>  from time import sleep
>      > >>  from .commands import runCmd
>      > >>  from difflib import SequenceMatcher as SM
>      > >> diff --git
>     a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>     b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>      > >> index 86c7c1811a..75c01b83bf 100644
>      > >> ---
>     a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>      > >> +++
>     b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>      > >> @@ -28,7 +28,9 @@
>      > >>  # of the executable from argv[0] and emulate the
>     corresponding program, so
>      > >>  # multiple copies of this script will exist under different
>     names.
>      > >>
>      > >> -import sys, os, argparse
>      > >> +import sys
>      > >> +import os
>      > >> +import argparse
>      > >>
>      > >>
>      > >>  this_binary = sys.argv[0].split("/")[-1]
>      > >> diff --git a/scripts/combo-layer b/scripts/combo-layer
>      > >> index 045de65642..835a6bcd09 100755
>      > >> --- a/scripts/combo-layer
>      > >> +++ b/scripts/combo-layer
>      > >> @@ -11,7 +11,8 @@
>      > >>  #
>      > >>
>      > >>  import fnmatch
>      > >> -import os, sys
>      > >> +import os
>      > >> +import sys
>      > >>  import optparse
>      > >>  import logging
>      > >>  import subprocess
>      > >> diff --git a/scripts/contrib/patchreview.py
>     b/scripts/contrib/patchreview.py
>      > >> index 62c509f51c..744dcfb49e 100755
>      > >> --- a/scripts/contrib/patchreview.py
>      > >> +++ b/scripts/contrib/patchreview.py
>      > >> @@ -40,7 +40,8 @@ def blame_patch(patch):
>      > >>                                      "--",
>     patch)).decode("utf-8").splitlines()
>      > >>
>      > >>  def patchreview(path, patches):
>      > >> -    import re, os.path
>      > >> +    import re
>      > >> +    import os.path
>      > >>
>      > >>      # General pattern: start of line, optional whitespace,
>     tag with optional
>      > >>      # hyphen or spaces, maybe a colon, some whitespace, then
>     the value, all case
>      > >> @@ -198,7 +199,9 @@ def histogram(results):
>      > >>
>      > >>
>      > >>  if __name__ == "__main__":
>      > >> -    import argparse, subprocess, os
>      > >> +    import argparse
>      > >> +    import subprocess
>      > >> +    import os
>      > >>
>      > >>      args = argparse.ArgumentParser(description="Patch Review
>     Tool")
>      > >>      args.add_argument("-b", "--blame", action="store_true",
>     help="show blame for malformed patches")
>      > >> @@ -213,7 +216,9 @@ if __name__ == "__main__":
>      > >>      analyse(results, want_blame=args.blame, verbose=args.verbose)
>      > >>
>      > >>      if args.json:
>      > >> -        import json, os.path, collections
>      > >> +        import json
>      > >> +        import os.path
>      > >> +        import collections
>      > >>          if os.path.isfile(args.json):
>      > >>              data = json.load(open(args.json))
>      > >>          else:
>      > >> diff --git a/scripts/lnr b/scripts/lnr
>      > >> index a2ac4fec0f..e223b1e0e6 100755
>      > >> --- a/scripts/lnr
>      > >> +++ b/scripts/lnr
>      > >> @@ -6,7 +6,8 @@
>      > >>  # Create a *relative* symlink, just like ln --relative does
>     but without needing
>      > >>  # coreutils 8.16.
>      > >>
>      > >> -import sys, os
>      > >> +import sys
>      > >> +import os
>      > >>
>      > >>  if len(sys.argv) != 3:
>      > >>     print("$ lnr TARGET LINK_NAME")
>      > >> diff --git a/scripts/oe-pkgdata-browser
>     b/scripts/oe-pkgdata-browser
>      > >> index 8d223185a4..5834f59845 100755
>      > >> --- a/scripts/oe-pkgdata-browser
>      > >> +++ b/scripts/oe-pkgdata-browser
>      > >> @@ -1,6 +1,9 @@
>      > >>  #! /usr/bin/env python3
>      > >>
>      > >> -import os, sys, enum, ast
>      > >> +import os
>      > >> +import sys
>      > >> +import enum
>      > >> +import ast
>      > >>
>      > >>  scripts_path = os.path.dirname(os.path.realpath(__file__))
>      > >>  lib_path = scripts_path + '/lib'
>      > >> diff --git
>     a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>     b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>      > >> index 00fb3bf797..c005cf341f 100644
>      > >> --- a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>      > >> +++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>      > >> @@ -1,4 +1,9 @@
>      > >> -import sys, os, re, struct, operator, math
>      > >> +import sys
>      > >> +import os
>      > >> +import re
>      > >> +import struct
>      > >> +import operator
>      > >> +import math
>      > >>  from collections import defaultdict
>      > >>  import unittest
>      > >>
>      > >> diff --git a/scripts/send-error-report b/scripts/send-error-report
>      > >> index cfbcaa52cb..ffa0a199b1 100755
>      > >> --- a/scripts/send-error-report
>      > >> +++ b/scripts/send-error-report
>      > >> @@ -10,7 +10,8 @@
>      > >>  # SPDX-License-Identifier: GPL-2.0-only
>      > >>  #
>      > >>
>      > >> -import urllib.request, urllib.error
>      > >> +import urllib.request
>      > >> +import urllib.error
>      > >>  import sys
>      > >>  import json
>      > >>  import os
>      > >> diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
>      > >> index 14d8c298e9..a63f6c8115 100755
>      > >> --- a/scripts/verify-bashisms
>      > >> +++ b/scripts/verify-bashisms
>      > >> @@ -3,7 +3,11 @@
>      > >>  # SPDX-License-Identifier: GPL-2.0-only
>      > >>  #
>      > >>
>      > >> -import sys, os, subprocess, re, shutil
>      > >> +import sys
>      > >> +import os
>      > >> +import subprocess
>      > >> +import re
>      > >> +import shutil
>      > >>
>      > >>  whitelist = (
>      > >>      # type is supported by dash
>      > >> @@ -92,7 +96,8 @@ def get_tinfoil():
>      > >>      return tinfoil
>      > >>
>      > >>  if __name__=='__main__':
>      > >> -    import argparse, shutil
>      > >> +    import argparse
>      > >> +    import shutil
>      > >>
>      > >>      parser = argparse.ArgumentParser(description='Bashim
>     detector for shell fragments in recipes.')
>      > >>      parser.add_argument("recipes", metavar="RECIPE",
>     nargs="*", help="recipes to check (if not specified, all will be
>     checked)")
>      > >> --
>      > >> 2.32.0
>      > >>
>      > >>
>      > >> 
>      > >>
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core] [PATCH 1/8] PEP8 double aggressive E401
  2021-06-28 21:08             ` Khem Raj
@ 2021-06-28 21:14               ` Richard Purdie
  0 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2021-06-28 21:14 UTC (permalink / raw)
  To: Khem Raj, Alexander Kanavin; +Cc: Persian Prince, OE-core

On Mon, 2021-06-28 at 14:08 -0700, Khem Raj wrote:
> 
> On 6/28/21 12:47 PM, Alexander Kanavin wrote:
> > I just generally disagree with the idea that changing a = b to a=b, or 
> > import a,b to import a\nimport b helps readability or reduces confusion.
> 
> I understand that this seems change for change's sake. Consistent coding
> formatting goes long way in improving quality of code and reviews too. 
> this also help folks who are new to project due to it being a familiar 
> format.
> 
> > 
> > I'm reading a lot of python code all the time, and never once have been 
> > confused by inconsistent whitespace.
> > 
> > Can the linter fix anything else, which has actual benefit?
> > 
> 
> linters always find interesting issues all the time, however the payoff 
> only happens once code is clean enough to run them. otherwise looking 
> through tonne of issues you want to ignore is manual effort and can not 
> be sustained.
> 
> Persian Prince,
> 
> I think it would be better if we have a selftest to run linter on AB
> to have this effort sustained in general.

We do have it run on the AB:

https://autobuilder.yocto.io/pub/non-release/20210628-15/testresults/oe-selftest-debian/pylint.log

We disabled a number of the warnings we were not interested in and haven't
had the time to investigate the other more important issues it flags (as yet).

Cheers,

Richard


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core] [PATCH 1/8] PEP8 double aggressive E401
  2021-06-28 19:47           ` Alexander Kanavin
  2021-06-28 21:08             ` Khem Raj
@ 2021-06-29  2:26             ` Chen Qi
  1 sibling, 0 replies; 16+ messages in thread
From: Chen Qi @ 2021-06-29  2:26 UTC (permalink / raw)
  To: Alexander Kanavin, Khem Raj; +Cc: Persian Prince, OE-core

[-- Attachment #1: Type: text/plain, Size: 31779 bytes --]

On 06/29/2021 03:47 AM, Alexander Kanavin wrote:
> I just generally disagree with the idea that changing a = b to a=b, or 
> import a,b to import a\nimport b helps readability or reduces confusion.
>

Writing 'a =b' is acceptable, as it's not causing runtime problem. 
However, keeping a consistent 'a=b' is better. Isn't it?
Just think about writing 'a= b'? Is it acceptable?
I think patches to make codes have a consistent style are good.

> I'm reading a lot of python code all the time, and never once have 
> been confused by inconsistent whitespace.
>

No one confuses. But consistent codes give people better impression.

> Can the linter fix anything else, which has actual benefit?
>

Keeping codes in the same style is the actual benefit.

People might not have time to do the check and send out patches, but if 
someone has already done that and sent out patches, why not accept the 
patches?

Best Regards,
Chen Qi

> Alex
>
> On Mon, 28 Jun 2021 at 21:41, Khem Raj <raj.khem@gmail.com 
> <mailto:raj.khem@gmail.com>> wrote:
>
>     On Mon, Jun 28, 2021 at 12:25 PM Persian Prince
>     <persianpros@yahoo.com <mailto:persianpros@yahoo.com>> wrote:
>     >
>     > When we can follow PEP8 we should as it's how developers could
>     follow a common coding style and avoid creating different files.
>     >
>     > In "Safe PEP8" PRs some PEP8 codes carefully added so it won't
>     change tabs to spaces but makes the code cleaner in a safe way.
>     PEP8 also fixes some small problems (won't do huge changes like
>     futurize) which is good and sometime we miss them by mistake.
>     >
>     > We at https://github.com/OpenVisionE2
>     <https://urldefense.com/v3/__https://github.com/OpenVisionE2__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6QWMweTw$>
>     , https://github.com/oe-alliance
>     <https://urldefense.com/v3/__https://github.com/oe-alliance__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6ROP1INw$>
>     and https://github.com/OpenPLi
>     <https://urldefense.com/v3/__https://github.com/OpenPLi__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7D6O7-Kg$>
>     applied safe PEP8 changes to so many repositories and we're using
>     it via PEP8.sh
>     <https://urldefense.com/v3/__http://PEP8.sh__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy4ewWfxFw$>
>     on GitHub Actions as an online cleaner tool. (PEP8.sh
>     <https://urldefense.com/v3/__http://PEP8.sh__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy4ewWfxFw$>:
>     https://github.com/OpenVisionE2/enigma2-openvision/blob/develop/CI/PEP8.sh
>     <https://urldefense.com/v3/__https://github.com/OpenVisionE2/enigma2-openvision/blob/develop/CI/PEP8.sh__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7J7fBYZQ$>)
>     >
>     > Also applied before on
>     https://github.com/openembedded/meta-openembedded
>     <https://urldefense.com/v3/__https://github.com/openembedded/meta-openembedded__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy4qmKWVZQ$>
>     which is why that repo is clean and won't need a PR (for now),
>     keep in mind that these are common standards so even if we don't
>     like them that much still they help for having a good common style
>     and less mistakes.
>     >
>     > If you needed more assistance from me please don't hesitate to
>     ask, I'm all in.
>
>
>     can you improve the commit msgs in pull request as asked.
>
>     >
>     > Regards,
>     > Persian Prince
>     >
>     > On Monday, June 28, 2021, 10:56:40 AM GMT+4:30, Alexander
>     Kanavin <alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>>
>     wrote:
>     >
>     >
>     > Right, but can you please write something more descriptive than
>     "PEP8 double aggressive W291 ~ W293 and W391" ?
>     >
>     > Also I'm not sure fiddling about with whitespace or whether
>     imports all need their own line really helps.
>     >
>     > Alex
>     >
>     > On Mon, 28 Jun 2021 at 08:16, Khem Raj <raj.khem@gmail.com
>     <mailto:raj.khem@gmail.com>> wrote:
>     >
>     > On Sun, Jun 27, 2021 at 11:13 PM Alexander Kanavin
>     > <alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>> wrote:
>     > >
>     > > Wait, what is this patchset all about?
>     > >
>     >
>     > its fixes for python linter (pylint) found issues.
>     >
>     > > Alex
>     > >
>     > > On Mon, 28 Jun 2021 at 07:59, Khem Raj <raj.khem@gmail.com
>     <mailto:raj.khem@gmail.com>> wrote:
>     > >>
>     > >> From: persianpros <persianpros@yahoo.com
>     <mailto:persianpros@yahoo.com>>
>     > >>
>     > >> Signed-off-by: Khem Raj <raj.khem@gmail.com
>     <mailto:raj.khem@gmail.com>>
>     > >> ---
>     > >>  meta/lib/oe/package.py       |  9 +++++++--
>     > >>  meta/lib/oe/qa.py        |  4 +++-
>     > >>  meta/lib/oe/utils.py       |  6 ++++--
>     > >>  meta/lib/oeqa/oetest.py        |  4 +++-
>     > >>  meta/lib/oeqa/sdk/case.py        |  3 ++-
>     > >>  meta/lib/oeqa/sdk/cases/buildlzip.py       |  5 ++++-
>     > >>  meta/lib/oeqa/sdk/cases/python.py        |  3 ++-
>     > >>  meta/lib/oeqa/sdk/testsdk.py       |  3 ++-
>     > >>  meta/lib/oeqa/selftest/cases/oelib/path.py       |  3 ++-
>     > >>  meta/lib/oeqa/selftest/cases/package.py        |  7 +++++--
>     > >>  meta/lib/oeqa/selftest/cases/runtime_test.py       |  3 ++-
>     > >>  meta/lib/oeqa/utils/testexport.py        |  6 +++++-
>     > >> .../texinfo-dummy-native/texinfo-dummy/template.py    |  4 +++-
>     > >>  scripts/combo-layer        |  3 ++-
>     > >>  scripts/contrib/patchreview.py       | 11 ++++++++---
>     > >>  scripts/lnr        |  3 ++-
>     > >>  scripts/oe-pkgdata-browser       |  5 ++++-
>     > >>  .../pybootchartgui/tests/parser_test.py        |  7 ++++++-
>     > >>  scripts/send-error-report        |  3 ++-
>     > >>  scripts/verify-bashisms        |  9 +++++++--
>     > >>  20 files changed, 75 insertions(+), 26 deletions(-)
>     > >>
>     > >> diff --git a/meta/lib/oe/package.py
>     <https://urldefense.com/v3/__http://package.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6Xt2kV5g$>
>     b/meta/lib/oe/package.py
>     <https://urldefense.com/v3/__http://package.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6Xt2kV5g$>
>     > >> index dd700cbb0c..fc5408d5f8 100644
>     > >> --- a/meta/lib/oe/package.py
>     <https://urldefense.com/v3/__http://package.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6Xt2kV5g$>
>     > >> +++ b/meta/lib/oe/package.py
>     <https://urldefense.com/v3/__http://package.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6Xt2kV5g$>
>     > >> @@ -107,7 +107,10 @@ def strip_execs(pn, dstdir, strip_cmd,
>     libdir, base_libdir, d, qa_already_stripp
>     > >>      :param qa_already_stripped: Set to True if
>     already-stripped' in ${INSANE_SKIP}
>     > >>      This is for proper logging and messages only.
>     > >>      """
>     > >> -    import stat, errno, oe.path, oe.utils
>     > >> +    import stat
>     > >> +    import errno
>     > >> +    import oe.path
>     > >> +    import oe.utils
>     > >>
>     > >>      elffiles = {}
>     > >>      inodes = {}
>     > >> @@ -187,7 +190,9 @@ def file_translate(file):
>     > >>      return ft
>     > >>
>     > >>  def filedeprunner(arg):
>     > >> -    import re, subprocess, shlex
>     > >> +    import re
>     > >> +    import subprocess
>     > >> +    import shlex
>     > >>
>     > >>      (pkg, pkgfiles, rpmdeps, pkgdest) = arg
>     > >>      provides = {}
>     > >> diff --git a/meta/lib/oe/qa.py
>     <https://urldefense.com/v3/__http://qa.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6YqI4STw$>
>     b/meta/lib/oe/qa.py
>     <https://urldefense.com/v3/__http://qa.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6YqI4STw$>
>     > >> index e8a854a302..38c2e0cc1c 100644
>     > >> --- a/meta/lib/oe/qa.py
>     <https://urldefense.com/v3/__http://qa.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6YqI4STw$>
>     > >> +++ b/meta/lib/oe/qa.py
>     <https://urldefense.com/v3/__http://qa.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6YqI4STw$>
>     > >> @@ -2,7 +2,9 @@
>     > >>  # SPDX-License-Identifier: GPL-2.0-only
>     > >>  #
>     > >>
>     > >> -import os, struct, mmap
>     > >> +import os
>     > >> +import struct
>     > >> +import mmap
>     > >>
>     > >>  class NotELFFileError(Exception):
>     > >>      pass
>     > >> diff --git a/meta/lib/oe/utils.py
>     <https://urldefense.com/v3/__http://utils.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6STLfBVA$>
>     b/meta/lib/oe/utils.py
>     <https://urldefense.com/v3/__http://utils.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6STLfBVA$>
>     > >> index a84039f585..789bad33f6 100644
>     > >> --- a/meta/lib/oe/utils.py
>     <https://urldefense.com/v3/__http://utils.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6STLfBVA$>
>     > >> +++ b/meta/lib/oe/utils.py
>     <https://urldefense.com/v3/__http://utils.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6STLfBVA$>
>     > >> @@ -376,7 +376,8 @@ def format_pkg_list(pkg_dict,
>     ret_format=None):
>     > >>  # Helper function to get the host compiler version
>     > >>  # Do not assume the compiler is gcc
>     > >>  def get_host_compiler_version(d, taskcontextonly=False):
>     > >> -    import re, subprocess
>     > >> +    import re
>     > >> +    import subprocess
>     > >>
>     > >>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
>     > >>          return
>     > >> @@ -404,7 +405,8 @@ def get_host_compiler_version(d,
>     taskcontextonly=False):
>     > >>
>     > >>
>     > >>  def host_gcc_version(d, taskcontextonly=False):
>     > >> -    import re, subprocess
>     > >> +    import re
>     > >> +    import subprocess
>     > >>
>     > >>      if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
>     > >>          return
>     > >> diff --git a/meta/lib/oeqa/oetest.py
>     <https://urldefense.com/v3/__http://oetest.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6scn-4-A$>
>     b/meta/lib/oeqa/oetest.py
>     <https://urldefense.com/v3/__http://oetest.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6scn-4-A$>
>     > >> index 9c84466dd0..3136ac2ce5 100644
>     > >> --- a/meta/lib/oeqa/oetest.py
>     <https://urldefense.com/v3/__http://oetest.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6scn-4-A$>
>     > >> +++ b/meta/lib/oeqa/oetest.py
>     <https://urldefense.com/v3/__http://oetest.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6scn-4-A$>
>     > >> @@ -9,7 +9,9 @@
>     > >>
>     > >>  # It also has some helper functions and it's responsible for
>     actually starting the tests
>     > >>
>     > >> -import os, re, sys
>     > >> +import os
>     > >> +import re
>     > >> +import sys
>     > >>  import unittest
>     > >>  import inspect
>     > >>  import subprocess
>     > >> diff --git a/meta/lib/oeqa/sdk/case.py
>     <https://urldefense.com/v3/__http://case.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7BrLqZVA$>
>     b/meta/lib/oeqa/sdk/case.py
>     <https://urldefense.com/v3/__http://case.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7BrLqZVA$>
>     > >> index c45882689c..86ac199197 100644
>     > >> --- a/meta/lib/oeqa/sdk/case.py
>     <https://urldefense.com/v3/__http://case.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7BrLqZVA$>
>     > >> +++ b/meta/lib/oeqa/sdk/case.py
>     <https://urldefense.com/v3/__http://case.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7BrLqZVA$>
>     > >> @@ -35,7 +35,8 @@ class OESDKTestCase(OETestCase):
>     > >>          OS/architecture, or if not specified the currently
>     configured MACHINE's
>     > >>          OS/architecture.
>     > >>          """
>     > >> -        import oe.qa
>     <https://urldefense.com/v3/__http://oe.qa__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7-ldEI_g$>,
>     oe.elf
>     > >> +        import oe.qa
>     <https://urldefense.com/v3/__http://oe.qa__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7-ldEI_g$>
>     > >> +        import oe.elf
>     > >>
>     > >>          if not target_os or not target_arch:
>     > >>              output = self._run("echo
>     $OECORE_TARGET_OS:$OECORE_TARGET_ARCH")
>     > >> diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py
>     <https://urldefense.com/v3/__http://buildlzip.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5l5mkGMQ$>
>     b/meta/lib/oeqa/sdk/cases/buildlzip.py
>     <https://urldefense.com/v3/__http://buildlzip.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5l5mkGMQ$>
>     > >> index 49ae756bf3..04c4a0ec16 100644
>     > >> --- a/meta/lib/oeqa/sdk/cases/buildlzip.py
>     <https://urldefense.com/v3/__http://buildlzip.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5l5mkGMQ$>
>     > >> +++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
>     <https://urldefense.com/v3/__http://buildlzip.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5l5mkGMQ$>
>     > >> @@ -2,7 +2,10 @@
>     > >>  # SPDX-License-Identifier: MIT
>     > >>  #
>     > >>
>     > >> -import os, tempfile, subprocess, unittest
>     > >> +import os
>     > >> +import tempfile
>     > >> +import subprocess
>     > >> +import unittest
>     > >>  from oeqa.sdk.case
>     <https://urldefense.com/v3/__http://oeqa.sdk.case__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5Gb-vXpQ$>
>     import OESDKTestCase
>     > >>  from oeqa.utils.subprocesstweak import errors_have_output
>     > >>  errors_have_output()
>     > >> diff --git a/meta/lib/oeqa/sdk/cases/python.py
>     <https://urldefense.com/v3/__http://python.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy537RZTpg$>
>     b/meta/lib/oeqa/sdk/cases/python.py
>     <https://urldefense.com/v3/__http://python.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy537RZTpg$>
>     > >> index a334abce5f..2848481f33 100644
>     > >> --- a/meta/lib/oeqa/sdk/cases/python.py
>     <https://urldefense.com/v3/__http://python.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy537RZTpg$>
>     > >> +++ b/meta/lib/oeqa/sdk/cases/python.py
>     <https://urldefense.com/v3/__http://python.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy537RZTpg$>
>     > >> @@ -2,7 +2,8 @@
>     > >>  # SPDX-License-Identifier: MIT
>     > >>  #
>     > >>
>     > >> -import subprocess, unittest
>     > >> +import subprocess
>     > >> +import unittest
>     > >>  from oeqa.sdk.case
>     <https://urldefense.com/v3/__http://oeqa.sdk.case__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5Gb-vXpQ$>
>     import OESDKTestCase
>     > >>
>     > >>  from oeqa.utils.subprocesstweak import errors_have_output
>     > >> diff --git a/meta/lib/oeqa/sdk/testsdk.py
>     <https://urldefense.com/v3/__http://testsdk.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5SgZYgvA$>
>     b/meta/lib/oeqa/sdk/testsdk.py
>     <https://urldefense.com/v3/__http://testsdk.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5SgZYgvA$>
>     > >> index 35e40187bc..18e03cb8ef 100644
>     > >> --- a/meta/lib/oeqa/sdk/testsdk.py
>     <https://urldefense.com/v3/__http://testsdk.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5SgZYgvA$>
>     > >> +++ b/meta/lib/oeqa/sdk/testsdk.py
>     <https://urldefense.com/v3/__http://testsdk.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5SgZYgvA$>
>     > >> @@ -95,7 +95,8 @@ class TestSDK(TestSDKBase):
>     > >>          processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or
>     d.getVar("BB_NUMBER_THREADS")
>     > >>          if processes:
>     > >>              try:
>     > >> -                import testtools, subunit
>     > >> +                import testtools
>     > >> +                import subunit
>     > >>              except ImportError:
>     > >>                  bb.warn("Failed to import testtools or
>     subunit, the testcases will run serially")
>     > >>                  processes = None
>     > >> diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py
>     <https://urldefense.com/v3/__http://path.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5tKYWegg$>
>     b/meta/lib/oeqa/selftest/cases/oelib/path.py
>     <https://urldefense.com/v3/__http://path.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5tKYWegg$>
>     > >> index a1cfa08c09..098734fa5d 100644
>     > >> --- a/meta/lib/oeqa/selftest/cases/oelib/path.py
>     <https://urldefense.com/v3/__http://path.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5tKYWegg$>
>     > >> +++ b/meta/lib/oeqa/selftest/cases/oelib/path.py
>     <https://urldefense.com/v3/__http://path.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5tKYWegg$>
>     > >> @@ -3,7 +3,8 @@
>     > >>  #
>     > >>
>     > >>  from unittest.case
>     <https://urldefense.com/v3/__http://unittest.case__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5hDRSoKA$>
>     import TestCase
>     > >> -import oe, oe.path
>     > >> +import oe
>     > >> +import oe.path
>     > >>  import tempfile
>     > >>  import os
>     > >>  import errno
>     > >> diff --git a/meta/lib/oeqa/selftest/cases/package.py
>     <https://urldefense.com/v3/__http://package.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6Xt2kV5g$>
>     b/meta/lib/oeqa/selftest/cases/package.py
>     <https://urldefense.com/v3/__http://package.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6Xt2kV5g$>
>     > >> index 7166c3991f..82aa1bde1c 100644
>     > >> --- a/meta/lib/oeqa/selftest/cases/package.py
>     <https://urldefense.com/v3/__http://package.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6Xt2kV5g$>
>     > >> +++ b/meta/lib/oeqa/selftest/cases/package.py
>     <https://urldefense.com/v3/__http://package.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6Xt2kV5g$>
>     > >> @@ -5,7 +5,8 @@
>     > >>  from oeqa.selftest.case
>     <https://urldefense.com/v3/__http://oeqa.selftest.case__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7DFFrF-g$>
>     import OESelftestTestCase
>     > >>  from oeqa.utils.commands import bitbake, get_bb_vars,
>     get_bb_var, runqemu
>     > >>  import stat
>     > >> -import subprocess, os
>     > >> +import subprocess
>     > >> +import os
>     > >>  import oe.path
>     > >>  import re
>     > >>
>     > >> @@ -150,7 +151,9 @@ class PackageTests(OESelftestTestCase):
>     > >>                      self.fail('GDB %s failed' % binary)
>     > >>
>     > >>      def test_preserve_ownership(self):
>     > >> -        import os, stat, oe.cachedpath
>     > >> +        import os
>     > >> +        import stat
>     > >> +        import oe.cachedpath
>     > >>          features = 'IMAGE_INSTALL_append = " selftest-chown"\n'
>     > >>          self.write_config(features)
>     > >>          bitbake("core-image-minimal")
>     > >> diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py
>     <https://urldefense.com/v3/__http://runtime_test.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7K5nXSVA$>
>     b/meta/lib/oeqa/selftest/cases/runtime_test.py
>     <https://urldefense.com/v3/__http://runtime_test.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7K5nXSVA$>
>     > >> index d0c2440722..54a80dfdc0 100644
>     > >> --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
>     <https://urldefense.com/v3/__http://runtime_test.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7K5nXSVA$>
>     > >> +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
>     <https://urldefense.com/v3/__http://runtime_test.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy7K5nXSVA$>
>     > >> @@ -211,7 +211,8 @@ class TestImage(OESelftestTestCase):
>     > >>          Product: oe-core
>     > >>          Author: Alexander Kanavin <alex.kanavin@gmail.com
>     <mailto:alex.kanavin@gmail.com>>
>     > >>          """
>     > >> -        import subprocess, os
>     > >> +        import subprocess
>     > >> +        import os
>     > >>          try:
>     > >>              content = os.listdir("/dev/dri")
>     > >>              if len([i for i in content if
>     i.startswith('render')]) == 0:
>     > >> diff --git a/meta/lib/oeqa/utils/testexport.py
>     <https://urldefense.com/v3/__http://testexport.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy44sHiuPg$>
>     b/meta/lib/oeqa/utils/testexport.py
>     <https://urldefense.com/v3/__http://testexport.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy44sHiuPg$>
>     > >> index e89d130a9c..383e57a6b2 100644
>     > >> --- a/meta/lib/oeqa/utils/testexport.py
>     <https://urldefense.com/v3/__http://testexport.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy44sHiuPg$>
>     > >> +++ b/meta/lib/oeqa/utils/testexport.py
>     <https://urldefense.com/v3/__http://testexport.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy44sHiuPg$>
>     > >> @@ -6,7 +6,11 @@
>     > >>
>     > >>  # Provides functions to help with exporting binaries
>     obtained from built targets
>     > >>
>     > >> -import os, re, glob as g, shutil as sh,sys
>     > >> +import os
>     > >> +import re
>     > >> +import glob as g
>     > >> +import shutil as sh
>     > >> +import sys
>     > >>  from time import sleep
>     > >>  from .commands import runCmd
>     > >>  from difflib import SequenceMatcher as SM
>     > >> diff --git
>     a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>     <https://urldefense.com/v3/__http://template.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy46Kyz-6A$>
>     b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>     <https://urldefense.com/v3/__http://template.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy46Kyz-6A$>
>     > >> index 86c7c1811a..75c01b83bf 100644
>     > >> ---
>     a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>     <https://urldefense.com/v3/__http://template.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy46Kyz-6A$>
>     > >> +++
>     b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
>     <https://urldefense.com/v3/__http://template.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy46Kyz-6A$>
>     > >> @@ -28,7 +28,9 @@
>     > >>  # of the executable from argv[0] and emulate the
>     corresponding program, so
>     > >>  # multiple copies of this script will exist under different
>     names.
>     > >>
>     > >> -import sys, os, argparse
>     > >> +import sys
>     > >> +import os
>     > >> +import argparse
>     > >>
>     > >>
>     > >>  this_binary = sys.argv[0].split("/")[-1]
>     > >> diff --git a/scripts/combo-layer b/scripts/combo-layer
>     > >> index 045de65642..835a6bcd09 100755
>     > >> --- a/scripts/combo-layer
>     > >> +++ b/scripts/combo-layer
>     > >> @@ -11,7 +11,8 @@
>     > >>  #
>     > >>
>     > >>  import fnmatch
>     > >> -import os, sys
>     > >> +import os
>     > >> +import sys
>     > >>  import optparse
>     > >>  import logging
>     > >>  import subprocess
>     > >> diff --git a/scripts/contrib/patchreview.py
>     <https://urldefense.com/v3/__http://patchreview.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5Nhshvrg$>
>     b/scripts/contrib/patchreview.py
>     <https://urldefense.com/v3/__http://patchreview.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5Nhshvrg$>
>     > >> index 62c509f51c..744dcfb49e 100755
>     > >> --- a/scripts/contrib/patchreview.py
>     <https://urldefense.com/v3/__http://patchreview.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5Nhshvrg$>
>     > >> +++ b/scripts/contrib/patchreview.py
>     <https://urldefense.com/v3/__http://patchreview.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy5Nhshvrg$>
>     > >> @@ -40,7 +40,8 @@ def blame_patch(patch):
>     > >>                                      "--",
>     patch)).decode("utf-8").splitlines()
>     > >>
>     > >>  def patchreview(path, patches):
>     > >> -    import re, os.path
>     > >> +    import re
>     > >> +    import os.path
>     > >>
>     > >>      # General pattern: start of line, optional whitespace,
>     tag with optional
>     > >>      # hyphen or spaces, maybe a colon, some whitespace, then
>     the value, all case
>     > >> @@ -198,7 +199,9 @@ def histogram(results):
>     > >>
>     > >>
>     > >>  if __name__ == "__main__":
>     > >> -    import argparse, subprocess, os
>     > >> +    import argparse
>     > >> +    import subprocess
>     > >> +    import os
>     > >>
>     > >>      args = argparse.ArgumentParser(description="Patch Review
>     Tool")
>     > >>      args.add_argument("-b", "--blame", action="store_true",
>     help="show blame for malformed patches")
>     > >> @@ -213,7 +216,9 @@ if __name__ == "__main__":
>     > >>      analyse(results, want_blame=args.blame,
>     verbose=args.verbose)
>     > >>
>     > >>      if args.json:
>     > >> -        import json, os.path, collections
>     > >> +        import json
>     > >> +        import os.path
>     > >> +        import collections
>     > >>          if os.path.isfile(args.json):
>     > >>              data = json.load(open(args.json))
>     > >>          else:
>     > >> diff --git a/scripts/lnr b/scripts/lnr
>     > >> index a2ac4fec0f..e223b1e0e6 100755
>     > >> --- a/scripts/lnr
>     > >> +++ b/scripts/lnr
>     > >> @@ -6,7 +6,8 @@
>     > >>  # Create a *relative* symlink, just like ln --relative does
>     but without needing
>     > >>  # coreutils 8.16.
>     > >>
>     > >> -import sys, os
>     > >> +import sys
>     > >> +import os
>     > >>
>     > >>  if len(sys.argv) != 3:
>     > >>     print("$ lnr TARGET LINK_NAME")
>     > >> diff --git a/scripts/oe-pkgdata-browser
>     b/scripts/oe-pkgdata-browser
>     > >> index 8d223185a4..5834f59845 100755
>     > >> --- a/scripts/oe-pkgdata-browser
>     > >> +++ b/scripts/oe-pkgdata-browser
>     > >> @@ -1,6 +1,9 @@
>     > >>  #! /usr/bin/env python3
>     > >>
>     > >> -import os, sys, enum, ast
>     > >> +import os
>     > >> +import sys
>     > >> +import enum
>     > >> +import ast
>     > >>
>     > >>  scripts_path = os.path.dirname(os.path.realpath(__file__))
>     > >>  lib_path = scripts_path + '/lib'
>     > >> diff --git
>     a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>     <https://urldefense.com/v3/__http://parser_test.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6G5tNwpg$>
>     b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>     <https://urldefense.com/v3/__http://parser_test.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6G5tNwpg$>
>     > >> index 00fb3bf797..c005cf341f 100644
>     > >> ---
>     a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>     <https://urldefense.com/v3/__http://parser_test.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6G5tNwpg$>
>     > >> +++
>     b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py
>     <https://urldefense.com/v3/__http://parser_test.py__;%21%21AjveYdw8EvQ%21PBX2J1bie151wgwFSbZUcI0qMyKeL9qCOvFK7-S2MSM0PswWdDWS-j40Sy6G5tNwpg$>
>     > >> @@ -1,4 +1,9 @@
>     > >> -import sys, os, re, struct, operator, math
>     > >> +import sys
>     > >> +import os
>     > >> +import re
>     > >> +import struct
>     > >> +import operator
>     > >> +import math
>     > >>  from collections import defaultdict
>     > >>  import unittest
>     > >>
>     > >> diff --git a/scripts/send-error-report
>     b/scripts/send-error-report
>     > >> index cfbcaa52cb..ffa0a199b1 100755
>     > >> --- a/scripts/send-error-report
>     > >> +++ b/scripts/send-error-report
>     > >> @@ -10,7 +10,8 @@
>     > >>  # SPDX-License-Identifier: GPL-2.0-only
>     > >>  #
>     > >>
>     > >> -import urllib.request, urllib.error
>     > >> +import urllib.request
>     > >> +import urllib.error
>     > >>  import sys
>     > >>  import json
>     > >>  import os
>     > >> diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
>     > >> index 14d8c298e9..a63f6c8115 100755
>     > >> --- a/scripts/verify-bashisms
>     > >> +++ b/scripts/verify-bashisms
>     > >> @@ -3,7 +3,11 @@
>     > >>  # SPDX-License-Identifier: GPL-2.0-only
>     > >>  #
>     > >>
>     > >> -import sys, os, subprocess, re, shutil
>     > >> +import sys
>     > >> +import os
>     > >> +import subprocess
>     > >> +import re
>     > >> +import shutil
>     > >>
>     > >>  whitelist = (
>     > >>      # type is supported by dash
>     > >> @@ -92,7 +96,8 @@ def get_tinfoil():
>     > >>      return tinfoil
>     > >>
>     > >>  if __name__=='__main__':
>     > >> -    import argparse, shutil
>     > >> +    import argparse
>     > >> +    import shutil
>     > >>
>     > >>      parser = argparse.ArgumentParser(description='Bashim
>     detector for shell fragments in recipes.')
>     > >>      parser.add_argument("recipes", metavar="RECIPE",
>     nargs="*", help="recipes to check (if not specified, all will be
>     checked)")
>     > >> --
>     > >> 2.32.0
>     > >>
>     > >>
>     > >>
>     > >>
>
>
>
> 
>


[-- Attachment #2: Type: text/html, Size: 49005 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-06-29  2:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28  5:59 [PATCH 1/8] PEP8 double aggressive E401 Khem Raj
2021-06-28  5:59 ` [PATCH 2/8] PEP8 double aggressive E701, E70 and E502 Khem Raj
2021-06-28  5:59 ` [PATCH 3/8] PEP8 double aggressive E251 and E252 Khem Raj
2021-06-28  5:59 ` [PATCH 4/8] PEP8 double aggressive E20 and E211 Khem Raj
2021-06-28  5:59 ` [PATCH 5/8] PEP8 double aggressive E22, E224, E241, E242 and E27 Khem Raj
2021-06-28  5:59 ` [PATCH 6/8] PEP8 double aggressive E225 ~ E228 and E231 Khem Raj
2021-06-28  5:59 ` [PATCH 7/8] PEP8 double aggressive E301 ~ E306 Khem Raj
2021-06-28  5:59 ` [PATCH 8/8] PEP8 double aggressive W291 ~ W293 and W391 Khem Raj
2021-06-28  6:12 ` [OE-core] [PATCH 1/8] PEP8 double aggressive E401 Alexander Kanavin
2021-06-28  6:16   ` Khem Raj
2021-06-28  6:20     ` Alexander Kanavin
     [not found]       ` <1709447933.2675529.1624908347132@mail.yahoo.com>
2021-06-28 19:41         ` Khem Raj
2021-06-28 19:47           ` Alexander Kanavin
2021-06-28 21:08             ` Khem Raj
2021-06-28 21:14               ` Richard Purdie
2021-06-29  2:26             ` Chen Qi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.