Add undocumented methods codecs.utf_16_be_{decode,encode}. (#3091)

I found the signatures here:
https://github.com/python/cpython/blob/6a16b18224fa98f6d192aa5014affeccc0376eb3/Modules/_codecsmodule.c#L729

https://github.com/google/pytype/issues/348 was opened against
pytype about utf_16_be_encode being missing.
This commit is contained in:
Rebecca Chen
2019-06-26 20:29:16 -07:00
committed by GitHub
parent 7e9e91cb7b
commit 5dc89fe8cf
+2
View File
@@ -31,6 +31,8 @@ class _IncrementalDecoder(Protocol):
def encode(obj: _Decoded, encoding: str = ..., errors: str = ...) -> _Encoded: ...
def decode(obj: _Encoded, encoding: str = ..., errors: str = ...) -> _Decoded: ...
def lookup(encoding: str) -> CodecInfo: ...
def utf_16_be_decode(__obj: _Encoded, __errors: str = ..., __final: bool = ...) -> Tuple[_Decoded, int]: ... # undocumented
def utf_16_be_encode(__obj: _Decoded, __errors: str = ...) -> Tuple[_Encoded, int]: ... # undocumented
class CodecInfo(Tuple[_Encoder, _Decoder, _StreamReader, _StreamWriter]):
@property