mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
cProfile: Fix Profile __init__ keyword arguments (#4183)
The CPython _lsprof module implementation uses the keyword arguments
'timer' and 'timeunit' instead of 'custom_timer' and 'time_unit' for
__init__. In profiler_init, the keyword argument parsing looks like the
following:
static char *kwlist[] = {"timer", "timeunit",
"subcalls", "builtins", 0};
This is the case ever since _lsprof was added in version 2.5.
This commit is contained in:
@@ -13,7 +13,7 @@ else:
|
||||
_Path = Union[bytes, Text]
|
||||
|
||||
class Profile:
|
||||
def __init__(self, custom_timer: Callable[[], float] = ..., time_unit: float = ..., subcalls: bool = ..., builtins: bool = ...) -> None: ...
|
||||
def __init__(self, timer: Callable[[], float] = ..., timeunit: float = ..., subcalls: bool = ..., builtins: bool = ...) -> None: ...
|
||||
def enable(self) -> None: ...
|
||||
def disable(self) -> None: ...
|
||||
def print_stats(self, sort: Union[str, int] = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user