File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919except (ModuleNotFoundError , ImportError ) as exc : # pragma: no cover
2020 raise CompiledExtensionNotFoundError ("example_fgen_basic._lib.m_error_v_w" ) from exc
2121try :
22- from example_fgen_basic ._lib import ( # type: ignore
23- m_error_v_creation_w ,
24- )
22+ from example_fgen_basic ._lib import m_error_v_creation_w
2523except (ModuleNotFoundError , ImportError ) as exc : # pragma: no cover
2624 raise CompiledExtensionNotFoundError (
2725 "example_fgen_basic._lib.m_error_v_creation_w"
Original file line number Diff line number Diff line change 2121except (ModuleNotFoundError , ImportError ) as exc : # pragma: no cover
2222 raise CompiledExtensionNotFoundError ("example_fgen_basic._lib.m_error_v_w" ) from exc
2323try :
24- from example_fgen_basic ._lib import ( # type: ignore
25- m_error_v_passing_w ,
26- )
24+ from example_fgen_basic ._lib import m_error_v_passing_w
2725except (ModuleNotFoundError , ImportError ) as exc : # pragma: no cover
2826 raise CompiledExtensionNotFoundError (
2927 "example_fgen_basic._lib.m_error_v_passing_w"
@@ -84,7 +82,9 @@ def pass_errors(invs: tuple[ErrorV, ...]) -> NP_ARRAY_OF_BOOL:
8482 )
8583
8684 # Convert the result to boolean
87- res_raw = m_error_v_passing_w .pass_errors (instance_indexes , n = instance_indexes .size )
85+ res_raw : NP_ARRAY_OF_INT = m_error_v_passing_w .pass_errors (
86+ instance_indexes , n = instance_indexes .size
87+ )
8888 res = res_raw .astype (bool )
8989
9090 # Tell Fortran to finalise the objects on the Fortran side
Original file line number Diff line number Diff line change 77from typing import TYPE_CHECKING
88
99if TYPE_CHECKING :
10- from typing import Any , TypeAlias , Union
10+ from typing import Union
1111
1212 import numpy as np
1313 import numpy .typing as npt
14+ from typing_extensions import Any , TypeAlias
1415
15- NP_ARRAY_OF_INT : TypeAlias = npt .NDArray [np .integer ]
16+ NP_ARRAY_OF_INT : TypeAlias = npt .NDArray [np .integer [ Any ] ]
1617 """
1718 Type alias for an array of numpy int
1819 """
1920
20- NP_ARRAY_OF_FLOAT : TypeAlias = npt .NDArray [np .floating ]
21+ NP_ARRAY_OF_FLOAT : TypeAlias = npt .NDArray [np .floating [ Any ] ]
2122 """
2223 Type alias for an array of numpy floats
2324 """
2425
25- NP_FLOAT_OR_INT : TypeAlias = Union [np .floating , np .integer ]
26+ NP_FLOAT_OR_INT : TypeAlias = Union [np .floating [ Any ] , np .integer [ Any ] ]
2627 """
2728 Type alias for a numpy float or int (not complex)
2829 """
You can’t perform that action at this time.
0 commit comments