Format: application/octet-stream
⬇ Download File (1.2 KB)
   1  import sys
   2  from _typeshed import AnyPath
   3  from typing import Any, Callable, Dict, Optional, TypeVar, Union
   4  
   5  def run(statement: str, filename: Optional[str] = ..., sort: Union[str, int] = ...) -> None: ...
   6  def runctx(
   7      statement: str, globals: Dict[str, Any], locals: Dict[str, Any], filename: Optional[str] = ..., sort: Union[str, int] = ...
   8  ) -> None: ...
   9  
  10  _SelfT = TypeVar("_SelfT", bound=Profile)
  11  _T = TypeVar("_T")
  12  
  13  class Profile:
  14      def __init__(
  15          self, timer: Callable[[], float] = ..., timeunit: float = ..., subcalls: bool = ..., builtins: bool = ...
  16      ) -> None: ...
  17      def enable(self) -> None: ...
  18      def disable(self) -> None: ...
  19      def print_stats(self, sort: Union[str, int] = ...) -> None: ...
  20      def dump_stats(self, file: AnyPath) -> None: ...
  21      def create_stats(self) -> None: ...
  22      def snapshot_stats(self) -> None: ...
  23      def run(self: _SelfT, cmd: str) -> _SelfT: ...
  24      def runctx(self: _SelfT, cmd: str, globals: Dict[str, Any], locals: Dict[str, Any]) -> _SelfT: ...
  25      def runcall(self, __func: Callable[..., _T], *args: Any, **kw: Any) -> _T: ...
  26      if sys.version_info >= (3, 8):
  27          def __enter__(self: _SelfT) -> _SelfT: ...
  28          def __exit__(self, *exc_info: Any) -> None: ...
  29