mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
stdlib: Audit Callable[<parameters>, None] annotations (#8187)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import OptExcInfo, structseq
|
||||
from _typeshed import OptExcInfo, ProfileFunction, TraceFunction, structseq
|
||||
from builtins import object as _object
|
||||
from collections.abc import AsyncGenerator, Callable, Coroutine, Sequence
|
||||
from importlib.abc import PathEntryFinder
|
||||
@@ -241,16 +241,10 @@ def getsizeof(obj: object) -> int: ...
|
||||
@overload
|
||||
def getsizeof(obj: object, default: int) -> int: ...
|
||||
def getswitchinterval() -> float: ...
|
||||
|
||||
_ProfileFunc: TypeAlias = Callable[[FrameType, str, Any], Any]
|
||||
|
||||
def getprofile() -> _ProfileFunc | None: ...
|
||||
def setprofile(profilefunc: _ProfileFunc | None) -> None: ...
|
||||
|
||||
_TraceFunc: TypeAlias = Callable[[FrameType, str, Any], Callable[[FrameType, str, Any], Any] | None]
|
||||
|
||||
def gettrace() -> _TraceFunc | None: ...
|
||||
def settrace(tracefunc: _TraceFunc | None) -> None: ...
|
||||
def getprofile() -> ProfileFunction | None: ...
|
||||
def setprofile(profilefunc: ProfileFunction | None) -> None: ...
|
||||
def gettrace() -> TraceFunction | None: ...
|
||||
def settrace(tracefunc: TraceFunction | None) -> None: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
# A tuple of length 5, even though it has more than 5 attributes.
|
||||
|
||||
Reference in New Issue
Block a user