Skip to content

Add Isort Checks for CI #5219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .githooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TOX_PARALLEL_NO_SPINNER=1,
PY_COLORS=0
start_time=`date +%s`
tox -e flake8,pylint,docstyle,black-check,twine --parallel all
./ci-scripts/displaytime.sh 'flake8,pylint,docstyle,black-check,twine' $start_time
./ci-scripts/displaytime.sh 'flake8,pylint,docstyle,black-check,isort-check,twine' $start_time
start_time=`date +%s`
tox -e sphinx,doc8 --parallel all
./ci-scripts/displaytime.sh 'sphinx,doc8' $start_time
Expand Down
1 change: 1 addition & 0 deletions requirements/tox/isort_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
isort
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ ignore =

require-code = True

[isort]
profile = black
src_paths = src,tests
skip_glob = .venv, __pycache__, .tox, build, dist

[doc8]
ignore-path=.tox,src/sagemaker.egg-info
# TODO: fix files before enabling max-line-length (D001)
Expand Down Expand Up @@ -111,6 +116,12 @@ commands =
flake8
basepython = python3.12

[testenv:isort-check]
deps = isort
commands =
isort --check-only --diff .
isort .

[testenv:pylint]
skipdist = true
skip_install = true
Expand Down