diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index edf343f3..2613c868 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -185,8 +185,8 @@ class LibBuilderBase(object): @property def build_dir(self): - lib_hash = hashlib.sha1(self.path if util.PY2 else self.path. - encode()).hexdigest()[:3] + lib_hash = hashlib.sha1( + self.path if util.PY2 else self.path.encode()).hexdigest()[:3] return join("$BUILD_DIR", "lib%s" % lib_hash, basename(self.path)) @property diff --git a/platformio/commands/platform.py b/platformio/commands/platform.py index cb69c453..2d007d4a 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/commands/run.py b/platformio/commands/run.py index ad4e61e0..7cac3eca 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -432,5 +432,5 @@ def calculate_project_hash(): # Fix issue with useless project rebuilding for case insensitive FS. # A case of disk drive can differ... chunks_to_str = chunks_to_str.lower() - return sha1(chunks_to_str if util.PY2 else chunks_to_str. - encode()).hexdigest() + return sha1( + chunks_to_str if util.PY2 else chunks_to_str.encode()).hexdigest() diff --git a/platformio/managers/package.py b/platformio/managers/package.py index 05f330d2..516a951c 100644 --- a/platformio/managers/package.py +++ b/platformio/managers/package.py @@ -589,8 +589,8 @@ class PkgInstallerMixin(object): target_dirname = "%s@src-%s" % ( pkg_dirname, hashlib.md5(cur_manifest['__src_url'] if util. - PY2 else cur_manifest['__src_url']. - encode()).hexdigest()) + PY2 else cur_manifest['__src_url'].encode( + )).hexdigest()) shutil.move(pkg_dir, join(self.package_dir, target_dirname)) # fix to a version elif action == 2: @@ -600,8 +600,8 @@ class PkgInstallerMixin(object): target_dirname = "%s@src-%s" % ( pkg_dirname, hashlib.md5(tmp_manifest['__src_url'] if util. - PY2 else tmp_manifest['__src_url']. - encode()).hexdigest()) + PY2 else tmp_manifest['__src_url'].encode( + )).hexdigest()) pkg_dir = join(self.package_dir, target_dirname) # remove previous/not-satisfied package diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index b2210427..851011a9 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -642,10 +642,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