mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Improve tempfile.SpooledTemporaryFile (#7196)
This commit is contained in:
@@ -295,7 +295,7 @@ class SpooledTemporaryFile(IO[AnyStr]):
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> bool | None: ...
|
||||
) -> None: ...
|
||||
# These methods are copied from the abstract methods of IO, because
|
||||
# SpooledTemporaryFile implements IO.
|
||||
# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918.
|
||||
@@ -308,7 +308,7 @@ class SpooledTemporaryFile(IO[AnyStr]):
|
||||
def readlines(self, hint: int = ...) -> list[AnyStr]: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
def tell(self) -> int: ...
|
||||
def truncate(self, size: int | None = ...) -> int: ...
|
||||
def truncate(self, size: int | None = ...) -> None: ... # type: ignore[override]
|
||||
def write(self, s: AnyStr) -> int: ...
|
||||
def writelines(self, iterable: Iterable[AnyStr]) -> None: ...
|
||||
def __iter__(self) -> Iterator[AnyStr]: ...
|
||||
|
||||
Reference in New Issue
Block a user