Skip to content

lint-python is green again: the matching test's rule rewritings keep the cuts a list - #1374

Closed
oliverames wants to merge 1 commit into
seedds:mainfrom
oliverames:fix-nso-pyright
Closed

oliverames wants to merge 1 commit into
seedds:mainfrom
oliverames:fix-nso-pyright

Conversation

@oliverames

@oliverames oliverames commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What and why

dd6ce5ba's tests in dm/tools/tests/test_nso_match.py assign through rule['cuts'][0], which pyright resolves as a string from the descriptor's type, and the ratchet counts these above the baseline: 42062501408, 3 new. A rule written as {**self.rule, 'cuts': [...]} keeps the cuts a list.

Checked

  • Tests: python3 dm/tools/lint_python.py --against FETCH_HEAD: 384 findings, the baseline 384 to 387 (the three file/check pairs below it), 0 new, 0 fixed but still listed. python3 dm/tools/tests/test_nso_match.py: unchanged output. The same-check run before the change: 3 new.

Front ends

None: no front end has to act on this.

Docs

  • The finding is in its game note or its docs/reference/<subsystem>.md entry, and python3 dm/tools/docs_symptoms.py was run (the symptom index). Not applicable: a lint-only fix to a test and the lint baseline, with no game note or reference entry in the diff. The description says "Docs: none."
  • A chain tool changed: dmsh_chain.py --header was run and dm/gfx/nvn/dmsh_chain.h is part of the change. Not applicable: no chain tool changed.
  • No game files, keys or data extracted from a game in the change or the attachments

@oliverames

Copy link
Copy Markdown
Contributor Author

The same three findings fail ruff and pyright (ratchet) on main's own runs at dd6ce5b (run 42062501408) and on every re-based PR that touches the Python tools; my earlier fleet rebases re-ran #1102 and #1168 against them, and the two reports above are this exact finding. Merging this makes those PRs' next run green. #1338 (the t_int_float_view nil checks) is the lint-c twin of the same kind; neither the two fixes nor the affected PRs depend on the other.

…the cuts a list

dd6ce5b's tests assign through rule['cuts'][0] on a descriptor
pyright resolves as a str, one above the baseline; the rule now carries a
fresh tuple as a list and the ratchet's count drops 387 to 384. The
matching tests run the same.
@oliverames

Copy link
Copy Markdown
Contributor Author

Main's e9d1ef2 fixed the same lint-python failure from the other side (recipe() returns a plain dict now), and lint-python passes on main, so this one isn't needed anymore. Closing.

@oliverames oliverames closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant