Skip to content

Remove dead argh __main__ blocks - #2

Merged
thorwhalen merged 1 commit into
masterfrom
drop-argh-dead-main-blocks
Sep 4, 2026
Merged

thorwhalen merged 1 commit into
masterfrom
drop-argh-dead-main-blocks

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

Part of the fleet-wide argh removal — the deletion sweep, i2mint/cw#29.

Verified before deleting. This repo has no setup.py, no pyproject.toml, no
console_scripts and no packaging metadata of any kind, so argh was never a declared
dependency and never installed alongside these scripts. Nothing in the repo imports either
module. Both __main__ guards were unreachable in any environment that did not already
happen to have argh.

Two blocks removed, 25 lines. rg '\bargh\b' over tracked files now returns nothing.
convert_images and acquire_metar_data remain importable and callable exactly as before.

On metar_acquisition.py

That block was broken independently of argh: it defined a shadowing wrapper
acquire_metar_data that coerced airport_ids with .split(',') and hours_before_now
with int(), and then dispatched _acquire_metar_data — the original, uncoerced
function. The wrapper was never called. Its except ImportError fallback then called the
rebound 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

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
@thorwhalen
thorwhalen merged commit c637f1a into master Sep 4, 2026
@thorwhalen
thorwhalen deleted the drop-argh-dead-main-blocks branch September 4, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant