Skip to content

Commit 75adddd

Browse files
committed
fix: Windows libreoffice CI install and mypy errors
1 parent a02cc9c commit 75adddd

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/libreoffice.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858

5959
- name: Install LibreOffice headless (Windows)
6060
if: runner.os == 'Windows'
61-
run: choco install libreoffice -y
61+
run: choco install libreoffice-fresh -y
6262

6363
- name: Install LibreOffice headless (macOS)
6464
if: runner.os == 'macOS'

integrations/libreoffice/src/haystack_integrations/components/converters/libreoffice/converter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,10 @@ def run(
261261
or if `output_file_type` is not a valid conversion target for it,
262262
or if `output_file_type` has not been provided anywhere.
263263
"""
264-
if output_file_type is None and self.output_file_type is None:
264+
output_file_type = output_file_type or self.output_file_type
265+
if output_file_type is None:
265266
msg = "output_file_type must be provided either during initialization or for this method"
266267
raise ValueError(msg)
267-
output_file_type = output_file_type or self.output_file_type
268268

269269
outputs: list[ByteStream] = []
270270
with TemporaryDirectory() as tmpdir:
@@ -337,10 +337,10 @@ async def run_async(
337337
or if `output_file_type` is not a valid conversion target for it,
338338
or if `output_file_type` has not been provided anywhere.
339339
"""
340-
if output_file_type is None and self.output_file_type is None:
340+
output_file_type = output_file_type or self.output_file_type
341+
if output_file_type is None:
341342
msg = "output_file_type must be provided either during initialization or for this method"
342343
raise ValueError(msg)
343-
output_file_type = output_file_type or self.output_file_type
344344

345345
outputs: list[ByteStream] = []
346346
with TemporaryDirectory() as tmpdir:

0 commit comments

Comments
 (0)