files is optional

This commit is contained in:
Julien Hebert
2016-03-22 08:38:08 +01:00
parent 83e51ac3cb
commit 2eaf1933b8

View File

@@ -1,8 +1,10 @@
from typing import Iterable, BinaryIO, List, Callable, IO, AnyStr, Generic
from typing import Iterable, Callable, IO, AnyStr, Generic, Any, TypeVar
StrOrIterableStr = TypeVar('StrOrIterableStr', str, Iterable[str])
def input(
files: List[str]=...,
files: StrOrIterableStr=None,
inplace: bool=...,
backup: str=...,
bufsize: int=...,
@@ -21,7 +23,7 @@ def isstdin() -> bool: ...
class FileInput(Iterable[AnyStr], Generic[AnyStr]):
def __init__(
self,
files: List[str]=...,
files: StrOrIterableStr=None,
inplace: bool=...,
backup: str=...,
bufsize: int=...,
@@ -32,7 +34,7 @@ class FileInput(Iterable[AnyStr], Generic[AnyStr]):
def __del__(self) -> None: ...
def close(self) -> None: ...
def __enter__(self): ...
def __exit__(self, type, value, traceback) -> None: ...
def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
def __iter__(self): ...
def __next__(self) -> str: ...
def __getitem__(self, i) -> str: ...