Skip to content

Commit

Permalink
Fix TypeError for optional region arg in TypedDict
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvothecoder committed Nov 21, 2024
1 parent 636366b commit 82cbfe2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xcdat/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Hashable,
List,
Literal,
Optional,
Tuple,
TypedDict,
Union,
Expand Down Expand Up @@ -267,7 +268,7 @@ def get_weights(
and pressure).
"""
Bounds = TypedDict(
"Bounds", {"weights_method": Callable, "region": np.ndarray | None}
"Bounds", {"weights_method": Callable, "region": Optional[np.ndarray]}
)

axis_bounds: Dict[SpatialAxis, Bounds] = {
Expand Down

0 comments on commit 82cbfe2

Please sign in to comment.