Skip to content

Commit 4fe9658

Browse files
committed
fix typing syntax for older python versions
1 parent 8013865 commit 4fe9658

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/omfiles/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import Union
2+
13
import numpy as np
24

35
from omfiles.types import ArrayType
@@ -24,5 +26,5 @@ def _modulo_positive(value: int, modulo: int) -> int:
2426
return ((value % modulo) + modulo) % modulo
2527

2628

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

0 commit comments

Comments
 (0)