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