mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Add type hints for pstats.SortKey available in Python >= 3.7 (#4523)
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
import sys
|
||||
from _typeshed import AnyPath
|
||||
from cProfile import Profile as _cProfile
|
||||
from enum import Enum
|
||||
from profile import Profile
|
||||
from typing import IO, Any, Dict, Iterable, List, Optional, Text, Tuple, TypeVar, Union, overload
|
||||
|
||||
_Selector = Union[str, float, int]
|
||||
_T = TypeVar("_T", bound=Stats)
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
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__(
|
||||
|
||||
Reference in New Issue
Block a user