From b45400a9d524aab36a2e0d95a2251085aadc136e Mon Sep 17 00:00:00 2001 From: huuan26 Date: Tue, 3 Nov 2026 13:41:42 +0700 Subject: [PATCH 1/2] [encodings] Accept buffer inputs in Codec.decode for cp1250-cp1258 --- stdlib/encodings/cp1250.pyi | 2 +- stdlib/encodings/cp1251.pyi | 2 +- stdlib/encodings/cp1253.pyi | 2 +- stdlib/encodings/cp1254.pyi | 2 +- stdlib/encodings/cp1255.pyi | 2 +- stdlib/encodings/cp1256.pyi | 2 +- stdlib/encodings/cp1257.pyi | 2 +- stdlib/encodings/cp1258.pyi | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/stdlib/encodings/cp1250.pyi b/stdlib/encodings/cp1250.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1250.pyi +++ b/stdlib/encodings/cp1250.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1251.pyi b/stdlib/encodings/cp1251.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1251.pyi +++ b/stdlib/encodings/cp1251.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1253.pyi b/stdlib/encodings/cp1253.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1253.pyi +++ b/stdlib/encodings/cp1253.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1254.pyi b/stdlib/encodings/cp1254.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1254.pyi +++ b/stdlib/encodings/cp1254.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1255.pyi b/stdlib/encodings/cp1255.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1255.pyi +++ b/stdlib/encodings/cp1255.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1256.pyi b/stdlib/encodings/cp1256.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1256.pyi +++ b/stdlib/encodings/cp1256.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1257.pyi b/stdlib/encodings/cp1257.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1257.pyi +++ b/stdlib/encodings/cp1257.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1258.pyi b/stdlib/encodings/cp1258.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1258.pyi +++ b/stdlib/encodings/cp1258.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... From bc662da31a7d4f07b7db63e9f4d8baf479813df7 Mon Sep 17 00:00:00 2001 From: huuan26 Date: Thu, 5 Nov 2026 12:23:24 +0700 Subject: [PATCH 2/2] [encodings] Accept ReadableBuffer in Codec.decode for all remaining charmap encodings --- stdlib/encodings/cp037.pyi | 2 +- stdlib/encodings/cp1006.pyi | 2 +- stdlib/encodings/cp1026.pyi | 2 +- stdlib/encodings/cp1125.pyi | 2 +- stdlib/encodings/cp1140.pyi | 2 +- stdlib/encodings/cp273.pyi | 2 +- stdlib/encodings/cp424.pyi | 2 +- stdlib/encodings/cp437.pyi | 2 +- stdlib/encodings/cp500.pyi | 2 +- stdlib/encodings/cp720.pyi | 2 +- stdlib/encodings/cp737.pyi | 2 +- stdlib/encodings/cp775.pyi | 2 +- stdlib/encodings/cp850.pyi | 2 +- stdlib/encodings/cp852.pyi | 2 +- stdlib/encodings/cp855.pyi | 2 +- stdlib/encodings/cp856.pyi | 2 +- stdlib/encodings/cp857.pyi | 2 +- stdlib/encodings/cp858.pyi | 2 +- stdlib/encodings/cp860.pyi | 2 +- stdlib/encodings/cp861.pyi | 2 +- stdlib/encodings/cp862.pyi | 2 +- stdlib/encodings/cp863.pyi | 2 +- stdlib/encodings/cp864.pyi | 2 +- stdlib/encodings/cp865.pyi | 2 +- stdlib/encodings/cp866.pyi | 2 +- stdlib/encodings/cp869.pyi | 2 +- stdlib/encodings/cp874.pyi | 2 +- stdlib/encodings/cp875.pyi | 2 +- stdlib/encodings/hp_roman8.pyi | 2 +- stdlib/encodings/iso8859_1.pyi | 2 +- stdlib/encodings/iso8859_10.pyi | 2 +- stdlib/encodings/iso8859_11.pyi | 2 +- stdlib/encodings/iso8859_13.pyi | 2 +- stdlib/encodings/iso8859_14.pyi | 2 +- stdlib/encodings/iso8859_15.pyi | 2 +- stdlib/encodings/iso8859_16.pyi | 2 +- stdlib/encodings/iso8859_2.pyi | 2 +- stdlib/encodings/iso8859_3.pyi | 2 +- stdlib/encodings/iso8859_4.pyi | 2 +- stdlib/encodings/iso8859_5.pyi | 2 +- stdlib/encodings/iso8859_6.pyi | 2 +- stdlib/encodings/iso8859_7.pyi | 2 +- stdlib/encodings/iso8859_8.pyi | 2 +- stdlib/encodings/iso8859_9.pyi | 2 +- stdlib/encodings/koi8_r.pyi | 2 +- stdlib/encodings/koi8_t.pyi | 2 +- stdlib/encodings/koi8_u.pyi | 2 +- stdlib/encodings/kz1048.pyi | 2 +- stdlib/encodings/mac_arabic.pyi | 2 +- stdlib/encodings/mac_croatian.pyi | 2 +- stdlib/encodings/mac_cyrillic.pyi | 2 +- stdlib/encodings/mac_farsi.pyi | 2 +- stdlib/encodings/mac_greek.pyi | 2 +- stdlib/encodings/mac_iceland.pyi | 2 +- stdlib/encodings/mac_latin2.pyi | 2 +- stdlib/encodings/mac_roman.pyi | 2 +- stdlib/encodings/mac_romanian.pyi | 2 +- stdlib/encodings/mac_turkish.pyi | 2 +- stdlib/encodings/palmos.pyi | 2 +- stdlib/encodings/ptcp154.pyi | 2 +- stdlib/encodings/tis_620.pyi | 2 +- 61 files changed, 61 insertions(+), 61 deletions(-) diff --git a/stdlib/encodings/cp037.pyi b/stdlib/encodings/cp037.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp037.pyi +++ b/stdlib/encodings/cp037.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1006.pyi b/stdlib/encodings/cp1006.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1006.pyi +++ b/stdlib/encodings/cp1006.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1026.pyi b/stdlib/encodings/cp1026.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1026.pyi +++ b/stdlib/encodings/cp1026.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1125.pyi b/stdlib/encodings/cp1125.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp1125.pyi +++ b/stdlib/encodings/cp1125.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp1140.pyi b/stdlib/encodings/cp1140.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp1140.pyi +++ b/stdlib/encodings/cp1140.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp273.pyi b/stdlib/encodings/cp273.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp273.pyi +++ b/stdlib/encodings/cp273.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp424.pyi b/stdlib/encodings/cp424.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp424.pyi +++ b/stdlib/encodings/cp424.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp437.pyi b/stdlib/encodings/cp437.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp437.pyi +++ b/stdlib/encodings/cp437.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp500.pyi b/stdlib/encodings/cp500.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp500.pyi +++ b/stdlib/encodings/cp500.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp720.pyi b/stdlib/encodings/cp720.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp720.pyi +++ b/stdlib/encodings/cp720.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp737.pyi b/stdlib/encodings/cp737.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp737.pyi +++ b/stdlib/encodings/cp737.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp775.pyi b/stdlib/encodings/cp775.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp775.pyi +++ b/stdlib/encodings/cp775.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp850.pyi b/stdlib/encodings/cp850.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp850.pyi +++ b/stdlib/encodings/cp850.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp852.pyi b/stdlib/encodings/cp852.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp852.pyi +++ b/stdlib/encodings/cp852.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp855.pyi b/stdlib/encodings/cp855.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp855.pyi +++ b/stdlib/encodings/cp855.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp856.pyi b/stdlib/encodings/cp856.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp856.pyi +++ b/stdlib/encodings/cp856.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp857.pyi b/stdlib/encodings/cp857.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp857.pyi +++ b/stdlib/encodings/cp857.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp858.pyi b/stdlib/encodings/cp858.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp858.pyi +++ b/stdlib/encodings/cp858.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp860.pyi b/stdlib/encodings/cp860.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp860.pyi +++ b/stdlib/encodings/cp860.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp861.pyi b/stdlib/encodings/cp861.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp861.pyi +++ b/stdlib/encodings/cp861.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp862.pyi b/stdlib/encodings/cp862.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp862.pyi +++ b/stdlib/encodings/cp862.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp863.pyi b/stdlib/encodings/cp863.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp863.pyi +++ b/stdlib/encodings/cp863.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp864.pyi b/stdlib/encodings/cp864.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp864.pyi +++ b/stdlib/encodings/cp864.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp865.pyi b/stdlib/encodings/cp865.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp865.pyi +++ b/stdlib/encodings/cp865.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp866.pyi b/stdlib/encodings/cp866.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp866.pyi +++ b/stdlib/encodings/cp866.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp869.pyi b/stdlib/encodings/cp869.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/cp869.pyi +++ b/stdlib/encodings/cp869.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp874.pyi b/stdlib/encodings/cp874.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp874.pyi +++ b/stdlib/encodings/cp874.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/cp875.pyi b/stdlib/encodings/cp875.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/cp875.pyi +++ b/stdlib/encodings/cp875.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/hp_roman8.pyi b/stdlib/encodings/hp_roman8.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/hp_roman8.pyi +++ b/stdlib/encodings/hp_roman8.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_1.pyi b/stdlib/encodings/iso8859_1.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_1.pyi +++ b/stdlib/encodings/iso8859_1.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_10.pyi b/stdlib/encodings/iso8859_10.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_10.pyi +++ b/stdlib/encodings/iso8859_10.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_11.pyi b/stdlib/encodings/iso8859_11.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_11.pyi +++ b/stdlib/encodings/iso8859_11.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_13.pyi b/stdlib/encodings/iso8859_13.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_13.pyi +++ b/stdlib/encodings/iso8859_13.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_14.pyi b/stdlib/encodings/iso8859_14.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_14.pyi +++ b/stdlib/encodings/iso8859_14.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_15.pyi b/stdlib/encodings/iso8859_15.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_15.pyi +++ b/stdlib/encodings/iso8859_15.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_16.pyi b/stdlib/encodings/iso8859_16.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_16.pyi +++ b/stdlib/encodings/iso8859_16.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_2.pyi b/stdlib/encodings/iso8859_2.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_2.pyi +++ b/stdlib/encodings/iso8859_2.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_3.pyi b/stdlib/encodings/iso8859_3.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_3.pyi +++ b/stdlib/encodings/iso8859_3.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_4.pyi b/stdlib/encodings/iso8859_4.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_4.pyi +++ b/stdlib/encodings/iso8859_4.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_5.pyi b/stdlib/encodings/iso8859_5.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_5.pyi +++ b/stdlib/encodings/iso8859_5.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_6.pyi b/stdlib/encodings/iso8859_6.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_6.pyi +++ b/stdlib/encodings/iso8859_6.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_7.pyi b/stdlib/encodings/iso8859_7.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_7.pyi +++ b/stdlib/encodings/iso8859_7.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_8.pyi b/stdlib/encodings/iso8859_8.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_8.pyi +++ b/stdlib/encodings/iso8859_8.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/iso8859_9.pyi b/stdlib/encodings/iso8859_9.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/iso8859_9.pyi +++ b/stdlib/encodings/iso8859_9.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/koi8_r.pyi b/stdlib/encodings/koi8_r.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/koi8_r.pyi +++ b/stdlib/encodings/koi8_r.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/koi8_t.pyi b/stdlib/encodings/koi8_t.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/koi8_t.pyi +++ b/stdlib/encodings/koi8_t.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/koi8_u.pyi b/stdlib/encodings/koi8_u.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/koi8_u.pyi +++ b/stdlib/encodings/koi8_u.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/kz1048.pyi b/stdlib/encodings/kz1048.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/kz1048.pyi +++ b/stdlib/encodings/kz1048.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/mac_arabic.pyi b/stdlib/encodings/mac_arabic.pyi index 42781b489298..d2aa4e779744 100644 --- a/stdlib/encodings/mac_arabic.pyi +++ b/stdlib/encodings/mac_arabic.pyi @@ -3,7 +3,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/mac_croatian.pyi b/stdlib/encodings/mac_croatian.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/mac_croatian.pyi +++ b/stdlib/encodings/mac_croatian.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/mac_cyrillic.pyi b/stdlib/encodings/mac_cyrillic.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/mac_cyrillic.pyi +++ b/stdlib/encodings/mac_cyrillic.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/mac_farsi.pyi b/stdlib/encodings/mac_farsi.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/mac_farsi.pyi +++ b/stdlib/encodings/mac_farsi.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/mac_greek.pyi b/stdlib/encodings/mac_greek.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/mac_greek.pyi +++ b/stdlib/encodings/mac_greek.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/mac_iceland.pyi b/stdlib/encodings/mac_iceland.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/mac_iceland.pyi +++ b/stdlib/encodings/mac_iceland.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/mac_latin2.pyi b/stdlib/encodings/mac_latin2.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/mac_latin2.pyi +++ b/stdlib/encodings/mac_latin2.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/mac_roman.pyi b/stdlib/encodings/mac_roman.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/mac_roman.pyi +++ b/stdlib/encodings/mac_roman.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/mac_romanian.pyi b/stdlib/encodings/mac_romanian.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/mac_romanian.pyi +++ b/stdlib/encodings/mac_romanian.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/mac_turkish.pyi b/stdlib/encodings/mac_turkish.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/mac_turkish.pyi +++ b/stdlib/encodings/mac_turkish.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/palmos.pyi b/stdlib/encodings/palmos.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/palmos.pyi +++ b/stdlib/encodings/palmos.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/ptcp154.pyi b/stdlib/encodings/ptcp154.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/ptcp154.pyi +++ b/stdlib/encodings/ptcp154.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ... diff --git a/stdlib/encodings/tis_620.pyi b/stdlib/encodings/tis_620.pyi index f62195662ce9..2924e73c3543 100644 --- a/stdlib/encodings/tis_620.pyi +++ b/stdlib/encodings/tis_620.pyi @@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer class Codec(codecs.Codec): def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, 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: ...