Skip to content

feat: add comments support #1495

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

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a8448d3
xfail: acceptance test for Document.comments
scanny Jun 10, 2025
0918eae
comments: add Document.comments
scanny Jun 10, 2025
ba99fd1
comments: add DocumentPart.comments
scanny Jun 10, 2025
c845531
comments: add DocumentPart._comments_part
scanny Jun 10, 2025
dbc7527
comments: add CommentsPart.comments
scanny Jun 10, 2025
4bc6f65
comments: package-loader loads CommentsPart
scanny Jun 10, 2025
c3fa43f
comments: add Comments.__len__()
scanny Jun 10, 2025
4a611e7
comments: add Comments.__iter__()
scanny Jun 10, 2025
0cdfa49
comments: add Comments.get()
scanny Jun 10, 2025
168ae80
comments: add Comment.comment_id
scanny Jun 10, 2025
5ff4fae
xfail: acceptance test for Comment properties
scanny Jun 10, 2025
8cbd08c
comments: add Comment.author
scanny Jun 10, 2025
07133dd
comments: add Comment.initials
scanny Jun 10, 2025
870302b
comments: add Comment.timestamp
scanny Jun 10, 2025
e21a27d
comments: add Comment.paragraphs
scanny Jun 10, 2025
4ff09c1
drawing: add image extraction from Drawing
scanny Jun 10, 2025
1c1351e
xfail: acceptance test for Comment mutations
scanny Jun 10, 2025
9fc77af
comments: add Comments.add_comment()
scanny Jun 10, 2025
fdf9f4e
comments: add Comment.author, .initials setters
scanny Jun 10, 2025
4677ad1
xfail: acceptance test for Document.add_comment()
scanny Jun 10, 2025
ff57c6d
comments: add Document.add_comment()
scanny Jun 9, 2025
a34b339
comments: add Run.mark_comment_range()
scanny Jun 10, 2025
e056454
comments: add Comment.text
scanny Jun 10, 2025
545b739
docs: add Comments docs
scanny Jun 12, 2025
7114e98
build: small adjustments for tox
scanny Jun 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/_static/img/comment-parts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions docs/api/comments.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

.. _comments_api:

Comment-related objects
=======================

.. currentmodule:: docx.comments


|Comments| objects
------------------

.. autoclass:: Comments()
:members:
:inherited-members:
:exclude-members:
part


|Comment| objects
------------------

.. autoclass:: Comment()
:members:
:inherited-members:
:exclude-members:
part
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@

.. |_Columns| replace:: :class:`._Columns`

.. |Comment| replace:: :class:`.Comment`

.. |Comments| replace:: :class:`.Comments`

.. |CoreProperties| replace:: :class:`.CoreProperties`

.. |datetime| replace:: :class:`.datetime.datetime`
Expand Down
Loading