encodings: IncrementalEncoder and Decoder concrete (#1490)

These stubs are identical in Python 2 and 3, but I believe they
should not be merged, because there are numerous other modules
in the encodings package, and some only exist in some Python
versions. I don't think we can support that in the 2and3
directory.
This commit is contained in:
Jelle Zijlstra
2017-07-19 10:28:43 -07:00
committed by Łukasz Langa
parent 32d9c8cb8f
commit 00ddb1c84a
2 changed files with 18 additions and 16 deletions

View File

@@ -1,14 +1,15 @@
import codecs
from typing import Text, Tuple
class IncrementalEncoder(codecs.IncrementalEncoder):
pass
def encode(self, input: Text, final: bool = ...) -> bytes: ...
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
pass
class StreamWriter(codecs.StreamWriter):
pass
class StreamReader(codecs.StreamReader):
pass
def _buffer_decode(self, input: bytes, errors: str, final: bool) -> Tuple[Text, int]: ...
class StreamWriter(codecs.StreamWriter): ...
class StreamReader(codecs.StreamReader): ...
def getregentry() -> codecs.CodecInfo: ...
def encode(input: str, errors: str = ...) -> bytes: ...
def decode(input: bytes, errors: str = ...) -> str: ...
def encode(input: Text, errors: Text = ...) -> bytes: ...
def decode(input: bytes, errors: Text = ...) -> Text: ...

View File

@@ -1,14 +1,15 @@
import codecs
from typing import Text, Tuple
class IncrementalEncoder(codecs.IncrementalEncoder):
pass
def encode(self, input: Text, final: bool = ...) -> bytes: ...
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
pass
class StreamWriter(codecs.StreamWriter):
pass
class StreamReader(codecs.StreamReader):
pass
def _buffer_decode(self, input: bytes, errors: str, final: bool) -> Tuple[Text, int]: ...
class StreamWriter(codecs.StreamWriter): ...
class StreamReader(codecs.StreamReader): ...
def getregentry() -> codecs.CodecInfo: ...
def encode(input: str, errors: str = ...) -> bytes: ...
def decode(input: bytes, errors: str = ...) -> str: ...
def encode(input: Text, errors: Text = ...) -> bytes: ...
def decode(input: bytes, errors: Text = ...) -> Text: ...