From 3646167ab5685ea5a69de24442cf46e963bf7f41 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 5 Dec 2026 19:06:04 +0000 Subject: Add results.combine_obj() --- mammoth/docx/__init__.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'mammoth/docx') 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, + ) ) -- cgit v1.2.3