forked from platformio/platformio-core
Update to iSort 5.0
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
[settings]
|
[settings]
|
||||||
line_length=88
|
line_length=88
|
||||||
known_third_party=OpenSSL, SCons, autobahn, jsonrpc, twisted, zope
|
known_third_party=OpenSSL, SCons, jsonrpc, twisted, zope
|
||||||
|
4
Makefile
4
Makefile
@@ -3,8 +3,8 @@ lint:
|
|||||||
pylint -j 6 --rcfile=./.pylintrc ./tests
|
pylint -j 6 --rcfile=./.pylintrc ./tests
|
||||||
|
|
||||||
isort:
|
isort:
|
||||||
isort -rc ./platformio
|
isort ./platformio
|
||||||
isort -rc ./tests
|
isort ./tests
|
||||||
|
|
||||||
format:
|
format:
|
||||||
black --target-version py27 ./platformio
|
black --target-version py27 ./platformio
|
||||||
|
@@ -37,6 +37,8 @@ class PlatformFactory(object):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def new(cls, pkg_or_spec):
|
def new(cls, pkg_or_spec):
|
||||||
|
# pylint: disable=import-outside-toplevel
|
||||||
|
|
||||||
platform_dir = None
|
platform_dir = None
|
||||||
platform_name = None
|
platform_name = None
|
||||||
if isinstance(pkg_or_spec, PackageItem):
|
if isinstance(pkg_or_spec, PackageItem):
|
||||||
@@ -45,9 +47,7 @@ class PlatformFactory(object):
|
|||||||
elif os.path.isdir(pkg_or_spec):
|
elif os.path.isdir(pkg_or_spec):
|
||||||
platform_dir = pkg_or_spec
|
platform_dir = pkg_or_spec
|
||||||
else:
|
else:
|
||||||
from platformio.package.manager.platform import ( # pylint: disable=import-outside-toplevel
|
from platformio.package.manager.platform import PlatformPackageManager
|
||||||
PlatformPackageManager,
|
|
||||||
)
|
|
||||||
|
|
||||||
pkg = PlatformPackageManager().get_package(pkg_or_spec)
|
pkg = PlatformPackageManager().get_package(pkg_or_spec)
|
||||||
if not pkg:
|
if not pkg:
|
||||||
|
Reference in New Issue
Block a user