Skip to content

Commit e224c54

Browse files
authored
Simplify ruff usage and tighten version constraint (#26)
* Simplify ruff CLI Let ruff choose which files to look at. This can also be configured with pyproject.toml entries following the docs https://docs.astral.sh/ruff/configuration/ * Allow ruff to only update patch version number Currently the versioning scheme for ruff includes breaking changes on minor version updates and compatible changes with patch version updates. Linting tools are often used in CI as a first pass, and pulling in a new version with changes that find new issues can cause headaches. Pulling in breaking changes and updates should be done carefully with manual version bump.
1 parent 171716b commit e224c54

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

{{cookiecutter.project_slug}}/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ $(VENV)/pyvenv.cfg: pyproject.toml
5757
.PHONY: lint
5858
lint: $(VENV)/pyvenv.cfg
5959
. $(VENV_BIN)/activate && \
60-
ruff format --check $(ALL_PY_SRCS) && \
61-
ruff check $(ALL_PY_SRCS) && \
60+
ruff format --check && \
61+
ruff check && \
6262
mypy
6363

6464
{%- if cookiecutter.docstring_coverage %}
@@ -69,8 +69,8 @@ lint: $(VENV)/pyvenv.cfg
6969
.PHONY: reformat
7070
reformat:
7171
. $(VENV_BIN)/activate && \
72-
ruff check --fix $(ALL_PY_SRCS) && \
73-
ruff format $(ALL_PY_SRCS)
72+
ruff check --fix && \
73+
ruff format
7474

7575
.PHONY: test tests
7676
test tests: $(VENV)/pyvenv.cfg

{{cookiecutter.project_slug}}/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ test = ["pytest", "pytest-cov", "pretend", "coverage[toml]"]
3434
lint = [
3535
# NOTE: ruff is under active development, so we pin conservatively here
3636
# and let Dependabot periodically perform this update.
37-
"ruff ~= 0.2",
37+
"ruff ~= 0.4.0",
3838
"mypy >= 1.0",
3939
"types-html5lib",
4040
"types-requests",

0 commit comments

Comments
 (0)