mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 12:21:27 +08:00
Enable --disallow-any-generics for stubs (#3288)
This commit is contained in:
committed by
Jelle Zijlstra
parent
23b353303b
commit
c32e1e2280
@@ -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]: ...
|
||||
|
||||
Reference in New Issue
Block a user