Skip to content

Commit

Permalink
Exclude import sorting in ruff
Browse files Browse the repository at this point in the history
As of now, `ruff` does not allow custom sorting and ordering of imports.
See astral-sh/ruff#2419.
  • Loading branch information
WeilerP committed Mar 15, 2023
1 parent 8f212f7 commit eea4a8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ repos:
rev: 1.13.0
hooks:
- id: blacken-docs
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
hooks:
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ use_parentheses = true
known_num = "networkx,numpy,pandas,scipy,sklearn,statmodels"
known_plot = "matplotlib,mpl_toolkits,seaborn"
known_bio = "anndata"
sections = "FUTURE,STDLIB,THIRDPARTY,NUM,PLOT,BIO,FIRSTPARTY,LOCALFOLDER"
known_r = "rpy2"
sections = "FUTURE,STDLIB,THIRDPARTY,NUM,PLOT,R,BIO,FIRSTPARTY,LOCALFOLDER"
no_lines_before = "LOCALFOLDER"
balanced_wrapping = true
length_sort = "0"
Expand All @@ -43,7 +44,6 @@ select = [
"F", # Errors detected by Pyflakes
"E", # Error detected by Pycodestyle
"W", # Warning detected by Pycodestyle
"I", # isort
"D", # pydocstyle
"B", # flake8-bugbear
"TID", # flake8-tidy-imports
Expand Down Expand Up @@ -89,10 +89,9 @@ ignore = [
]

[tool.ruff.per-file-ignores]
"docs/*" = ["I", "BLE001"]
"docs/*" = ["BLE001"]
"tests/*" = ["D"]
"*/__init__.py" = ["F401"]
"scvelo/__init__.py" = ["I"]

[tool.jupytext]
formats = "ipynb,md"
Expand Down

0 comments on commit eea4a8e

Please sign in to comment.