Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdda646e

Browse files
chore: add an isort tox environment and run isort in CI
* Add an isort tox environment * Run the isort tox environment using --check in the Github CIhttps://pycqa.github.io/isort/
1 parent1508eb7 commitdda646e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

‎.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ jobs:
3232
run:tox -e pep8
3333
-name:Run mypy static typing checker (http://mypy-lang.org/)
3434
run:tox -e mypy
35+
-name:Run isort import order checker (https://pycqa.github.io/isort/)
36+
run:tox -e isort -- --check

‎tox.ini

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
minversion = 1.6
33
skipsdist = True
4-
envlist = py39,py38,py37,py36,pep8,black,twine-check,mypy
4+
envlist = py39,py38,py37,py36,pep8,black,twine-check,mypy,isort
55

66
[testenv]
77
passenv = GITLAB_IMAGE GITLAB_TAG
@@ -31,6 +31,14 @@ deps = -r{toxinidir}/requirements.txt
3131
commands =
3232
black {posargs} .
3333

34+
[testenv:isort]
35+
basepython = python3
36+
deps = -r{toxinidir}/requirements.txt
37+
-r{toxinidir}/test-requirements.txt
38+
isort
39+
commands =
40+
isort --dont-order-by-type {posargs} {toxinidir}
41+
3442
[testenv:twine-check]
3543
basepython = python3
3644
deps = -r{toxinidir}/requirements.txt
@@ -60,6 +68,11 @@ ignore = E203,E501,W503
6068
per-file-ignores =
6169
gitlab/v4/objects/__init__.py:F401,F403
6270

71+
[isort]
72+
profile = black
73+
multi_line_output = 3
74+
force_sort_within_sections = True
75+
6376
[testenv:docs]
6477
deps = -r{toxinidir}/rtd-requirements.txt
6578
commands = python setup.py build_sphinx

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp