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:
Shantanu
2021-01-04 00:03:32 -08:00
committed by GitHub
parent bc1fe548b9
commit 484c014665
9 changed files with 62 additions and 62 deletions

View File

@@ -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: ...