From 283e1d313bdf4ac1fbe8193d6f018a4cb49e8cf4 Mon Sep 17 00:00:00 2001 From: matin Date: Sun, 5 Oct 2025 15:39:15 +0200 Subject: removed unnecessary functions; selective imports --- prediction_report_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'prediction_report_service.py') 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() -- cgit v1.1