Repository navigation
NRA Batch 38: DecodedStructuredBlock family, Scenario base cleanup, and cycle-free import promotions - #2340
Merged
Conversation
…nd cycle-free import promotions
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
NRA codemod Batch 38 on Toad — exercises
OpenHCSDev/NominalRefactorAdvisor#640(60dcc964) live on Toad'sStructuredTag.decode_blockhierarchy plus cycle-free hidden-import promotions, redundant-base removal, and class-name declaration references across 8 files (REL_IMPORTS=0):DecodedStructuredBlocknominal presence family (src/toad/client/structured_context.py):ZeroOneTupleToFamilyOperation(b72fa25158, unlocked byNRA#640'sDeclaredFamily.member_named -> type[Self]installed-module import-alias resolution).tuple[StructuredPart, ...]returns acrossStructuredTag.decode_block,ThinkTag.decode_block,CtxTag.decode_block, andToolCallTag.decode_blockwithDecodedStructuredBlock/AbsentDecodedStructuredBlock/HeldDecodedStructuredBlock(eliminating all 3zero_one_tuplefindings instructured_context.py).tools/qt_drive.py):a5a4d4f4db: dropped redundantABCfromScenario(DeclaredFamily, affix="Scenario")(DeclaredFamilyalready suppliesABC).47c0e35ef6: replaced"Divider"string identity withDivider.__name__.src/toad/acp/agent_controller.py(7 imports promoted:AgentFail,AvailableCommandsUpdate,McpClientStopped,Plan,Renderer,RenderTask).src/toad/core/events.py(AcpLogLink,TurnPresentation; removesif TYPE_CHECKING:).src/toad/preferences.py(CoreEventStream,PreferenceChanged).src/toad/prompt_cursor.py(CompletionPopup).tools/physical_ui.py(toad.preferences).tools/qt_inherit_ratchet.py(QDialog,PresentedWindow).(Dropped during diff review:
promote_hidden_importsproposals onqt/android.py&qt/main.py— splash-before-client startup order;agent_surface.py/committed_presentation.py/session_history_details.py/transcript_publication.py/workspace_frame.py—qt_inherit_ratchetconfirmed those would load Textual into Qt-imported modules;tools/drive_sweep.py/tools/physical_ui_remote.py/tools/qt_drive.py— NRA promoted imports abovesys.path/XDG_CONFIG_HOMEscript guards, tracked as an NRApromote_hidden_importsfollow-up.)Verification
tools/qt_inherit_ratchet.py:0 / 0 / 0 / 0 / 0tools/shadow_check.py:0tools/guarded_imports.py:0REL_IMPORTS=0tests/model/test_structured_context.py,tests/model/test_qt_history_width.py,tests/model/test_android_perf_ux_arrivals.py): 54 passed in 4.48s.