Skip to content

Commit bf36e7c

Browse files
replace isort with ruff
1 parent c60ef1d commit bf36e7c

2 files changed

Lines changed: 10 additions & 17 deletions

File tree

.github/workflows/checks.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ jobs:
4646
- name: Run Black
4747
run: poetry run task black --check
4848

49-
- name: Run isort
50-
run: poetry run task isort --check
51-
5249
- name: Run safety
5350
run: poetry export -f requirements.txt | poetry run safety check --bare --stdin
5451

pyproject.toml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ bl = "binarylane.console.__main__:main"
1818

1919
[tool.poetry.group.dev.dependencies]
2020
taskipy = "^1.10.3"
21-
isort = "*"
2221
black = "*"
2322
mypy = "*"
2423
types-python-dateutil = "^2.8.19"
@@ -31,24 +30,13 @@ ruff = "^0.9.6"
3130
[tool.taskipy.tasks]
3231
generate = "python scripts/generate.py"
3332
black = "black ."
34-
isort = "isort ."
33+
isort = "ruff check --select I . --fix"
3534
mypy = "mypy ."
3635
ruff = "ruff check src"
3736
safety = "poetry export -f requirements.txt | safety check --bare --stdin"
3837
test = "pytest tests"
3938
check = "task isort && task black && task mypy && task ruff && task test && task safety"
4039

41-
[tool.isort]
42-
py_version = 37
43-
line_length = 120
44-
profile = "black"
45-
sections=['FUTURE', 'STDLIB', 'COMPAT', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER']
46-
no_lines_before=["COMPAT"]
47-
known_compat=["binarylane.pycompat"]
48-
known_first_party=["binarylane"]
49-
known_local_folder=["binarylane.console"]
50-
add_imports=["from __future__ import annotations"]
51-
5240
[tool.black]
5341
line-length = 120
5442
target_version = ["py37"]
@@ -62,9 +50,17 @@ exclude = [
6250
]
6351

6452
[tool.ruff.lint]
65-
select = ["E4", "E7", "E9", "F", "TC", "PL"]
53+
select = ["E4", "E7", "E9", "F", "TC", "PL", "I"]
6654
ignore = ["PLR"]
6755

56+
[tool.ruff.lint.isort]
57+
section-order = ["future", "standard-library", "compat", "third-party", "first-party", "local-folder"]
58+
no-lines-before = ["compat"]
59+
sections = { "compat" = ["binarylane.pycompat"] }
60+
known-first-party = ["binarylane"]
61+
known-local-folder = ["binarylane.console"]
62+
required-imports = ["from __future__ import annotations"]
63+
6864
[tool.mypy]
6965
disallow_any_generics = true
7066
disallow_untyped_defs = true

0 commit comments

Comments
 (0)