Skip to content

Comments

refactor(inspect): centralize text-frame XML access via helper#38

Merged
tmustier merged 2 commits intomainfrom
refactor/inspect-textframe-access-pass3
Feb 12, 2026
Merged

refactor(inspect): centralize text-frame XML access via helper#38
tmustier merged 2 commits intomainfrom
refactor/inspect-textframe-access-pass3

Conversation

@tmustier
Copy link
Owner

Summary

Continue the dynamic-access cleanup by routing remaining text-frame private XML probing in inspect_pptx.py through shared pptx_access helpers.

Changes

New helper

  • clean_slides/pptx_access.py
    • added text_frame_xml_element(...) to centralize access to text-frame _element.

Inspect migration

  • clean_slides/inspect_pptx.py
    • _parse_text_frame(...) now uses text_frame_xml_element(...) instead of direct tf._element access.
    • inspect_layout(...) paragraph default-style inspection now uses paragraph_xml_element(...) and guarded cast flow.
    • _paragraph_xml(...) now returns a casted XmlElement after helper guard.
    • RunInfo.to_dict(...) no longer uses reflective getattr; switched to explicit ordered field emission.

Tests

  • tests/test_pptx_access.py
    • added coverage for text_frame_xml_element(...).

Validation

  • .venv/bin/ruff check clean_slides tests
  • .venv/bin/pyright
  • .venv/bin/pytest -q
  • .venv/bin/pre-commit run --all-files

All green locally.

@tmustier tmustier merged commit be7f1b0 into main Feb 12, 2026
7 checks passed
@tmustier tmustier deleted the refactor/inspect-textframe-access-pass3 branch February 12, 2026 16:28
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