1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# ~keep poly configuration for validating *generated* code.
#
# Deliberately separate from the repository's own poly.toml. That file governs
# scythe's hand-written source; this one governs the output scythe emits, and
# the two disagree on purpose:
#
# * `target_version` is py311, not py312. Generated Python is documented as
# supporting 3.11+ (see the python-conventions rules), so linting it
# against 3.12 would accept syntax the supported floor cannot run.
# * `line_length` is generous. Generated code is not written for humans to
# hand-edit; the provenance header alone exceeds ruff's 88-column default,
# which is why it carries `# noqa: E501`. Wrapping decisions belong to the
# backends and to `scythe fmt`, not to a linter run over their output.
# * ruff's UP042 is ignored. It asks for `StrEnum` in place of `str, Enum`,
# but `StrEnum` changes `str()` and `format()` of a member from
# `Status.ACTIVE` to `active`, so switching would change runtime behavior
# of generated code; the backends keep `str, Enum` deliberately.
# * Two mago rules are ignored for PHP because they are structurally
# inapplicable to this output rather than merely inconvenient:
# `single-class-per-file` — a generated PHP file is one module holding the
# enum, the composite classes, every row class and `Queries`, which is the
# documented shape, not an accident — and `excessive-parameter-list`, since
# a row struct's promoted constructor takes exactly one parameter per
# selected column, so the user's schema decides the count and no backend
# choice can change it. Note this means a consumer running mago over
# scythe's PHP output with default rules will see both; that belongs in the
# PHP guide, not in a suppression here.
#
# Passed explicitly via `--config` from `validation.rs::poly_check`. Without it
# poly would resolve config by walking up from the temporary file it is handed,
# find nothing outside the repository, and silently use its built-in defaults --
# so what CI enforced would depend on where the temp directory happened to be.
[]
= 200
= "lf"
[]
= "py311"
= 200
= ["UP042"]
[]
= ["single-class-per-file", "excessive-parameter-list"]