Remove dead argh __main__ blocks - #2
Merged
Merged
Conversation
Part of the fleet-wide argh removal (i2mint/cw#29). Neither block was reachable: this repo has no packaging metadata at all, so argh was never declared and never installed alongside these scripts. Both functions remain importable and callable; only the argh entry points go. metar_acquisition.py's block was additionally broken on its own terms — it built a coercing wrapper (`.split(',')`, `int()`) and then dispatched the *original*, uncoerced function, so the coercion never ran; its `except ImportError` fallback called the rebound name with no arguments. It is preserved verbatim as the motivating anti-example in cw's `cw/ingress.py` (i2mint/cw#37) before removal here, per #29's acceptance criteria. Refs i2mint/cw#29 Claude-Session: https://claude.ai/code/session_01K6LB3AwUmKDxaFNZ2NqPGr
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.
Part of the fleet-wide argh removal — the deletion sweep, i2mint/cw#29.
Verified before deleting. This repo has no
setup.py, nopyproject.toml, noconsole_scriptsand no packaging metadata of any kind, soarghwas never a declareddependency and never installed alongside these scripts. Nothing in the repo imports either
module. Both
__main__guards were unreachable in any environment that did not alreadyhappen to have argh.
Two blocks removed, 25 lines.
rg '\bargh\b'over tracked files now returns nothing.convert_imagesandacquire_metar_dataremain importable and callable exactly as before.On
metar_acquisition.pyThat block was broken independently of argh: it defined a shadowing wrapper
acquire_metar_datathat coercedairport_idswith.split(',')andhours_before_nowwith
int(), and then dispatched_acquire_metar_data— the original, uncoercedfunction. The wrapper was never called. Its
except ImportErrorfallback then called therebound name with no arguments, under a message that stops mid-word.
Per #29's acceptance criteria it is preserved verbatim, with a reading of what it gets
wrong, in
cw/ingress.py's module docstring: i2mint/cw#37 (merged/open before this lands).Refs i2mint/cw#29