Skip to content

Commit 4d170e8

Browse files
committed
Exclude autogenerated _version.py from ruff actions
1 parent 456e3a3 commit 4d170e8

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ The commands are written to be run at the root of your project.
211211
* Carefully review the changes that copier made to your project.
212212
* Pay particular attention to linter and formatter configurations — the template ships
213213
rules in `.pre-commit-config.yaml`, `.yamllint.yaml`, `.editorconfig`, and the
214-
`[tool.codespell]` / `[tool.typos]` sections of `pyproject.toml`. You'll likely want
215-
to merge the template's settings with your existing setup rather than accept either
216-
side wholesale.
214+
`[tool.ruff]` / `[tool.codespell]` / `[tool.typos]` sections of `pyproject.toml`.
215+
You'll likely want to merge the template's settings with your existing setup rather
216+
than accept either side wholesale.
217217
* If you used a cruft/cookiecutter template before, you may delete the cruft file `.cruft.json`.
218218
* If you are happy, commit all changes to the `migrate-to-copier` branch.
219219
* To finalise the migration, merge the `migrate-to-copier` branch to your main branch.

template/pyproject.toml.jinja

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ fallback-version = "0.0.0"
4444
[tool.pytest.ini_options]
4545
testpaths = ["tests"]
4646

47+
# https://docs.astral.sh/ruff/configuration/
48+
[tool.ruff]
49+
exclude = [
50+
"src/{{project_slug}}/_version.py",
51+
]
52+
# Set oldest supported Python version
53+
target-version = "py310"
54+
4755
# Ref.: https://github.com/codespell-project/codespell
4856
[tool.codespell]
4957
skip = [
@@ -62,6 +70,7 @@ quiet-level = 3
6270
# Ref.: https://github.com/crate-ci/typos (spell checker)
6371
[tool.typos.default.extend-words]
6472
linke = "linke"
73+
6574
[tool.typos.files]
6675
extend-exclude = [
6776
"LICENSE",

0 commit comments

Comments
 (0)