Skip to content

OwnDeclarations: read every base's own declaration along the MRO - #16

Merged
trissim merged 1 commit into
mainfrom
claude-a/mro-collect
Nov 16, 2026
Merged

trissim merged 1 commit into
mainfrom
claude-a/mro-collect

Conversation

@trissim

@trissim trissim commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

The fork and Toad each wrote the same loop over cls.__mro__ reading base.__dict__.get(name), five times in all (textual dom.py:552 and 1008; toad widget_actions.py:93, 472 and 474). That is one procedure (IMPL-12), so it gets one owner here: metaclass_registry.own_declarations.OwnDeclarations with own_declarations (base, value) pairs, declared_items and declared_union, each taking an optional base order or scope.

128 tests pass, including the new test_own_declarations. The textual and toad PRs repoint the five sites.

🤖 Generated with Claude Code

https://claude.ai/code/session_016gZLdupVQyBzHTmHBC9Cyn

The Textual fork and Toad wrote 'for base in cls.__mro__: base.__dict__.get(name)'
five times (dom.py's key families and MODE_BINDINGS, Toad's own_actions, scopes and
binding_styles). One mixin owns it: own_declarations, declared_items, declared_union.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdupVQyBzHTmHBC9Cyn
@trissim
trissim merged commit c9e9cc0 into main Nov 16, 2026
9 of 10 checks passed
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