pyproject.toml: enable isort rule in Ruff

Use `combine-as-imports = true` [1] to avoid such kinds or imports on a
single line:

    from torch import Tensor, device as Device, dtype as DType

[1]: https://docs.astral.sh/ruff/settings/#isort-combine-as-imports
This commit is contained in:
Cédric Deltheil 2023-12-11 11:40:27 +01:00 committed by Cédric Deltheil
parent 4c07225d68
commit b44d6122c4

View file

@ -68,12 +68,19 @@ lint = { chain = ["ruff format .", "ruff --fix ."] }
line-length = 120
[tool.ruff]
src = ["src"] # see https://docs.astral.sh/ruff/settings/#src
select = [
"I", # isort
]
ignore = [
"F722", # forward-annotation-syntax-error, because of Jaxtyping
"E731", # do-not-assign-lambda
]
line-length = 120
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.docformatter]
black = true