mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use _typeshed.Self in Python 2, too (#6932)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Self
|
||||
from types import CodeType
|
||||
from typing import Any, Callable, Dict, Text, Tuple, TypeVar
|
||||
|
||||
@@ -6,7 +7,6 @@ def runctx(
|
||||
statement: str, globals: Dict[str, Any], locals: Dict[str, Any], filename: str | None = ..., sort: str | int = ...
|
||||
) -> None: ...
|
||||
|
||||
_SelfT = TypeVar("_SelfT", bound=Profile)
|
||||
_T = TypeVar("_T")
|
||||
_Label = Tuple[str, int, str]
|
||||
|
||||
@@ -21,8 +21,8 @@ class Profile:
|
||||
def dump_stats(self, file: Text) -> None: ...
|
||||
def create_stats(self) -> None: ...
|
||||
def snapshot_stats(self) -> None: ...
|
||||
def run(self: _SelfT, cmd: str) -> _SelfT: ...
|
||||
def runctx(self: _SelfT, cmd: str, globals: Dict[str, Any], locals: Dict[str, Any]) -> _SelfT: ...
|
||||
def run(self: Self, cmd: str) -> Self: ...
|
||||
def runctx(self: Self, cmd: str, globals: Dict[str, Any], locals: Dict[str, Any]) -> Self: ...
|
||||
def runcall(self, __func: Callable[..., _T], *args: Any, **kw: Any) -> _T: ...
|
||||
|
||||
def label(code: str | CodeType) -> _Label: ... # undocumented
|
||||
|
||||
Reference in New Issue
Block a user