Repository navigation
Drive KNOWN_BARE to zero, clean markdown_preparation & menus imports - #2229
Merged
Merged
Conversation
…_preparation, guard Widget in menus - markdown_preparation.py: remove accidental Textual @on(Enter)/@on(Leave) decorators and imports from Rich's MarkdownElement subclasses (StyledCodeBlock, GreenText), making markdown_preparation.py completely Textual-free. - menus.py: guard type-only textual.widget.Widget import under TYPE_CHECKING so importing toad.menus from Qt does not load textual.widget. - qt/activity.py: delete unused single-caller ActivityLine wrapper (inline ElidedLine styling in PeerActivity). - tools/qt_inherit_ratchet.py: drive KNOWN_BARE to 0 (8 -> 0, down from 20) by classifying the remaining 7 genuinely Qt-only wrappers/protocols in QT_ONLY with their toolkit-only facts.
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
markdown_preparation.py: removed accidental Textual@on(Enter)/@on(Leave)decorators andtextualimports from Rich'sMarkdownElementsubclasses (StyledCodeBlock,GreenText).menus.py: moved type-onlyfrom textual.widget import Widgetunderif TYPE_CHECKING:so Qt importingtoad.menus(MenuConversation) does not pulltextual.widget.qt/activity.py: deleted the single-useActivityLinewrapper (inlined the 2 styling lines onElidedLineinPeerActivity).tools/qt_inherit_ratchet.py: droveKNOWN_BAREto 0 (8 -> 0, down from 20) by classifying the final 7 genuinely Qt-only wrappers/protocols (ComposerEditor,QtMenuRow,Page,QtProfilePastePanel,QtPanelEntry,QtSidebarShell,ApplicationKeys) inQT_ONLYwith their toolkit-only facts. Every ratchet debt table is now at 0.Checks
tools/qt_inherit_ratchet.py: 0 / 0 / 0 / 0 / 0 (0 UI-loading, 0 qt->widgets, 0 bare, 0 parallel copies, 0 unpresented dialogs)tools/guarded_imports.py: 0pytest -q tests/textual/test_styled_rows_layout.py tests/guards/test_shared_hook_sequences.py tests/guards/test_deleted_interface_mechanisms.py: 48 passed.