@@ -911,7 +911,7 @@ def send(self, item: object) -> None:
911
911
raise OSError (f"cannot send to { self !r} " )
912
912
self .gateway ._send (Message .CHANNEL_DATA , self .id , dumps_internal (item ))
913
913
914
- def receive (self , timeout : float | None = None ) -> object :
914
+ def receive (self , timeout : float | None = None ) -> Any :
915
915
"""Receive a data item that was sent from the other side.
916
916
917
917
timeout: None [default] blocked waiting. A positive number
@@ -935,10 +935,10 @@ def receive(self, timeout: float | None = None) -> object:
935
935
else :
936
936
return x
937
937
938
- def __iter__ (self ) -> Iterator [object ]:
938
+ def __iter__ (self ) -> Iterator [Any ]:
939
939
return self
940
940
941
- def next (self ) -> object :
941
+ def next (self ) -> Any :
942
942
try :
943
943
return self .receive ()
944
944
except EOFError :
@@ -1403,7 +1403,7 @@ def __init__(
1403
1403
else :
1404
1404
self .channelfactory = gw ._channelfactory
1405
1405
1406
- def load (self , versioned : bool = False ) -> object :
1406
+ def load (self , versioned : bool = False ) -> Any :
1407
1407
if versioned :
1408
1408
ver = self .stream .read (1 )
1409
1409
if ver != DUMPFORMAT_VERSION :
@@ -1587,7 +1587,7 @@ def dump(byteio, obj: object) -> None:
1587
1587
1588
1588
def loads (
1589
1589
bytestring : bytes , py2str_as_py3str : bool = False , py3str_as_py2str : bool = False
1590
- ) -> object :
1590
+ ) -> Any :
1591
1591
"""Deserialize the given bytestring to an object.
1592
1592
1593
1593
py2str_as_py3str: If true then string (str) objects previously
@@ -1609,7 +1609,7 @@ def loads(
1609
1609
1610
1610
def load (
1611
1611
io : ReadIO , py2str_as_py3str : bool = False , py3str_as_py2str : bool = False
1612
- ) -> object :
1612
+ ) -> Any :
1613
1613
"""Derserialize an object form the specified stream.
1614
1614
1615
1615
Behaviour and parameters are otherwise the same as with ``loads``
@@ -1622,7 +1622,7 @@ def loads_internal(
1622
1622
bytestring : bytes ,
1623
1623
channelfactory = None ,
1624
1624
strconfig : tuple [bool , bool ] | None = None ,
1625
- ) -> object :
1625
+ ) -> Any :
1626
1626
io = BytesIO (bytestring )
1627
1627
return Unserializer (io , channelfactory , strconfig ).load ()
1628
1628
0 commit comments