arch(#372): split _events.py by responsibility#377
Merged
Conversation
422 LOC → 4 files, each ≤250 LOC. Pure reorganization, no behavior change.
* _events.py (212) — `on` group + on output/keystroke/focus/layout,
annotate, rpc, shared `_debug_warn`
* _on_prompt.py (62) — `on prompt` (#247 timeout-as-ItaError lives here)
* _on_session.py (131) — `on session-new` / `on session-end` + UUID parser
* _coprocess.py (67) — `coprocess` group
Sibling modules import `on` and `_debug_warn` from `_events`; __init__.py
imports them after `_events` so the parent group exists before children
register.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Splits `src/ita/_events.py` (422 LOC) into responsibility-separated modules.
Module boundaries:
`init.py` gained three side-effect imports so the new modules register their Click commands on `cli`.
Import check: passed. No external callers of `ita._events.*` in tests, so no back-compat re-exports needed.
Fast-lane: 580 pass / 14 fail → 586 pass / 13 fail (no regressions).
Closes #372.
Test plan
on prompttimeout silently exits 0 with no output #247 still works after split)🤖 Generated with Claude Code