Skip to content

Commit

Permalink
pyproject, Makefile: use ruff
Browse files Browse the repository at this point in the history
This can't be merged until ruff supports pattern
matching; see astral-sh/ruff#282.
  • Loading branch information
woodruffw committed Jan 10, 2023
1 parent c6233ef commit 5d7c312
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ lint: env/pyvenv.cfg
. env/bin/activate && \
black --check $(ALL_PY_SRCS) && \
isort --check $(ALL_PY_SRCS) && \
ruff $(ALL_PY_SRCS) && \
flake8 $(ALL_PY_SRCS) && \
mypy $(PY_MODULE)

.PHONY: reformat
reformat:
. env/bin/activate && \
ruff --fix $(ALL_PY_SRCS) && \
black $(ALL_PY_SRCS) && \
isort $(ALL_PY_SRCS)

Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ test = [
]
lint = [
"bandit",
"flake8",
"black",
"isort",
"interrogate",
"mypy",
"ruff",
]
dev = [
"build",
Expand Down Expand Up @@ -81,6 +81,7 @@ disallow_untyped_defs = true
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
sqlite_cache = true
strict_equality = true
warn_no_return = true
warn_redundant_casts = true
Expand All @@ -94,3 +95,8 @@ exclude_dirs = ["./test"]

[tool.black]
line-length = 100

[tool.ruff]
line-length = 100
select = ["E", "F", "W", "UP"]
target-version = "py37"

0 comments on commit 5d7c312

Please sign in to comment.