diff --git a/swig/amici.i b/swig/amici.i index 645cd043b5..62e5a80db8 100644 --- a/swig/amici.i +++ b/swig/amici.i @@ -341,6 +341,8 @@ def __repr__(self): // Handle AMICI_DLL_DIRS environment variable %pythonbegin %{ +from __future__ import annotations + import sys import os @@ -353,8 +355,6 @@ if sys.platform == 'win32' and (dll_dirs := os.environ.get('AMICI_DLL_DIRS')): // import additional types for typehints // also import np for use in __repr__ functions %pythonbegin %{ -from __future__ import annotations - from typing import TYPE_CHECKING, Iterable, Sequence import numpy as np if TYPE_CHECKING: