Update to iSort 5.0

This commit is contained in:
Ivan Kravets
2021-01-22 22:55:02 +02:00
parent b2c0e6a8c2
commit ddbe339541
4 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -20,7 +20,7 @@ passenv = *
usedevelop = True usedevelop = True
deps = deps =
py36,py37,py38,py39: black py36,py37,py38,py39: black
isort<5 isort
pylint pylint
pytest pytest
pytest-xdist pytest-xdist