Skip to content

Commit 14c98fd

Browse files
committed
fix: Setup isort for ruff
Imports are highly inconsistent throughout the project, using a mix of absolute as well as explicit and implicit relative imports. For this reason, we have to explicitly specify the known first-party and local folders for isort to work correctly. Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@ucl.ac.uk>
1 parent b07f52d commit 14c98fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ target-version = "py310"
8484
select = ["E", "F", "I", "W", "C90"]
8585
ignore = ["C901"]
8686

87+
[tool.ruff.lint.isort]
88+
known-first-party = ["config", "domain", "exception", "helper", "registry", "utils"]
89+
known-local-folder = ["api", "cli", "data", "management", "model_services", "processors", "trainers"]
90+
8791
[tool.mypy]
8892
ignore_missing_imports = true
8993
no_implicit_optional = true

0 commit comments

Comments
 (0)