Skip to content

Commit 8d8e609

Browse files
committed
fix typing syntax for older python versions
1 parent 8013865 commit 8d8e609

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/omfiles/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import numpy as np
22

33
from omfiles.types import ArrayType
4+
from typing import Union
45

56
EPOCH = np.datetime64(0, "s")
67

@@ -24,5 +25,5 @@ def _modulo_positive(value: int, modulo: int) -> int:
2425
return ((value % modulo) + modulo) % modulo
2526

2627

27-
def _normalize_longitude(lon: ArrayType | float) -> ArrayType | float:
28+
def _normalize_longitude(lon: Union[ArrayType, float]) -> Union[ArrayType, float]:
2829
return ((lon + 180.0) % 360.0) - 180.0

0 commit comments

Comments
 (0)