refactor(inspect): centralize text-frame XML access via helper#38
Merged
refactor(inspect): centralize text-frame XML access via helper#38
Conversation
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
Continue the dynamic-access cleanup by routing remaining text-frame private XML probing in
inspect_pptx.pythrough sharedpptx_accesshelpers.Changes
New helper
clean_slides/pptx_access.pytext_frame_xml_element(...)to centralize access to text-frame_element.Inspect migration
clean_slides/inspect_pptx.py_parse_text_frame(...)now usestext_frame_xml_element(...)instead of directtf._elementaccess.inspect_layout(...)paragraph default-style inspection now usesparagraph_xml_element(...)and guarded cast flow._paragraph_xml(...)now returns a castedXmlElementafter helper guard.RunInfo.to_dict(...)no longer uses reflectivegetattr; switched to explicit ordered field emission.Tests
tests/test_pptx_access.pytext_frame_xml_element(...).Validation
.venv/bin/ruff check clean_slides tests.venv/bin/pyright.venv/bin/pytest -q.venv/bin/pre-commit run --all-filesAll green locally.