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:
Carl Meyer
2017-10-23 12:26:58 -07:00
committed by Jelle Zijlstra
parent c888bc8a1a
commit 9e76d44b09

View File

@@ -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]: ...