aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-12-05 19:06:04 +0000
committerMichael Williamson <mike@zwobble.org>2026-12-05 19:06:04 +0000
commit3646167ab5685ea5a69de24442cf46e963bf7f41 (patch)
tree88c418c417d14abea053d13d59d05ad2c0c97040 /mammoth/docx
parentefe3137e0a4cf574d2cf155079615cf238ff723e (diff)
Add results.combine_obj()
Diffstat (limited to 'mammoth/docx')
-rw-r--r--mammoth/docx/__init__.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/mammoth/docx/__init__.py b/mammoth/docx/__init__.py
index 58bfa50..0579d09 100644
--- a/mammoth/docx/__init__.py
+++ b/mammoth/docx/__init__.py
@@ -29,11 +29,16 @@ def read(fileobj, external_file_access=False):
external_file_access=external_file_access,
)
- return results.combine([
- _read_notes(read_part_with_body, part_paths),
- _read_comments(read_part_with_body, part_paths),
- ]).bind(lambda referents:
- _read_document(read_part_with_body, notes=referents[0], comments=referents[1], part_paths=part_paths)
+ return results.combine_obj(
+ notes=_read_notes(read_part_with_body, part_paths),
+ comments=_read_comments(read_part_with_body, part_paths),
+ ).bind(lambda referents:
+ _read_document(
+ read_part_with_body,
+ notes=referents.notes,
+ comments=referents.comments,
+ part_paths=part_paths,
+ )
)