mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add Iterable base class to tarfile.TarFile (#693)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
committed by
Jukka Lehtosalo
parent
7ac78b163d
commit
e13f2c739d
@@ -1,7 +1,7 @@
|
||||
## Stubs for tarfile
|
||||
|
||||
from typing import (
|
||||
Callable, IO, Iterator, List, Mapping, Optional, Type,
|
||||
Callable, IO, Iterable, Iterator, List, Mapping, Optional, Type,
|
||||
Union,
|
||||
)
|
||||
import sys
|
||||
@@ -41,7 +41,7 @@ def open(name: Optional[str] = ..., mode: str = ...,
|
||||
errorlevel: Optional[int] = ...) -> TarFile: ...
|
||||
|
||||
|
||||
class TarFile:
|
||||
class TarFile(Iterable[TarInfo]):
|
||||
name = ... # type: Optional[str]
|
||||
mode = ... # type: str
|
||||
fileobj = ... # type: Optional[IO[bytes]]
|
||||
|
||||
Reference in New Issue
Block a user