From ddbe339541f9ccfc64e93f2cba2d847ef797fb01 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 22 Jan 2021 22:55:02 +0200 Subject: [PATCH] Update to iSort 5.0 --- .isort.cfg | 2 +- Makefile | 4 ++-- platformio/platform/factory.py | 6 +++--- tox.ini | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.isort.cfg b/.isort.cfg index de9bf40e..7d21b117 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -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 diff --git a/Makefile b/Makefile index 3ddd1e27..a73d9cba 100644 --- a/Makefile +++ b/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 diff --git a/platformio/platform/factory.py b/platformio/platform/factory.py index 0f2bd15f..1aff6709 100644 --- a/platformio/platform/factory.py +++ b/platformio/platform/factory.py @@ -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: diff --git a/tox.ini b/tox.ini index bb41a67b..ecaab77d 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ passenv = * usedevelop = True deps = py36,py37,py38,py39: black - isort<5 + isort pylint pytest pytest-xdist