Repository navigation
refactor: move the revision listing methods into a RevisionManager mixin (ROADMAP.md #73) - #93
Conversation
…xin (ROADMAP.md #73)
|
Warning Review limit reachedNext included review available in 14 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #93 +/- ##
=======================================
- Coverage 98.0% 97.9% -0.2%
=======================================
Files 21 22 +1
Lines 5067 5132 +65
Branches 984 991 +7
=======================================
+ Hits 4969 5026 +57
- Misses 46 51 +5
- Partials 52 55 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What
manager.pyloses its revision-listing cluster — the_RevisionLocationContextcache plus nine methods (has_own_revisions,list_revisions,get_markup_text,_parse_revision,_revision_element_index,_is_in_document,_find_revision_element,_unhandled_elements,list_unhandled_revisions) — to a new_ListingMixinindocx_editor/track_changes/listing.py. No behavior change; the public API is untouched.Why
Step 8 of the track_changes decomposition (ROADMAP.md #73). manager.py drops from 1135 to 745 lines, leaving only the resolution cluster and
__init__for the final step.How
Byte-identical cut/paste.
base.pygains one stub,changeset_id_of(itsdefline copied verbatim from registry.py), so ty resolves the mixin's one cross-cluster call. Adding_ListingMixinpushesRevisionManager's class header past the 120-char limit, so ruff format wraps it across three lines — andscripts/check_pure_move.py's check 1 allowlisted only single-line class headers.content_lines()therefore gains a narrow wrapped-header rule (openerclass Name(, indented base-list entries,):terminator); check 2's byte-for-byte AST comparison is untouched and still guards every moved method. Reviewers should look at that gate change first.Testing
check_pure_move.py --base main: 3/3 ok.ruff check+ruff format --check: clean.ty check: only the 7 pre-existing test diagnostics. listing.py: 100% line and branch coverage from the existing suite (135 stmts, 68 branches, 0 missed). Full suite: 1846 passed, 8 skipped, 2 xfailed.