-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: make meta produced by DOCXToDocument
JSON serializable
#8263
Conversation
Pull Request Test Coverage Report for Build 10507658991Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
@@ -47,13 +46,13 @@ class DOCXMetadata: | |||
category: str | |||
comments: str | |||
content_status: str | |||
created: Optional[datetime] | |||
created: Optional[str] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why is it marked as optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Date properties return None if not set.
from https://python-docx.readthedocs.io/en/latest/api/document.html#coreproperties-objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to merge after we update the docstring to mention that the timestamps are ISO formatted strings.
…t-ai#8263) * make meta from DOCXToDocument JSON serializable * unused import * update docstrings
Related Issues
Proposed Changes:
Simply convert the
datetime
object to stringsHow did you test it?
CI
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.