Skip to content

Commit 088a4b8

Browse files
authored
Fix Protocol inheritance in _zstdfile (#14232)
1 parent 5d881e4 commit 088a4b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/compression/zstd/_zstdfile.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ from collections.abc import Mapping
33
from compression._common import _streams
44
from compression.zstd import ZstdDict
55
from io import TextIOWrapper, _WrappedBuffer
6-
from typing import Literal, overload, type_check_only
6+
from typing import Literal, Protocol, overload, type_check_only
77
from typing_extensions import TypeAlias
88

99
from _zstd import ZstdCompressor, _ZstdCompressorFlushBlock, _ZstdCompressorFlushFrame
@@ -16,11 +16,11 @@ _ReadTextMode: TypeAlias = Literal["rt"]
1616
_WriteTextMode: TypeAlias = Literal["wt", "xt", "at"]
1717

1818
@type_check_only
19-
class _FileBinaryRead(_streams._Reader):
19+
class _FileBinaryRead(_streams._Reader, Protocol):
2020
def close(self) -> None: ...
2121

2222
@type_check_only
23-
class _FileBinaryWrite(SupportsWrite[bytes]):
23+
class _FileBinaryWrite(SupportsWrite[bytes], Protocol):
2424
def close(self) -> None: ...
2525

2626
class ZstdFile(_streams.BaseStream):

0 commit comments

Comments
 (0)