diff --git a/thrift/lib/python/mutable_types.pyi b/thrift/lib/python/mutable_types.pyi index 717cfc096d8..6a23b8282a3 100644 --- a/thrift/lib/python/mutable_types.pyi +++ b/thrift/lib/python/mutable_types.pyi @@ -17,6 +17,7 @@ import typing from thrift.python.exceptions import Error +from thrift.python.types import Struct # Base class for mutable structs and mutable unions class MutableStructOrUnion: @@ -28,7 +29,14 @@ class MutableStructOrUnion: class MutableStructMeta(type): ... class MutableUnionMeta(type): ... class MutableGeneratedError(Error): ... -class MutableStruct(MutableStructOrUnion, metaclass=MutableStructMeta): ... + +class MutableStruct( + MutableStructOrUnion, + typing.Iterable[typing.Tuple[str, typing.Any]], + metaclass=MutableStructMeta, +): + def _to_python(self) -> Struct: ... + class MutableUnion(MutableStructOrUnion, metaclass=MutableUnionMeta): ... MutableStructOrError = typing.Union[MutableStruct, MutableGeneratedError]