Generated a fresh project from the template today (copier copy --defaults, 41 files, make check and make test green in under three seconds) and read the linting configuration it produced:
[tool.ruff.lint]
select = ["F", "E", "W", "I", "B", "N", "S", "C4", "DTZ", "SIM", "TRY", "PERF", "RUF", "UP", "ANN", "T20", "PTH", "PLC", "PLE", "PLW"]
ignore = ["TRY003", "S101", "ANN401", "RUF012", "S104", "S105", "S106", "ANN204", "DTZ", "ANN", "N802", "PERF401", "SIM105", "S607"]
DTZ and ANN appear in both lists. Selecting a family and then ignoring the whole family is dead configuration: the two entries in ignore cancel two entries in select, and the more specific ANN401 / ANN204 next to them are then pointless too. Anyone reading this file — a contributor, an assistant, the person copying it into a new repo — reads a select list that promises checks the config does not run.
The two families are not equally missed. Annotations are still enforced, because mypy runs with disallow_untyped_defs = true, so ignoring ANN costs little beyond the confusion. DTZ is not covered by anything else, and it is the family that catches datetime.now() without a timezone, datetime.utcnow(), and naive fromtimestamp — in a set of libraries where deadlines, retention windows, partition boundaries and idempotency TTLs are all computed from timestamps. That is the rule family this org can least afford to have switched off by accident.
Every library generated from the template carries the same two lines (deadline-budget, clientwright, servicewright all have them verbatim; pg-partsmith has since diverged to its own configuration), so whatever is decided here should propagate.
What I think it needs:
- Drop
DTZ and ANN from ignore, keep the specific ANN401 / ANN204 exemptions, and see what the existing libraries report. If DTZ turns up real findings, those are bugs worth their own issues; if it turns up only test fixtures, a per-file-ignores entry for tests/ is the honest way to say so.
- If a family really is meant to be off, remove it from
select too, so the file says what it does.
- A per-file-ignores block for
tests/ is probably the missing piece behind several of these entries (S101 for assert, ANN for fixtures), and it would let the library code keep the stricter rules.
The rest of the generated project is in good shape: pre-commit with fourteen hooks including a conventional-commit check, CI with lint plus unit and integration jobs and an all-checks-passed gate, release-please wired to the version file, a docs site with an agents page, and the Trusted Publishing workflow. The lint config is the one place where what it claims and what it runs disagree.
Generated a fresh project from the template today (
copier copy --defaults, 41 files,make checkandmake testgreen in under three seconds) and read the linting configuration it produced:DTZandANNappear in both lists. Selecting a family and then ignoring the whole family is dead configuration: the two entries inignorecancel two entries inselect, and the more specificANN401/ANN204next to them are then pointless too. Anyone reading this file — a contributor, an assistant, the person copying it into a new repo — reads aselectlist that promises checks the config does not run.The two families are not equally missed. Annotations are still enforced, because mypy runs with
disallow_untyped_defs = true, so ignoringANNcosts little beyond the confusion.DTZis not covered by anything else, and it is the family that catchesdatetime.now()without a timezone,datetime.utcnow(), and naivefromtimestamp— in a set of libraries where deadlines, retention windows, partition boundaries and idempotency TTLs are all computed from timestamps. That is the rule family this org can least afford to have switched off by accident.Every library generated from the template carries the same two lines (
deadline-budget,clientwright,servicewrightall have them verbatim;pg-partsmithhas since diverged to its own configuration), so whatever is decided here should propagate.What I think it needs:
DTZandANNfromignore, keep the specificANN401/ANN204exemptions, and see what the existing libraries report. IfDTZturns up real findings, those are bugs worth their own issues; if it turns up only test fixtures, aper-file-ignoresentry fortests/is the honest way to say so.selecttoo, so the file says what it does.tests/is probably the missing piece behind several of these entries (S101forassert,ANNfor fixtures), and it would let the library code keep the stricter rules.The rest of the generated project is in good shape: pre-commit with fourteen hooks including a conventional-commit check, CI with lint plus unit and integration jobs and an
all-checks-passedgate, release-please wired to the version file, a docs site with an agents page, and the Trusted Publishing workflow. The lint config is the one place where what it claims and what it runs disagree.