From ea03b4fd7e978084079fef6f222bdb5c4ee97de5 Mon Sep 17 00:00:00 2001 From: Pip Liggins Date: Fri, 9 Feb 2024 10:58:51 +0000 Subject: [PATCH] Use typing List/Dict --- pybamm/type_definitions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pybamm/type_definitions.py b/pybamm/type_definitions.py index 4bccd4c3bd..c3d0a56faa 100644 --- a/pybamm/type_definitions.py +++ b/pybamm/type_definitions.py @@ -3,7 +3,7 @@ # from __future__ import annotations -from typing import Union +from typing import Union, List, Dict from typing_extensions import TypeAlias import numpy as np import pybamm @@ -15,6 +15,6 @@ ChildValue: TypeAlias = Union[float, np.ndarray] ChildSymbol: TypeAlias = Union[float, np.ndarray, pybamm.Symbol] -DomainType: TypeAlias = Union[list[str], str, None] -AuxiliaryDomainType: TypeAlias = Union[dict[str, str], None] -DomainsType: TypeAlias = Union[dict[str, Union[list[str], str]], None] +DomainType: TypeAlias = Union[List[str], str, None] +AuxiliaryDomainType: TypeAlias = Union[Dict[str, str], None] +DomainsType: TypeAlias = Union[Dict[str, Union[List[str], str]], None]