mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
Make unittest.removeHandler() an overloaded function.
See https://docs.python.org/3/library/unittest.html#unittest.removeHandler - Without args it removes the signal handler. - With a function arg it is a test decorator that temporarily removes the handler while the test is running.
This commit is contained in:
committed by
Łukasz Langa
parent
f775ef3bc5
commit
b78eb48b26
@@ -327,4 +327,7 @@ def main(module: str = ..., defaultTest: _DefaultTestType = ...,
|
||||
def installHandler() -> None: ...
|
||||
def registerResult(result: TestResult) -> None: ...
|
||||
def removeResult(result: TestResult) -> None: ...
|
||||
def removeHandler(function: Optional[_FT]) -> _FT: ...
|
||||
@overload
|
||||
def removeHandler() -> None: ...
|
||||
@overload
|
||||
def removeHandler(function: _FT) -> _FT: ...
|
||||
|
||||
Reference in New Issue
Block a user