From a66a7ba4743c41933d3f144b4d70bc9ce293e421 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Mon, 8 Aug 2022 21:41:52 +0200 Subject: [PATCH] Enforce 'isort' formatter --- .github/workflows/tox.yml | 3 +++ requirements/test.txt | 1 + setup.cfg | 4 ++++ tox.ini | 4 ++++ 4 files changed, 12 insertions(+) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 468fb14a..95baa637 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -66,6 +66,9 @@ jobs: - name: Install Node dependencies run: | npm install -g markdownlint-cli jshint csslint + - name: Check with isort + if: always() + run: python -m tox -e isort && git diff --exit-code - name: Check with black if: always() run: python -m tox -e black && git diff --exit-code diff --git a/requirements/test.txt b/requirements/test.txt index d38598f9..62f2c35f 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,3 +1,4 @@ coverage black +isort flake8 diff --git a/setup.cfg b/setup.cfg index 41194d3a..9d3778e0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,6 +5,10 @@ license_file = LICENSE max-line-length = 119 extend-ignore = E203 +[isort] +profile = black +line_length = 100 + [compile_catalog] statistics = True domain = messages diff --git a/tox.ini b/tox.ini index 62799a82..409399bb 100644 --- a/tox.ini +++ b/tox.ini @@ -20,6 +20,10 @@ commands= deps=-rrequirements/test.txt commands={envbindir}/black -l100 -tpy36 --skip-string-normalization mkdocs +[testenv:isort] +deps=-rrequirements/test.txt +commands={envbindir}/isort mkdocs + [testenv:flake8] deps=-rrequirements/test.txt commands={envbindir}/flake8 mkdocs