Add Iterable base class to tarfile.TarFile (#693)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2016-11-23 06:49:44 -05:00
committed by Jukka Lehtosalo
parent 7ac78b163d
commit e13f2c739d

View File

@@ -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]]