summaryrefslogtreecommitdiff
path: root/prediction_report_service.py
diff options
context:
space:
mode:
authormatin <matin.kaufmann@gmail.com>2025-10-05 15:39:15 +0200
committermatin <matin.kaufmann@gmail.com>2025-10-05 15:39:15 +0200
commit283e1d313bdf4ac1fbe8193d6f018a4cb49e8cf4 (patch)
treec9ad9f9d769e70467a77f552342528ac0fc378bf /prediction_report_service.py
parent4b216267034d767c27001f54d6df5327e4be149f (diff)
removed unnecessary functions; selective imports
Diffstat (limited to 'prediction_report_service.py')
-rw-r--r--prediction_report_service.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/prediction_report_service.py b/prediction_report_service.py
index 4b2e521..7017ac6 100644
--- a/prediction_report_service.py
+++ b/prediction_report_service.py
@@ -2,7 +2,7 @@ from datetime import datetime
from typing import List
from io import BytesIO
-from xhtml2pdf import pisa
+# Import xhtml2pdf lazily in export to avoid heavy import at module load
from calendar_manager import CalendarManager
from prediction_controller import PredictionController
@@ -18,6 +18,7 @@ class PredictionReportService:
out_path: str,
dateformat: str = "dd.MM.yyyy") -> bool:
try:
+ from xhtml2pdf import pisa
# Gather data
launch_dt = prediction_controller.get_launch_date()
duration = prediction_controller.get_duration()