From 2271fab42e306cadca4ed11b9cc3705301929a15 Mon Sep 17 00:00:00 2001 From: Hrithik Saini Date: Tue, 3 Nov 2026 18:14:39 +0530 Subject: [PATCH] Allow keyword arguments on codecs CodecInfo encode/decode callables --- stdlib/codecs.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/codecs.pyi b/stdlib/codecs.pyi index ee1ab25bac47..6221e36a31b3 100644 --- a/stdlib/codecs.pyi +++ b/stdlib/codecs.pyi @@ -97,19 +97,19 @@ class _Stream(_WritableStream, _ReadableStream, Protocol): ... @type_check_only class _Encoder(Protocol): - def __call__(self, input: str, errors: str = ..., /) -> tuple[bytes, int]: ... # signature of Codec().encode + def __call__(self, input: str, errors: str = ...) -> tuple[bytes, int]: ... # signature of Codec().encode @type_check_only class _Decoder(Protocol): - def __call__(self, input: ReadableBuffer, errors: str = ..., /) -> tuple[str, int]: ... # signature of Codec().decode + def __call__(self, input: ReadableBuffer, errors: str = ...) -> tuple[str, int]: ... # signature of Codec().decode @type_check_only class _StreamReader(Protocol): - def __call__(self, stream: _ReadableStream, errors: str = ..., /) -> StreamReader: ... + def __call__(self, stream: _ReadableStream, errors: str = ...) -> StreamReader: ... @type_check_only class _StreamWriter(Protocol): - def __call__(self, stream: _WritableStream, errors: str = ..., /) -> StreamWriter: ... + def __call__(self, stream: _WritableStream, errors: str = ...) -> StreamWriter: ... @type_check_only class _IncrementalEncoder(Protocol):