mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-21 13:48:46 +00:00
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:
parent
4c07225d68
commit
b44d6122c4
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue