Skip to content

Fix Python lint in work-folder cleanup tests - #1301

Closed
thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/fix-main-test-lint-20261105
Closed

thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/fix-main-test-lint-20261105

Conversation

@thehobbit85

Copy link
Copy Markdown
Contributor

Main commit 56bafa9 introduced three Pyright errors in the work-folder cleanup tests, so PR checks built on current main fail Python lint even when they do not change these tests. This fixes the test setup without changing production behavior or the lint baseline.

The CLI cleanup test uses a scoped patch for the dynamically loaded module's NSP_FOLDER, restoring the setting afterward while retaining the success/failure and work-folder filtering assertions. The archive tests advance the observed clock by 30 days and use the normal integer quiet period, replacing the fractional days argument and real sleep. The real archive, file, and extended-attribute assertions remain unchanged.

Validation on main 7550be15acaae96e9a86c92e31cf8190975066bf:

  • Reproduced all three errors on untouched main with pinned Ruff 0.17.2 / Pyright 1.1.414: 392 findings versus baseline 389. After this change: 389 findings, zero new or stale entries, and no baseline growth.
  • The two affected test files pass all 38 tests.
  • Ran each of the 151 Python test files under dm/tools/tests, dm/ios/tests, and dm/gfx/tests in a fresh native arm64 Python 3.14.6 process, with the committed translator and Xcode 27.2: 1,578 tests, no failures, 13 optional skips (9 Unicorn execution tests and 4 tests requiring native GPU executables).
  • git diff --check passes. No host, shader-chain, or production-tool behavior changes; game regressions are inapplicable to this test-only repair. Remote CI is pending.

This is a shared upstream repair, kept separate from feature PRs. It addresses different errors from #1294.

@github-actions github-actions Bot added the tools Tools and scripts (dm/tools, scripts) label Nov 5, 2026
@seedds

seedds commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Closing as superseded: 58a77cc landed the same fix on main while this was open, and lint-python is green there. Your diagnosis of the three findings was correct, thanks. Its NSP_FOLDER patch matches yours; for the days finding it declares the parameter a float instead of mocking the clock. Your clock-based test is slightly nicer, but it saves only about 0.25 s, so it isn't worth a separate commit.

@seedds seedds closed this Nov 5, 2026
@thehobbit85
thehobbit85 deleted the codex/fix-main-test-lint-20261105 branch November 8, 2026 08:21
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.

2 participants