mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Make target optional in contextlib redirecting managers (#3212)
Fixes #3210
This commit is contained in:
committed by
Sebastian Rittau
parent
f53f52de57
commit
d78747c0f0
@@ -51,11 +51,11 @@ if sys.version_info >= (3, 4):
|
||||
exctb: Optional[TracebackType]) -> bool: ...
|
||||
|
||||
class redirect_stdout(ContextManager[None]):
|
||||
def __init__(self, new_target: IO[str]) -> None: ...
|
||||
def __init__(self, new_target: Optional[IO[str]]) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
class redirect_stderr(ContextManager[None]):
|
||||
def __init__(self, new_target: IO[str]) -> None: ...
|
||||
def __init__(self, new_target: Optional[IO[str]]) -> None: ...
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
class ContextDecorator:
|
||||
|
||||
Reference in New Issue
Block a user