removed the dead theme block in moon_engine.py - #159
Conversation
LeyckerS
left a comment
There was a problem hiding this comment.
Verified all three things this rests on rather than taking the description's word for it.
All fifteen names are unreferenced. Worth showing the working, because a naive grep -w OK returns six hits and looks alarming:
integration_http.py:214: print("[OK] browser → HTTP loopback → Engine: ...")
integration_web.py:189: print("[OK] GUI ↔ bridge ↔ engine: ...")
moon_download.py:310: W(f"OK: {len(ok_r)} / Fail: {len(fail_r)}")
moon_download.py:365: W(f" Completed OK : {len(ok_r)}")
moon_download.py:407: W(f" {'Time':>7} ... {'OK':>5} ...")
render_gui.py:83: print("[OK] no js errors, no overflow, no horizontal scroll")
Every one is inside a string literal. The only real definition is the line you are deleting.
Your styles.css claim holds exactly as stated. I checked all fifteen hex values against web/styles.css and not one appears. That is a stronger check than "it looks unused" and it is the reason this is safe rather than merely plausible.
On #145's actual question — "why is it here?" — the answer is in the history, and it is worth recording since the issue asked for it:
5f172d3 chore: delete the tkinter GUI and its generator
43114d5 refactor: gen_1.py -> moon_tk.py, and the engine regenerated from it
moon_engine.py was once generated from a tkinter GUI. The palette was that GUI's, compiled into the engine along with everything else, and it survived 5f172d3 because deleting the generator did not touch its output. So this is not a constant someone added and forgot — it is residue from a build step that no longer exists. Module-level constants with zero references in this file are usually from that era, which is a useful thing for the next person to know.
Your reasoning about web/styles.css explains why it is unused today; the history explains why it exists at all. Both halves together are the complete answer, and I will put the second one in the changelog alongside your first.
CI green on all eight. Merging.
- #158 (@nightcityblade, #81) takes ruff out of the version matrix - #157 (@XEDAB, #155) removes the assertion that could not fail - #159 (@AashishGupta2007, #145) removes the generated-era THEME block Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every entry in this release came from an outside contributor. - #150 (@shard872, #116) a full disk aborts the run instead of retrying - #149 (@Allen58562, #65) Stop interrupts transfers already in flight - #153 (@AdvaitVarhade, #32) structured CLI exit codes - #161 (@Divesh-Kshirsagar, #151) pytest.ini with a narrow warning filter - #158 (@nightcityblade, #81) ruff runs once, not once per Python version - #157 (@XEDAB, #155) the assertion that could not fail - #162 (@XEDAB, #160) the stub that left the engine on the real network - #159 (@AashishGupta2007, #145) the generated-era THEME block README: consolidated the changelog sections, refreshed the stale test count, and replaced the stars badge with a contributors badge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
I have removed the dead theme block at the top of moon_engine.py as it had no use in the code due to the introduction of web/styles.css, which has its own palette in CSS custom properties and shares not one hex value with this block.Addresses #145
Type of change
Checklist
applied the equivalent change to
moon_cli.py— not applicable: this removes an unused constant block with zero
references, no shared logic touched.
description
Screenshots / logs (if applicable)