Skip to content

Commit

Permalink
Use ruff instead of autoflake and isort. Keep Black.
Browse files Browse the repository at this point in the history
  • Loading branch information
denisbondar committed Sep 7, 2023
1 parent 32a73e0 commit 5d8631d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
5 changes: 3 additions & 2 deletions lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -e

autoflake --in-place --remove-all-unused-imports --recursive heatmap tests
isort .
#autoflake --in-place --remove-all-unused-imports --recursive heatmap tests
#isort .
black .
ruff check . --fix
15 changes: 8 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@ line-length = 119

[tool.isort]
profile = "black"
py_version=311
py_version = 311
src_paths = ["heatmap", "tests"]

[tool.ruff]
target-version = "py311"
line-length = 119
src = ["heatmap"]
src = ["heatmap", "tests"]
# https://beta.ruff.rs/docs/rules/
select = [
"E", # pycodestyle
"F", # pyflakes
"W", # warning
# "I", # isort imports (не работает вместе с Black)
"I", # isort imports
"N", # pep8-naming
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
# "E501", # line too long, handled by black
"W505", # Doc line too long
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pytest
ruff
black
isort
autoflake

0 comments on commit 5d8631d

Please sign in to comment.