mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
* Always use `_typeshed.Self`, where applicable * Revert changes to `google-cloud-ndb` (ambiguous) * Remove empty line added by script * Revert changes to `stubs/python-dateutil/dateutil/relativedelta.pyi` * Manually add a few more that the script missed * Improve `filelock` annotation Source code here:79ec7b2826/src/filelock/_api.py (L207)* Improve `opentracing/scope` annotation Source code here:3e1d357a34/opentracing/scope.py (L71)* Improve `redis/client` stub Source code here:15f315a496/redis/client.py (L1217)* Improve `redis/lock` annotation Source code here:15f315a496/redis/lock.py (L155)* Improve `requests/models` annotation Source code here:d718e75383/requests/models.py (L653)
52 lines
2.1 KiB
Python
52 lines
2.1 KiB
Python
import sys
|
|
from _typeshed import Self, StrOrBytesPath
|
|
from cProfile import Profile as _cProfile
|
|
from profile import Profile
|
|
from typing import IO, Any, Iterable, Union, overload
|
|
|
|
_Selector = Union[str, float, int]
|
|
|
|
if sys.version_info >= (3, 7):
|
|
from enum import Enum
|
|
class SortKey(str, Enum):
|
|
CALLS: str
|
|
CUMULATIVE: str
|
|
FILENAME: str
|
|
LINE: str
|
|
NAME: str
|
|
NFL: str
|
|
PCALLS: str
|
|
STDNAME: str
|
|
TIME: str
|
|
|
|
class Stats:
|
|
sort_arg_dict_default: dict[str, tuple[Any, str]]
|
|
def __init__(
|
|
self: Self,
|
|
__arg: None | str | Profile | _cProfile = ...,
|
|
*args: None | str | Profile | _cProfile | Self,
|
|
stream: IO[Any] | None = ...,
|
|
) -> None: ...
|
|
def init(self, arg: None | str | Profile | _cProfile) -> None: ...
|
|
def load_stats(self, arg: None | str | Profile | _cProfile) -> None: ...
|
|
def get_top_level_stats(self) -> None: ...
|
|
def add(self: Self, *arg_list: None | str | Profile | _cProfile | Self) -> Self: ...
|
|
def dump_stats(self, filename: StrOrBytesPath) -> None: ...
|
|
def get_sort_arg_defs(self) -> dict[str, tuple[tuple[tuple[int, int], ...], str]]: ...
|
|
@overload
|
|
def sort_stats(self: Self, field: int) -> Self: ...
|
|
@overload
|
|
def sort_stats(self: Self, *field: str) -> Self: ...
|
|
def reverse_order(self: Self) -> Self: ...
|
|
def strip_dirs(self: Self) -> Self: ...
|
|
def calc_callees(self) -> None: ...
|
|
def eval_print_amount(self, sel: _Selector, list: list[str], msg: str) -> tuple[list[str], str]: ...
|
|
def get_print_list(self, sel_list: Iterable[_Selector]) -> tuple[int, list[str]]: ...
|
|
def print_stats(self: Self, *amount: _Selector) -> Self: ...
|
|
def print_callees(self: Self, *amount: _Selector) -> Self: ...
|
|
def print_callers(self: Self, *amount: _Selector) -> Self: ...
|
|
def print_call_heading(self, name_size: int, column_title: str) -> None: ...
|
|
def print_call_line(self, name_size: int, source: str, call_dict: dict[str, Any], arrow: str = ...) -> None: ...
|
|
def print_title(self) -> None: ...
|
|
def print_line(self, func: str) -> None: ...
|