Skip to content

Move python-docx import to top-level in route_backend_conversation_export.py#784

Merged
eldong merged 2 commits intoexport-messagefrom
copilot/sub-pr-783
Mar 10, 2026
Merged

Move python-docx import to top-level in route_backend_conversation_export.py#784
eldong merged 2 commits intoexport-messagefrom
copilot/sub-pr-783

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

from docx import Document as DocxDocument was placed inside the api_export_message_word route handler body with no comment justifying the inline placement. Per project convention, imports belong at the module level.

Changes

  • route_backend_conversation_export.py: Moved from docx import Document as DocxDocument from inside the route handler to the top-level import block alongside the other third-party imports.
# Before
def api_export_message_word():
    from docx import Document as DocxDocument  # inline, no justification
    ...

# After (top of file)
from docx import Document as DocxDocument

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: eldong <11573590+eldong@users.noreply.github.com>
Copilot AI changed the title [WIP] Update imports to address review feedback on export feature Move python-docx import to top-level in route_backend_conversation_export.py Mar 10, 2026
@eldong eldong marked this pull request as ready for review March 10, 2026 14:47
@eldong eldong merged commit a2a93dd into export-message Mar 10, 2026
2 checks passed
@eldong eldong deleted the copilot/sub-pr-783 branch March 10, 2026 14:48
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.

2 participants