diff --git a/platformio/app.py b/platformio/app.py index d3c82d25..497f096e 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -352,8 +352,8 @@ def get_cid(): pass cid = str( uuid.UUID( - bytes=hashlib.md5(str(_uid if _uid else uuid.getnode())). - digest())) + bytes=hashlib.md5(str( + _uid if _uid else uuid.getnode())).digest())) if "windows" in util.get_systype() or os.getuid() > 0: set_state_item("cid", cid) return cid diff --git a/platformio/builder/tools/pioplatform.py b/platformio/builder/tools/pioplatform.py index 9d37ae77..580f04a2 100644 --- a/platformio/builder/tools/pioplatform.py +++ b/platformio/builder/tools/pioplatform.py @@ -95,8 +95,10 @@ def LoadPioPlatform(env, variables): for key, value in variables.UnknownVariables().items(): if not key.startswith("BOARD_"): continue - env.Replace( - **{key.upper().replace("BUILD.", ""): base64.b64decode(value)}) + env.Replace(**{ + key.upper().replace("BUILD.", ""): + base64.b64decode(value) + }) return # update board manifest with a custom data diff --git a/platformio/commands/platform.py b/platformio/commands/platform.py index 4ccd65ff..017dbc85 100644 --- a/platformio/commands/platform.py +++ b/platformio/commands/platform.py @@ -365,8 +365,8 @@ def platform_update(platforms, only_packages, only_check, json_output): if not pkg_dir: continue latest = pm.outdated(pkg_dir, requirements) - if (not latest and not PlatformFactory.newPlatform(pkg_dir). - are_outdated_packages()): + if (not latest and not PlatformFactory.newPlatform( + pkg_dir).are_outdated_packages()): continue data = _get_installed_platform_data( pkg_dir, with_boards=False, expose_packages=False) diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 5f7e0adc..a2c1c795 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -633,10 +633,8 @@ class PlatformBase( # pylint: disable=too-many-public-methods if not isdir(libcore_dir): continue storages.append({ - "name": - "%s-core-%s" % (opts['package'], item), - "path": - libcore_dir + "name": "%s-core-%s" % (opts['package'], item), + "path": libcore_dir }) return storages diff --git a/platformio/util.py b/platformio/util.py index 92645a5e..777314f6 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -568,16 +568,11 @@ def get_mdns_services(): pass items.append({ - "type": - service.type, - "name": - service.name, - "ip": - ".".join([str(ord(c)) for c in service.address]), - "port": - service.port, - "properties": - properties + "type": service.type, + "name": service.name, + "ip": ".".join([str(ord(c)) for c in service.address]), + "port": service.port, + "properties": properties }) return items