Skip to content

Hoist NRA-flagged defaults and drop QtContextExplorer isinstance tests - #2233

Merged
trissim merged 1 commit into
mainfrom
toad-qt/nra-slop-sweep-25
Nov 24, 2026
Merged

trissim merged 1 commit into
mainfrom
toad-qt/nra-slop-sweep-25

Conversation

@trissim

@trissim trissim commented Nov 24, 2026

Copy link
Copy Markdown

Summary

Clears five more nominal_refactor_advisor findings (7 files, -24 net lines):

  • AgentPresentation.TURN_BINDING = LocalTurnBinding (agent_presentation.py): removes duplicate declarations on LocalAgentPresentation and ACPAgentPresentation.
  • AgentConnection.observe_thread_presentation (agent_binding.py, agent.py): default no-op removes identical empty overrides on AgentBase and NoAgentConnection; NoAgentConnection.change_project/request_compaction now use shared view.flash_error().
  • CategorySelection.categories_changed (category_selection.py, category_filter.py): default no-op removes identical empty overrides on CategoryFilterView and NoCategorySelection.
  • ReaderPosition.shifted (reader_position.py): defaults to return self, removing identical overrides on TailPosition and UnshownReader (while ArrivalPosition still intentionally overrides FragmentPosition.shifted).
  • QtContextExplorer (qt/context_panel.py): check model is None instead of isinstance(model, ContextNode) in _on_selection/_on_expanded/_on_collapsed.

Checks

  • Runtime MRO owner assertions across all affected families: passed
  • tools/guarded_imports.py: 0
  • pytest -q tests/guards/test_shared_hook_sequences.py tests/guards/test_shared_history_change.py tests/guards/test_deleted_interface_mechanisms.py: 52 passed.

…egorySelection, ReaderPosition, and drop QtContextExplorer isinstance tests

- AgentPresentation.TURN_BINDING defaults to LocalTurnBinding (removes duplicate declarations on LocalAgentPresentation and ACPAgentPresentation).
- AgentConnection.observe_thread_presentation defaults to no-op (removes identical empty overrides on AgentBase and NoAgentConnection); also switch NoAgentConnection.change_project/request_compaction to shared view.flash_error().
- CategorySelection.categories_changed defaults to no-op (removes identical empty overrides on CategoryFilterView and NoCategorySelection).
- ReaderPosition.shifted defaults to return self (removes identical overrides on TailPosition and UnshownReader).
- QtContextExplorer._on_selection/_on_expanded/_on_collapsed: check model is None instead of redundant isinstance(model, ContextNode) (clears 3 NRA own_type_test findings).
@trissim
trissim merged commit c3cb2b2 into main Nov 24, 2026
1 of 2 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