1
1
import types
2
- from _typeshed import Self
2
+ from _typeshed import ReadableBuffer , Self
3
3
from abc import abstractmethod
4
4
from collections .abc import Callable , Generator , Iterable
5
5
from typing import Any , BinaryIO , Protocol , TextIO
@@ -173,7 +173,7 @@ class IncrementalDecoder:
173
173
errors : str
174
174
def __init__ (self , errors : str = ...) -> None : ...
175
175
@abstractmethod
176
- def decode (self , input : bytes , final : bool = ...) -> str : ...
176
+ def decode (self , input : ReadableBuffer , final : bool = ...) -> str : ...
177
177
def reset (self ) -> None : ...
178
178
def getstate (self ) -> tuple [bytes , int ]: ...
179
179
def setstate (self , state : tuple [bytes , int ]) -> None : ...
@@ -190,8 +190,8 @@ class BufferedIncrementalDecoder(IncrementalDecoder):
190
190
buffer : bytes
191
191
def __init__ (self , errors : str = ...) -> None : ...
192
192
@abstractmethod
193
- def _buffer_decode (self , input : bytes , errors : str , final : bool ) -> tuple [str , int ]: ...
194
- def decode (self , input : bytes , final : bool = ...) -> str : ...
193
+ def _buffer_decode (self , input : ReadableBuffer , errors : str , final : bool ) -> tuple [str , int ]: ...
194
+ def decode (self , input : ReadableBuffer , final : bool = ...) -> str : ...
195
195
196
196
# TODO: it is not possible to specify the requirement that all other
197
197
# attributes and methods are passed-through from the stream.
0 commit comments