mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Change return type of Message.get_payload() to Any (#3504)
If, for example, is_multipart() is called before calling get_payload(), it is guaranteed that a List[Message] is returned.
This commit is contained in:
committed by
Jelle Zijlstra
parent
643b955edb
commit
595d02363a
@@ -26,7 +26,7 @@ class Message:
|
||||
def set_unixfrom(self, unixfrom: str) -> None: ...
|
||||
def get_unixfrom(self) -> Optional[str]: ...
|
||||
def attach(self, payload: Message) -> None: ...
|
||||
def get_payload(self, i: int = ..., decode: bool = ...) -> Optional[_PayloadType]: ...
|
||||
def get_payload(self, i: int = ..., decode: bool = ...) -> Any: ... # returns Optional[_PayloadType]
|
||||
def set_payload(self, payload: _PayloadType,
|
||||
charset: _CharsetType = ...) -> None: ...
|
||||
def set_charset(self, charset: _CharsetType) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user