Skip to content

AbstractHooksMeta lives here, below Textual and Toad's shared contracts - #13

Merged
trissim merged 1 commit into
mainfrom
claude-a/abstract-hooks
Nov 16, 2026
Merged

trissim merged 1 commit into
mainfrom
claude-a/abstract-hooks

Conversation

@trissim

@trissim trissim commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

The abstract-hook metaclass (refuses to build a class whose MRO leaves an abstract hook unresolved, without ABCMeta's isinstance cost) sat in the Textual fork. Toad's shared contracts use it, so each imported Textual, and the Qt client on Android (no Textual) couldn't share them. It moves here unchanged; Textual's _MessagePumpMeta and Toad import it from metaclass_registry; Textual's copy goes in its own PR.

Check: tests/test_abstract_hooks.py, 2 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XbFMSofn8pw1EZ8PbTeYxm

The metaclass that refuses to build a class whose MRO leaves an abstract hook
unresolved, without ABCMeta's isinstance cost, sat in the Textual fork
(textual/abstract_hooks.py). Toad's shared contracts (TargetRows, StartsSessions,
WorkspaceViews, SessionOrigin, CoveredHistory, ...) use it, so every one of them
imported Textual, and the Qt client on Android, which has no Textual, could not
share them. It moves here unchanged; Textual's _MessagePumpMeta and Toad import it
from metaclass_registry, and Textual's copy is deleted in its own PR.

Check: tests/test_abstract_hooks.py, 2 passed: an unresolved mixin hook refuses
construction; a resolved one builds and isinstance stays plain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbFMSofn8pw1EZ8PbTeYxm
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