Repository navigation
Conversation
LAKSHYA-cmd-tech
approved these changes
Nov 23, 2026
LAKSHYA-cmd-tech
left a comment
There was a problem hiding this comment.
Independent review on Windows 11 x64, Python 3.12.
- Red-first verification on Windows:
tools/leonida_tui.py:753previously opened log in text append mode withoutnewline="\n", causing CRLF on Windows and flaggingtest_every_text_write_pins_its_newline. Passingnewline="\n"fixes this.tools/world_drawable_verify.pynow reconfiguressys.stdoutwitherrors="replace"before runningmain(), matching the repository CLI pattern and preventingUnicodeEncodeErrorunder ANSI code page redirections.
python -I -m compileall -q tools/leonida_tui.py tools/world_drawable_verify.py(exit 0)python -I tests/test_leonida_tui.py(24/24 passed)python -I tests/test_world_drawable_verify.py(2/2 passed)python -I tests/test_world_drawable_lookup.py(1/1 passed)python -I scripts/check_no_game_data.py(exit 0)git diff --checkclean (0).
LGTM. AI-assisted; synthetic tests only, no game files or GPU used.
Author
|
Superseded by #7589 (and #7176 for the
#7589 sweeps the whole list of violations rather than these two files, which is the right shape for this: the linters enumerate every offender, so one PR clearing all of them beats a queue of two-file fixes. Thanks to @LAKSHYA-cmd-tech for the red-first review — the finding was right and is being carried by the sweep. Nothing here was wrong, it was just narrower than what landed first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two files on
mainbreak the two repository-wide rules inCONTRIBUTING.mdandAGENTS.md, sotests/test_text_write_line_endings.pyandtests/test_tool_stdout_encoding.pyboth fail before and after any change.What
tools/leonida_tui.py:753opens its stage log in text append mode without pinning the line ending:Under
open()'s default translation, every\nthe console writes becomes\r\non Windows, so the same session log differs between platforms.CONTRIBUTING.mdrequires a text file a tool writes to name its ending, and the sibling writers do; this one now passesnewline="\n".tools/world_drawable_verify.pystarts withif __name__ == "__main__": main(), with no stdout reconfiguration. Every other CLI tool setserrors="replace"first, because a redirected stdout underpython -Iis the strict ANSI code page and a path or name outside it ends the run withUnicodeEncodeError(#1406 fixedmake_game.pythe same way). It now uses the same block the rest of the tools use, and returnsmain()'s value.Neither change alters program output on a UTF-8-capable console.
Tested
CPU only, no GPU, no game files, Windows 11 / Python 3.14.3.
Before, on
main:After, each list no longer contains the file this PR fixes (the remaining entries are other people's files, several with open PRs):
Mutation-checked: reverting these two edits puts both names back in the failing lists, so the tests do cover them.
Their own tests still pass, and
compileallis clean:Scope
Two one-line-ish edits in two files nobody else has an open PR for. I deliberately left the other six names in those lists alone:
tools/f64_omod_probe.py,tools/awc_cue_labels.py,tools/bvh_slot_check.py(already fixed by #6513, same line),tools/import_call_sites.py,tools/op_reach.pyandtools/world_drawable_lookup.pyare all under other people's open PRs, and fixing them here would collide.AI-assisted.