feat: Phase D.9: Numbering style control (restart, custom lists, nested lists)#108
feat: Phase D.9: Numbering style control (restart, custom lists, nested lists)#108citconv-agents[bot] wants to merge 2 commits intomasterfrom
Conversation
…s) (#22) Add comprehensive numbering/list control addressing the most requested upstream features (python-openxml#582, #25, python-openxml#122). New API: - document.numbering — access numbering definitions - document.numbering.add_numbering_definition(levels) — create custom multi-level lists with format, text pattern, indent, and font options - document.numbering.definitions — iterate all numbering definitions - paragraph.list_level — get/set indent level (0-8) - paragraph.list_format — get/set numbering definition ID and level - paragraph.numbering_format — read current list format string - paragraph.restart_numbering() — restart counter at 1 via lvlOverride Implementation: - CT_AbstractNum, CT_Lvl oxml element classes for abstract numbering - CT_NumPr ilvl_val/numId_val properties - CT_PPr numPr_ilvl_val/numPr_numId_val convenience properties - NumberingPart.new() with default-numbering.xml template - Numbering, NumberingDefinition, LevelFormat proxy classes - _ListFormat helper on Paragraph Closes #22 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Security Agent Report SECURITY_PASS Security Review: PR #108 — Numbering Style ControlSummaryAll changed files were reviewed. No security issues found. Files Reviewed
ChecksXML Injection / XXE
Path Traversal
New Dependencies
Secrets in Code
Data Exposure / Unsafe File Handling
ResultCLEAN — no security issues identified. |
|
Review Agent REVIEW_CHANGES_NEEDED PR #108 — Numbering Style Control ReviewOverall the implementation is solid: architecture follows project patterns correctly, tests are thorough and well-structured, and the three-layer design (oxml → parts → proxy) is properly observed. A few fixable issues below. 1. Unused imports in
|
- Remove unused imports (Iterator, Twips) from numbering.py - Hoist repeated in-loop imports (OxmlElement, qn) to module level - Add orphan numPr cleanup to numPr_ilvl_val setter, mirroring numPr_numId_val Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Security Agent Report SECURITY_PASS Security Review — PR #108Branch: agent/issue-22 Files Reviewed
FindingsXML Injection / XXENo issues found.
Path TraversalNo issues found. The file read in path = os.path.join(
os.path.split(__file__)[0], "..", "templates", "default-numbering.xml"
)No user input influences this path. New DependenciesNo new dependencies introduced. The only new stdlib import is Secrets / CredentialsNone found. No API keys, tokens, passwords, or other sensitive data in any changed file. Data Exposure / Unsafe File HandlingNo issues found. The template file is opened in binary read mode ( Notes (Non-Security)
ConclusionNo security issues identified. The changes follow established patterns in the codebase, rely on lxml for safe XML serialization, introduce no new third-party dependencies, and handle all file I/O using hardcoded internal paths. |
|
Review Agent REVIEW_CHANGES_NEEDED SummaryThe PR adds solid numbering/list control infrastructure with a clean three-layer design and good test coverage. A few issues need addressing before merging. Issues1. Dead code:
|
Summary
Implements #22
This PR was automatically generated by the Developer Agent.
Original Issue
Add comprehensive numbering/list control. Most requested upstream feature (python-openxml#582: 83 comments, #25: 37 comments, python-openxml#122: 27 comments).
API Design
Restart numbering:
Custom list styles:
Nested lists:
Access existing numbering:
XML
Upstream issues: python-openxml#582, #25, python-openxml#122
Generated by Developer Agent using Claude Code