Skip to content

Commit

Permalink
pyproject, Makefile: use ruff (#3)
Browse files Browse the repository at this point in the history
* pyproject, Makefile: use ruff

This can't be merged until ruff supports pattern
matching; see astral-sh/ruff#282.

* Remove more flake8 refs
  • Loading branch information
woodruffw authored Mar 8, 2023
1 parent c6233ef commit b35555f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .flake8

This file was deleted.

3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ lint: env/pyvenv.cfg
. env/bin/activate && \
black --check $(ALL_PY_SRCS) && \
isort --check $(ALL_PY_SRCS) && \
flake8 $(ALL_PY_SRCS) && \
ruff $(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 b35555f

Please sign in to comment.