mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
fix using ZipFile as a ContextManager (#2043)
This commit is contained in:
committed by
Łukasz Langa
parent
b8b78886e3
commit
37aba00fe8
@@ -191,7 +191,7 @@ class FunctionTestCase(TestCase):
|
||||
class _AssertRaisesContext(Generic[_E]):
|
||||
exception = ... # type: _E
|
||||
def __enter__(self) -> _AssertRaisesContext[_E]: ...
|
||||
def __exit__(self, exc_type: Optional[type], exc_val: Optional[Exception],
|
||||
def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException],
|
||||
exc_tb: Optional[TracebackType]) -> bool: ...
|
||||
|
||||
class _AssertWarnsContext:
|
||||
@@ -199,14 +199,14 @@ class _AssertWarnsContext:
|
||||
filename = ... # type: str
|
||||
lineno = ... # type: int
|
||||
def __enter__(self) -> _AssertWarnsContext: ...
|
||||
def __exit__(self, exc_type: Optional[type], exc_val: Optional[Exception],
|
||||
def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException],
|
||||
exc_tb: Optional[TracebackType]) -> bool: ...
|
||||
|
||||
class _AssertLogsContext:
|
||||
records = ... # type: List[logging.LogRecord]
|
||||
output = ... # type: List[str]
|
||||
def __enter__(self) -> _AssertLogsContext: ...
|
||||
def __exit__(self, exc_type: Optional[type], exc_val: Optional[Exception],
|
||||
def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException],
|
||||
exc_tb: Optional[TracebackType]) -> bool: ...
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user