Repository navigation
Prove Textual creation hooks under OrderPreservingReads & cache star-import scan - #638
Merged
Merged
Conversation
…r-import scan - Add OrderPreservingReads(CreationReads) shared by BaseDropReads and MemberDeletionReads (hoisting walked_by, walked, only_stores, setattr, and plain_class; eliminating duplicate BaseDropReads overrides) - Prove unmatched prefix-filtered namespace loops (textual/message_pump.py:144), metaclass-ancestry method resolution in CreationReads.called (:157), type-filtered namespace values/items loops (:163 DispatchScope.from_class), f-string prefix/suffix key avoidance (toad/widget_actions.py:179), and prefix-filtered dir(cls) comprehensions (textual/dom.py:1039) - Add metaclass_registry.abstract_hooks.AbstractHooksMeta to MODELLED_METACLASSES (same __abstractmethods__ contract as abc.ABCMeta) - Cache ParsedModule.has_star_import and short-circuit type_filtered_bindings_unchanged when walk.before == walk.after (eliminating quadratic ast.walk(module.module) per decorator on installed Textual modules; live Toad sibling_override_step >120s timeout -> 8.2s, unlocking 0 -> 3 executable candidates)
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.
Numbers
sibling_override_stepsynthesis:0 -> 3executable candidates unlocked (5b2d3de6afFuzzyPane.toggled,153131fe1fFuzzyPane.cursor_owner,78b1dafe63ConversationThreadSidebar.make_panels)>120s timeout -> 8.2safter removing quadraticast.walk(module.module)per decorator on installed modules101/101passing (test_installed_creation_hooks.py16/16,test_restated_overrides.py20/20,test_class_overlap_codemod.py58/58,test_repository_architecture.py7/7),REL_IMPORTS=0Mechanisms
OrderPreservingReads(CreationReads)(class_creation.py,restated_overrides.py): shared intermediate class for MRO-preserving creation proofs (walk.before == walk.after), inherited by bothBaseDropReadsandMemberDeletionReads(hoistingwalked_by,walked,only_stores,setattr, and deleting the duplicates onBaseDropReads)._MessagePumpMeta&DeclaredWidgetActionsproofs (class_creation.py):attr.startswith(prefix)namespace loops (textual/message_pump.py:144), refusing whenever the composer binds or moves aprefix*name.CreationReads.called(textual/message_pump.py:157built._compile_dispatch()).values()/items()namespace loops behindisinstance(v, PlainClass)(textual/_on.pyDispatchScope.from_class).JoinedStrconstant prefix/suffix key avoidance inCreationReads.constant_key(toad/widget_actions.py:179), with_in_own_function_scopeignoring comprehension-scoped variables of the same name.dir(cls)comprehensions (textual/dom.py:1039startswith(('_compute_', 'compute_'))), still refusing matching moved/added names and keeping unfiltereddir(cls)strict.AbstractHooksMetamodelled (class_creation_store.py:39): addedmetaclass_registry.abstract_hooks.AbstractHooksMetatoMODELLED_METACLASSES(identical__abstractmethods__contract toabc.ABCMeta).ast_tools.py:875,binding_proofs.py:279,class_creation.py:647): cachedParsedModule.has_star_import(eliminating repeatedast.walk(textual/widget.py)per decorator) and short-circuitedtype_filtered_bindings_unchangedto O(|deleted|) whenwalk.before == walk.after.