Added some missing types from various stdlib stubs (#4466)

This commit is contained in:
Eric Traut
2020-08-29 16:45:36 -07:00
committed by GitHub
parent 3c20675813
commit bbd8c96e34
10 changed files with 73 additions and 45 deletions

View File

@@ -1,20 +1,22 @@
from types import ModuleType
from typing import Any, Dict, Optional
from typing import Any, Dict, Optional, TypeVar
_T = TypeVar("_T")
class _TempModule:
mod_name: str = ...
module: ModuleType = ...
def __init__(self, mod_name): ...
def __enter__(self): ...
def __exit__(self, *args): ...
def __init__(self, mod_name: str) -> None: ...
def __enter__(self: _T) -> _T: ...
def __exit__(self, *args: Any) -> None: ...
class _ModifiedArgv0:
value: Any = ...
def __init__(self, value): ...
def __enter__(self): ...
def __exit__(self, *args): ...
def __init__(self, value: Any) -> None: ...
def __enter__(self: _T) -> _T: ...
def __exit__(self, *args: Any) -> None: ...
def run_module(
mod_name: str, init_globals: Optional[Dict[str, Any]] = ..., run_name: Optional[str] = ..., alter_sys: bool = ...
): ...
def run_path(path_name: str, init_globals: Optional[Dict[str, Any]] = ..., run_name: str = ...): ...
) -> None: ...
def run_path(path_name: str, init_globals: Optional[Dict[str, Any]] = ..., run_name: str = ...) -> None: ...