We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 492933e commit 771fa10Copy full SHA for 771fa10
1 file changed
src/asyncapi_python/amqp/utils.py
@@ -21,7 +21,7 @@
21
U = TypeVar("U")
22
23
24
-class UnionModel(RootModel): ...
+class UnionModel(RootModel[U]): ...
25
26
27
def encode_message(message: T) -> bytes:
@@ -33,6 +33,6 @@ def decode_message(message: bytes, schema: type[T]) -> T:
33
34
35
@cache
36
-def union_model(types: tuple[type[U], ...]) -> type[RootModel[U]]:
+def union_model(types: tuple[type[U], ...]) -> type[UnionModel[U]]:
37
UnionType = Union.__getitem__(types)
38
return UnionModel[UnionType] # type: ignore
0 commit comments