Repository navigation
AbstractHooksMeta lives here, below Textual and Toad's shared contracts - #13
Merged
Merged
Conversation
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
This was referenced Nov 16, 2026
Merged
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.
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
_MessagePumpMetaand Toad import it frommetaclass_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