mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use _typeshed.Self with __enter__ (#5717)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
from _typeshed import Self
|
||||
from types import ModuleType
|
||||
from typing import Any, Dict, Optional, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
class _TempModule:
|
||||
mod_name: str = ...
|
||||
module: ModuleType = ...
|
||||
def __init__(self, mod_name: str) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
|
||||
class _ModifiedArgv0:
|
||||
value: Any = ...
|
||||
def __init__(self, value: Any) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __enter__(self) -> None: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
|
||||
def run_module(
|
||||
|
||||
Reference in New Issue
Block a user