We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c459288 commit 080d6e4Copy full SHA for 080d6e4
src/pyfabm/__init__.py
@@ -16,12 +16,17 @@
16
TypeVar,
17
List,
18
Dict,
19
- Literal,
20
Type,
21
overload,
22
- cast
+ cast,
23
)
24
+# typing.Final not available in Python 3.7
25
+try:
26
+ from typing import Final
27
+except ImportError:
28
+ from typing import Any as Final
29
+
30
try:
31
import importlib.metadata
32
@@ -125,7 +130,7 @@ def get_lib(name: str) -> FABMDLL:
125
130
lib.mask_type = mask_type.value
126
131
lib.variable_bottom_index = variable_bottom_index.value != 0
127
132
128
- CONTIGUOUS: Literal["CONTIGUOUS"] = "CONTIGUOUS"
133
+ CONTIGUOUS: Final = "CONTIGUOUS"
129
134
arrtype0D = np.ctypeslib.ndpointer(dtype=lib.dtype, ndim=0, flags=CONTIGUOUS)
135
arrtype1D = np.ctypeslib.ndpointer(dtype=lib.dtype, ndim=1, flags=CONTIGUOUS)
136
arrtypeInterior = np.ctypeslib.ndpointer(
0 commit comments