Enable --disallow-any-generics for stubs (#3288)

This commit is contained in:
Sebastian Rittau
2019-10-01 14:31:34 +02:00
committed by Jelle Zijlstra
parent 23b353303b
commit c32e1e2280
77 changed files with 386 additions and 329 deletions

View File

@@ -18,6 +18,7 @@ TMP_MAX: int
tempdir: Optional[str]
template: str
_S = TypeVar("_S")
_T = TypeVar("_T") # for pytype, define typevar in same file as alias
if sys.version_info >= (3, 6):
_DirT = Union[_T, os.PathLike[_T]]
@@ -98,7 +99,7 @@ class SpooledTemporaryFile(IO[AnyStr]):
prefix: Optional[str] = ..., dir: Optional[str] = ...
) -> None: ...
def rollover(self) -> None: ...
def __enter__(self) -> SpooledTemporaryFile: ...
def __enter__(self: _S) -> _S: ...
def __exit__(self, exc_type: Optional[Type[BaseException]],
exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType]) -> Optional[bool]: ...