mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 20:01:29 +08:00
add the remaining encodings submodules (#13123)
This commit is contained in:
20
stdlib/encodings/undefined.pyi
Normal file
20
stdlib/encodings/undefined.pyi
Normal file
@@ -0,0 +1,20 @@
|
||||
import codecs
|
||||
from _typeshed import ReadableBuffer
|
||||
|
||||
# These return types are just to match the base types. In reality, these always
|
||||
# raise an error.
|
||||
|
||||
class Codec(codecs.Codec):
|
||||
def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ...
|
||||
def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[str, int]: ...
|
||||
|
||||
class IncrementalEncoder(codecs.IncrementalEncoder):
|
||||
def encode(self, input: str, final: bool = False) -> bytes: ...
|
||||
|
||||
class IncrementalDecoder(codecs.IncrementalDecoder):
|
||||
def decode(self, input: ReadableBuffer, final: bool = False) -> str: ...
|
||||
|
||||
class StreamWriter(Codec, codecs.StreamWriter): ...
|
||||
class StreamReader(Codec, codecs.StreamReader): ...
|
||||
|
||||
def getregentry() -> codecs.CodecInfo: ...
|
||||
Reference in New Issue
Block a user