From 8a4cb1d938c36cac47e60af313d012e2f0fd8065 Mon Sep 17 00:00:00 2001 From: Jason Carver Date: Thu, 22 Sep 2022 13:38:20 -0700 Subject: [PATCH 1/3] Upgrade isort to v5 for black support --- Makefile | 2 +- setup.py | 2 +- tox.ini | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 541c166d..231b2b20 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ lint: tox -elint lint-roll: - isort --recursive tests + isort tests black {toxinidir}/ {toxinidir}/tests setup.py $(MAKE) lint diff --git a/setup.py b/setup.py index e319e3e0..1c8088af 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ extras_require = { ], "lint": [ "flake8==3.7.9", - "isort>=4.2.15,<5", + "isort>=5.10.1,<6", "mypy==0.770", "pydocstyle>=5.0.0,<6", "black>=22,<23", diff --git a/tox.ini b/tox.ini index afe023cf..d1dc3e66 100644 --- a/tox.ini +++ b/tox.ini @@ -7,12 +7,9 @@ envlist= [isort] combine_as_imports=True force_sort_within_sections=True -include_trailing_comma=True known_third_party=hypothesis,pytest known_first_party= -line_length=21 -multi_line_output=3 -use_parentheses=True +profile=black [flake8] max-line-length= 100 @@ -42,6 +39,6 @@ extras=lint commands= mypy -p --config-file {toxinidir}/mypy.ini flake8 {toxinidir}/ {toxinidir}/tests - isort --recursive --check-only --diff {toxinidir}/ {toxinidir}/tests + isort --check-only --diff {toxinidir}/ {toxinidir}/tests pydocstyle --explain {toxinidir}/ {toxinidir}/tests black --check {toxinidir}/ {toxinidir}/tests setup.py From 94eacb9c30cb84085038f1eb2991623f459114a7 Mon Sep 17 00:00:00 2001 From: Jason Carver Date: Thu, 22 Sep 2022 13:38:32 -0700 Subject: [PATCH 2/3] A couple extra tweaks for black support --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index d1dc3e66..0e5a8a1d 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ profile=black [flake8] max-line-length= 100 exclude= venv*,.tox,docs,build -ignore= +extend-ignore= E203 [testenv] usedevelop=True @@ -36,6 +36,7 @@ whitelist_externals=make [testenv:lint] basepython=python extras=lint +whitelist_externals=black commands= mypy -p --config-file {toxinidir}/mypy.ini flake8 {toxinidir}/ {toxinidir}/tests From 4bd024028b4f6e4c7bd69d610d84201b666660fa Mon Sep 17 00:00:00 2001 From: Jason Carver Date: Thu, 22 Sep 2022 13:47:14 -0700 Subject: [PATCH 3/3] Fix a copy-paste mistake from #65 toxinidir won't mean anything in a Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 231b2b20..abf94549 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ lint: lint-roll: isort tests - black {toxinidir}/ {toxinidir}/tests setup.py + black tests setup.py $(MAKE) lint test: