mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Fix sys.setprofile annotation. (#1679)
`sys.setprofile(None)` is valid, and is in fact the only way to clear a profiler once set.
This commit is contained in:
committed by
Jelle Zijlstra
parent
c888bc8a1a
commit
9e76d44b09
@@ -143,7 +143,7 @@ def _getframe(depth: int) -> FrameType: ...
|
||||
|
||||
_ProfileFunc = Callable[[FrameType, str, Any], Any]
|
||||
def getprofile() -> Optional[_ProfileFunc]: ...
|
||||
def setprofile(profilefunc: _ProfileFunc) -> None: ...
|
||||
def setprofile(profilefunc: Optional[_ProfileFunc]) -> None: ...
|
||||
|
||||
_TraceFunc = Callable[[FrameType, str, Any], Optional[Callable[[FrameType, str, Any], Any]]]
|
||||
def gettrace() -> Optional[_TraceFunc]: ...
|
||||
|
||||
Reference in New Issue
Block a user