mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 16:27:08 +08:00
Add stubs for the faulthandler stdlib module (#2627)
This commit is contained in:
committed by
Sebastian Rittau
parent
96ed18f6e1
commit
489180ffcc
23
stdlib/3/faulthandler.pyi
Normal file
23
stdlib/3/faulthandler.pyi
Normal file
@@ -0,0 +1,23 @@
|
||||
import sys
|
||||
from typing import Union, Protocol
|
||||
|
||||
|
||||
class _HasFileno(Protocol):
|
||||
def fileno(self) -> int: ...
|
||||
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
_File = Union[_HasFileno, int]
|
||||
else:
|
||||
_File = _HasFileno
|
||||
|
||||
|
||||
def cancel_dump_traceback_later() -> None: ...
|
||||
def disable() -> None: ...
|
||||
def dump_traceback(file: _File = ..., all_threads: bool = ...) -> None: ...
|
||||
def dump_traceback_later(timeout: int, repeat: bool = ..., file: _File = ..., exit: bool = ...) -> None: ...
|
||||
def enable(file: _File = ..., all_threads: bool = ...) -> None: ...
|
||||
def is_enabled() -> bool: ...
|
||||
if sys.platform != "win32":
|
||||
def register(signum: int, file: _File = ..., all_threads: bool = ..., chain: bool = ...) -> None: ...
|
||||
def unregister(signum: int) -> None: ...
|
||||
Reference in New Issue
Block a user