Skip to content

Commit

Permalink
STYLE: Enforce flake8 import conventions
Browse files Browse the repository at this point in the history
Enforce `flake8` import conventions.

Add `nb` as the unconventional import alias for `nibabel` so that every
time `nibabel` needs to be imported it is imported as `nb` consistently.

Documentation:
https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
  • Loading branch information
jhlegarreta committed Jan 9, 2025
1 parent 1ec3e8c commit 6fd01a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ select = [
"W",
"B",
"I",
"ICN",
]
ignore = [
"E203"
Expand All @@ -163,6 +164,9 @@ inline-quotes = "double"
[tool.ruff.format]
quote-style = "double"

[tool.ruff.lint.flake8-import-conventions.extend-aliases]
"nibabel" = "nb"

[tool.ruff.lint.isort]
known-first-party=["nifreeze"]

Expand Down

0 comments on commit 6fd01a3

Please sign in to comment.