From 3c56875304a81cb176c3a8e7053cbfc851fa95fb Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 19 Aug 2026 17:56:00 -0400 Subject: [PATCH] refactor: future-annotations headers keep aggregator annotations lazy (PyAutoFit#1505) Three aggregator modules evaluated af.Aggregator/af.GridSearchAggregator in def-time annotations, re-triggering the sqlalchemy/database import the import-time task defers. Co-Authored-By: Claude Fable 5 --- autolens/aggregator/fit_imaging.py | 2 ++ autolens/aggregator/fit_interferometer.py | 2 ++ autolens/aggregator/subhalo.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/autolens/aggregator/fit_imaging.py b/autolens/aggregator/fit_imaging.py index 855cade15..a97954b12 100644 --- a/autolens/aggregator/fit_imaging.py +++ b/autolens/aggregator/fit_imaging.py @@ -14,6 +14,8 @@ that exposes a generator of ``FitImaging`` objects, enabling memory-efficient iteration over large result sets. """ + +from __future__ import annotations from typing import Optional, List import autofit as af diff --git a/autolens/aggregator/fit_interferometer.py b/autolens/aggregator/fit_interferometer.py index ac6389050..b23ba7bea 100644 --- a/autolens/aggregator/fit_interferometer.py +++ b/autolens/aggregator/fit_interferometer.py @@ -15,6 +15,8 @@ ``Aggregator`` that exposes a generator of ``FitInterferometer`` objects, enabling memory-efficient iteration over large result sets. """ + +from __future__ import annotations from typing import Optional, List import autofit as af diff --git a/autolens/aggregator/subhalo.py b/autolens/aggregator/subhalo.py index 1e361c3da..0a603181d 100644 --- a/autolens/aggregator/subhalo.py +++ b/autolens/aggregator/subhalo.py @@ -10,6 +10,8 @@ for the best-fit model in each cell — both the "with subhalo" fit and (optionally) the "no subhalo" baseline — enabling the per-cell log-evidence difference map to be computed. """ + +from __future__ import annotations from typing import Optional import autofit as af