Skip to content

Commit

Permalink
remove isort because ruff is already checking imports
Browse files Browse the repository at this point in the history
  • Loading branch information
cwmeijer committed Aug 30, 2023
1 parent 98e5e85 commit bc5b8d8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 20 deletions.
9 changes: 0 additions & 9 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ if [ $? != "0" ]; then
fi

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
echo "Starting isort analysis using configuration from setup.cfg..."

# recursively run isort on distance_explainer/ directory, don't try to automatically fix anything
isort --recursive distance_explainer

if [ $? != "0" ]; then
echo "Commit aborted. Fix import issues found by isort before committing"
exit 1
fi

echo "Pre-commit checks completed successfully."
exit 0
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,3 @@ jobs:
python3 -m pip install .[dev,publishing]
- name: Check style against standards using ruff
run: ruff .
- name: Check import order
run: isort --check-only distance_explainer --diff
1 change: 1 addition & 0 deletions distance_explainer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Documentation about distance_explainer."""
import logging


logging.getLogger(__name__).addHandler(logging.NullHandler())

__author__ = "Christiaan Meijer"
Expand Down
9 changes: 0 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ dev =
bump2version
coverage [toml]
ruff
isort
pytest
pytest-cov
sphinx
Expand All @@ -69,11 +68,3 @@ publishing =

[options.packages.find]
include = distance_explainer, distance_explainer.*

[isort]
lines_after_imports = 2
force_single_line = 1
no_lines_before = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
known_first_party = distance_explainer
src_paths = distance_explainer,tests
line_length = 120

0 comments on commit bc5b8d8

Please sign in to comment.