Skip to content

dmsh_entry: drop the unused dmsh_fetch import (ruff ratchet red on main) - #2266

Closed
lunks wants to merge 2 commits into
seedds:mainfrom
lunks:pr/entry-unused-import
Closed

lunks wants to merge 2 commits into
seedds:mainfrom
lunks:pr/entry-unused-import

Conversation

@lunks

@lunks lunks commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What and why

dmsh_entry.py imports dmsh_fetch and no longer uses it (the only other mention is in a docstring), so the "ruff and pyright (ratchet)" check fails on main and on every PR based on it: dmsh_fetch imported but unused (F401). The import is dropped.

dmsh_entry.py is part of the translation chain, so its bytes are in the chain id: dmsh_chain.py --header moves DMSH_CHAIN from 7c609af36b0f (main now) to 2d8bdd6f4d09, and every shader library is built again. The translation itself is unchanged. If a chain change is about to land anyway, this can ride along with it and this PR can be closed.

Checked

  • Tests: ruff check --select F401 dm/gfx/tools/dmsh_entry.py reports 1 error on main and none with the change; the test_*.py under dm/gfx/tests and dm/tools/tests that import dmsh_entry pass (test_dmsh_pairs.py with DM_GAME=0400486024DEC000).
  • Games run: none (a Python import only).
  • Devices and OS: M5 Pro, macOS 27.0.
  • For a change to the shader chain: no regress.py check report; the output of the translation is not changed, only the chain id. Not checked: pyright, the full lint_python.py (pyright is not installed here); no shader build.

Docs

  • No reference entry needed; no finding, a lint fix
  • A chain tool changed: dmsh_chain.py --header was run and dm/gfx/nvn/dmsh_chain.h is part of the change
  • No game files, keys or data extracted from a game in the change or the attachments

The import is unused (F401), which fails the ruff and pyright ratchet on main and on every PR based on it. dmsh_entry.py is a chain file: dmsh_chain.h is regenerated (0aa68e19c9a7 -> 784765eda608).
@github-actions github-actions Bot added nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) shader chain The shader translation chain (DMSH_CHAIN): a change rebuilds every game's shaders labels Nov 10, 2026
@seedds

seedds commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Design verdict: Already covered on main; closing.

Should it exist? Yes: an unused import should be removed, and main has already removed it.

78671525 removed the unused dmsh_fetch import. Current dmsh_entry.py imports confirm it is absent. Reapplying this older patch/header would add no missing lint repair.

Review base: 82c354b0.

  • Confidence: High confidence in the source/history comparison; this triage adds no fresh gameplay validation.
  • Binding now / loosest correct: General tooling: no game/build binding; the import is shared by the shader tools.
  • Root cause or workaround? Root-cause fix: remove the unused import, already done.
  • Design from scratch? Yes: keep the current import list and generated chain stamp.
  • Performance impact: None expected from this triage; only a reply/tracker-state update, with no code or shader change.
  • Regression level / games run: Low risk for this action. No games or regression suite run; source, diff, history and discussion review only.
  • Should we just leave it? Yes: we should leave main unchanged.

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

Labels

nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) shader chain The shader translation chain (DMSH_CHAIN): a change rebuilds every game's shaders

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants