mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-03 01:53:24 +08:00
Suffix T to type variable names (#4898)
* _MessageType to _MessageT * _default to _T * _TConnection to _ConnectionT, _TListener to _ListenerT * _Number to _NumberT * _MessageVar to _MessageT * _Type to _TypeT * _ArgType to _T * _Ch to _CharT Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -2,7 +2,7 @@ from typing import Any, Dict, Text, TypeVar, Union
|
||||
|
||||
from google.protobuf.message import Message
|
||||
|
||||
_MessageVar = TypeVar("_MessageVar", bound=Message)
|
||||
_MessageT = TypeVar("_MessageT", bound=Message)
|
||||
|
||||
class Error(Exception): ...
|
||||
class ParseError(Error): ...
|
||||
@@ -22,5 +22,5 @@ def MessageToDict(
|
||||
preserving_proto_field_name: bool = ...,
|
||||
use_integers_for_enums: bool = ...,
|
||||
) -> Dict[Text, Any]: ...
|
||||
def Parse(text: Union[bytes, Text], message: _MessageVar, ignore_unknown_fields: bool = ...) -> _MessageVar: ...
|
||||
def ParseDict(js_dict: Any, message: _MessageVar, ignore_unknown_fields: bool = ...) -> _MessageVar: ...
|
||||
def Parse(text: Union[bytes, Text], message: _MessageT, ignore_unknown_fields: bool = ...) -> _MessageT: ...
|
||||
def ParseDict(js_dict: Any, message: _MessageT, ignore_unknown_fields: bool = ...) -> _MessageT: ...
|
||||
|
||||
Reference in New Issue
Block a user