mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
stdlib: Improve a bunch of __(a)exit__ methods (#7571)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import Self, StrOrBytesPath
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, AnyStr, Callable, Generic, Iterable, Iterator
|
||||
|
||||
__all__ = [
|
||||
@@ -98,7 +99,9 @@ class FileInput(Iterator[AnyStr], Generic[AnyStr]):
|
||||
def __del__(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
|
||||
def __exit__(
|
||||
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __next__(self) -> AnyStr: ...
|
||||
if sys.version_info < (3, 11):
|
||||
|
||||
Reference in New Issue
Block a user