Skip to content

Commit

Permalink
Use ruff and drop isort
Browse files Browse the repository at this point in the history
  • Loading branch information
humrochagf committed Jan 28, 2023
1 parent 382de8e commit d688911
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 38 deletions.
16 changes: 8 additions & 8 deletions makefile
Expand Up @@ -23,9 +23,9 @@ all: full
checkflake8:
$(CMD) flake8 .

.PHONY: checkisort
checkisort:
$(CMD) isort --check --color .
.PHONY: checkruff
checkruff:
$(CMD) ruff .

.PHONY: checkblack
checkblack:
Expand All @@ -36,7 +36,7 @@ checkmypy:
$(CMD) mypy .

.PHONY: check
check: | checkflake8 checkisort checkblack checkmypy
check: | checkflake8 checkruff checkblack checkmypy

.PHONY: test
test:
Expand All @@ -57,16 +57,16 @@ coverserver:
.PHONY: cover
cover: | coverhtml coverserver

.PHONY: formatisort
formatisort:
$(CMD) isort .
.PHONY: formatruff
formatruff:
$(CMD) ruff . --fix

.PHONY: formatblack
formatblack:
$(CMD) black -l $(MAX_LINE_LENGTH) .

.PHONY: format
format: | formatisort formatblack
format: | formatruff formatblack

.PHONY: full
full: | format check test
Expand Down
49 changes: 27 additions & 22 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions pyproject.toml
Expand Up @@ -23,7 +23,6 @@ typer = "^0.7.0"

[tool.poetry.group.dev.dependencies]
black = "^22.12.0"
isort = {extras = ["colors"], version = "^5.11.4"}
flake8 = "^6.0.0"
coveralls = "^3.3.1"
pytest = "^7.2.0"
Expand All @@ -32,14 +31,22 @@ pytest-cov = "^4.0.0"
mypy = "^0.991"
types-Jinja2 = "^2.11.9"
types-Werkzeug = "^1.0.9"
ruff = "^0.0.236"

[tool.isort]
ensure_newline_before_comments = true
force_grid_wrap = 0
include_trailing_comma = true
known_first_party = "revelation"
multi_line_output = 3
use_parentheses = true
[tool.ruff]
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
# isort
"I001"
]
src = ["revelation", "tests"]

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

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit d688911

Please sign in to comment.