Skip to content

Commit b23eeac

Browse files
committed
misc: Replace ruff I rules with more specific isort rules
1 parent 1783147 commit b23eeac

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/lint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ jobs:
3030
- name: Install dependencies
3131
run: |
3232
python -m pip install --upgrade pip
33-
pip install flake8-pyproject ruff
33+
pip install flake8-pyproject isort ruff
3434
3535
- name: Lint codebase with flake8
3636
run: |
3737
flake8 --builtins=ArgumentError .
3838
39+
- name: Lint the Python imports with isort
40+
run: |
41+
isort --check-only .
42+
3943
- name: Lint codebase with ruff
4044
run: |
4145
ruff check --preview --output-format github

pyproject.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,15 @@ line-length = 90
7474

7575
[tool.ruff.lint]
7676
# Add the following rule sets
77-
extend-select = ["E", "W", "F", "B", "UP", "SIM", "I"]
77+
select = ["E", "W", "F", "B", "UP", "SIM", "RUF022"]
7878
# But ignore these inconvenient rules
7979
ignore = ["F403", "E226", "E731", "E275", "F405", "E722", "E741", "W605"]
8080

81-
[tool.ruff.lint.isort]
82-
known-first-party = ["devito", "examples"]
81+
[tool.isort]
82+
line_length = 90
83+
known_first_party = ["devito", "examples"]
84+
multi_line_output = "VERTICAL_GRID_GROUPED"
85+
force_alphabetical_sort_within_sections = true
8386

8487
[tool.flake8]
8588
max-line-length = 90

0 commit comments

Comments
 (0)