mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Add .closed property to NamedTemporaryFile (#12349)
This is necessary for a NamedTemporaryFile to be compatible with io.TextIOWrapper.
This commit is contained in:
@@ -264,6 +264,8 @@ class _TemporaryFileWrapper(IO[AnyStr]):
|
||||
def writelines(self: _TemporaryFileWrapper[bytes], lines: Iterable[ReadableBuffer]) -> None: ...
|
||||
@overload
|
||||
def writelines(self, lines: Iterable[AnyStr]) -> None: ...
|
||||
@property
|
||||
def closed(self) -> bool: ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
_SpooledTemporaryFileBase = io.IOBase
|
||||
|
||||
Reference in New Issue
Block a user