Skip to content

Commit 8ce62b9

Browse files
beauxqdonbarbos
andauthored
use type_check_only for _SupportsRedirect
Co-authored-by: Semyon Moroz <[email protected]>
1 parent 9408c55 commit 8ce62b9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/contextlib.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ class suppress(AbstractContextManager[None, bool]):
143143
# This is trying to describe what is needed for (most?) uses
144144
# of `redirect_stdout` and `redirect_stderr`.
145145
# https://github.com/python/typeshed/issues/14903
146+
@type_check_only
146147
class _SupportsRedirect(Protocol):
147148
def write(self, s: str, /) -> int: ...
148149
def flush(self) -> None: ...

0 commit comments

Comments
 (0)