Skip to content

Commit 800bf2a

Browse files
committed
Replace isort with ruff for import sorting
1 parent 2b23c7e commit 800bf2a

File tree

3 files changed

+28
-45
lines changed

3 files changed

+28
-45
lines changed

code_check.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ def status(line):
4141
status("Running ruff")
4242
cmd("ruff check dash")
4343

44-
status("Running isort")
45-
cmd("isort dash")
46-
4744
# if any code changes were made, exit with error
4845
if cmd("git diff dash test_runner testfiles"):
4946
print("👎 " + colorama.Fore.RED + "Changes to be committed")

pyproject.toml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ dependencies = [
3434

3535
[project.optional-dependencies]
3636
dev = [
37-
"isort >= 5.13.2",
3837
"colorama >= 0.4.3",
3938
"coverage[toml] >= 7.2.2",
4039
"ruff >= 0.15.7",
@@ -50,17 +49,15 @@ fix = true
5049
exclude = ["./.tox/*", "./.venv/*", "./env/*", "*/migrations/*", "./build/*"]
5150

5251
[tool.ruff.lint]
53-
select = ["E", "F", "W"]
52+
select = ["E", "F", "I", "W"]
5453
ignore = ["E501", "F405"]
5554

56-
[tool.isort]
57-
multi_line_output = 3
58-
force_grid_wrap = 0
59-
line_length = 119
60-
include_trailing_comma = true
61-
combine_as_imports = true
62-
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "DJANGO", "FIRSTPARTY", "LOCALFOLDER"]
63-
known_django = ["django"]
55+
[tool.ruff.lint.isort]
56+
combine-as-imports = true
57+
section-order = ["future", "standard-library", "third-party", "django", "first-party", "local-folder"]
58+
59+
[tool.ruff.lint.isort.sections]
60+
"django" = ["django"]
6461

6562
[tool.coverage.run]
6663
source = ["dash"]

uv.lock

Lines changed: 21 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)