diff options
| author | matin <matin.kaufmann@gmail.com> | 2025-10-05 15:39:15 +0200 |
|---|---|---|
| committer | matin <matin.kaufmann@gmail.com> | 2025-10-05 15:39:15 +0200 |
| commit | 283e1d313bdf4ac1fbe8193d6f018a4cb49e8cf4 (patch) | |
| tree | c9ad9f9d769e70467a77f552342528ac0fc378bf /prediction_report_service.py | |
| parent | 4b216267034d767c27001f54d6df5327e4be149f (diff) | |
removed unnecessary functions; selective imports
Diffstat (limited to 'prediction_report_service.py')
| -rw-r--r-- | prediction_report_service.py | 3 |
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()
|
