Dashboard widgets: Rendered.moves is declared three times, and the lint rule that catches it is off #501
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#501
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, reading the dashboard widget code.Checked again on 2026-10-01 against
mainat0a5cad587: still present.The
Rendereddataclass declares the same field, with the same three-line comment, three times. It works only because the last declaration silently replaces the first two, so an edit to either of the first copies has no effect.core/widgets.py:395-406, classRendered:moves: dict = field(default_factory=dict)at lines 398, 402 and 406, each under an identical#:comment.pyproject.toml,[tool.ruff.lint] select) does not include flake8-pie, whose rulePIE794(duplicate class field definition) reports exactly this: run in isolation over the file it finds the two extra copies."PIE794"(or"PIE") to the ruffselectlist so the next one is caught.Done when
core/widgets.pydeclaresmovesonce, andruff checkwithPIE794selected inpyproject.tomlpasses oversrc/.