Skip to content

refactor: future-annotations headers for lazy af.Aggregator - #575

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/lazy-heavy-imports
Aug 19, 2026
Merged

refactor: future-annotations headers for lazy af.Aggregator#575
Jammy2211 merged 1 commit into
mainfrom
feature/lazy-heavy-imports

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Part of the cross-repo import-time task (PyAutoFit#1505). PyAutoFit's Aggregator is now a lazy attribute so sqlalchemy + the database models stay off the bare import path — but two aggregator modules here evaluate af.Aggregator in def-time annotations, re-triggering that import. Two one-line from __future__ import annotations headers (imaging.py, interferometer.py; the other aggregator modules already have them) make the annotations lazy strings.

API Changes

None — internal changes only (annotation evaluation semantics in two modules).
See full details below.

Test Plan

  • Full suite: 1111 passed against the PyAutoFit/PyAutoArray/PyAutoNerves branches
  • import autolens shows no sqlalchemy in the import tree
  • autogalaxy_workspace smoke: 16/16 passed
Full API Changes (for automation & release notes)

Changed Behaviour

  • None — from __future__ import annotations added to aggregator/imaging/imaging.py and aggregator/interferometer/interferometer.py; annotations become lazy strings (PEP 563), no runtime introspection of them exists.

Migration

  • None required.

Generated by the PyAutoLabs agent workflow.

…azy (PyAutoFit#1505)

Two aggregator modules evaluated af.Aggregator in def-time annotations,
re-triggering the sqlalchemy/database import the import-time task defers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Aug 19, 2026
@Jammy2211
Jammy2211 merged commit f1c3c02 into main Aug 19, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/lazy-heavy-imports branch August 19, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant