Skip to content

Commit a5c629d

Browse files
committed
fix type mismatch in serialize_container argument
1 parent 957be2f commit a5c629d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arraycontext/container/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class NotAnArrayContainerError(TypeError):
122122

123123

124124
@singledispatch
125-
def serialize_container(ary: ArrayContainer) -> Iterable[Tuple[Any, Any]]:
125+
def serialize_container(ary: ArrayOrContainerT) -> Iterable[Tuple[Any, Any]]:
126126
r"""Serialize the array container into an iterable over its components.
127127
128128
The order of the components and their identifiers are entirely under
@@ -148,7 +148,9 @@ def serialize_container(ary: ArrayContainer) -> Iterable[Tuple[Any, Any]]:
148148

149149

150150
@singledispatch
151-
def deserialize_container(template: Any, iterable: Iterable[Tuple[Any, Any]]) -> Any:
151+
def deserialize_container(
152+
template: ArrayOrContainerT,
153+
iterable: Iterable[Tuple[Any, Any]]) -> Any:
152154
"""Deserialize an iterable into an array container.
153155
154156
:param template: an instance of an existing object that

0 commit comments

Comments
 (0)