mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use _typeshed.Self in Python 2, too (#6932)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any, Callable, Dict, Text, Tuple, TypeVar
|
||||
|
||||
def run(statement: str, filename: str | None = ..., sort: str | int = ...) -> None: ...
|
||||
@@ -5,7 +6,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]
|
||||
|
||||
@@ -20,7 +20,7 @@ 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 calibrate(self, m: int, verbose: int = ...) -> float: ...
|
||||
|
||||
Reference in New Issue
Block a user