Skip to content

Commit 489180f

Browse files
The-Compilersrittau
authored andcommitted
Add stubs for the faulthandler stdlib module (#2627)
1 parent 96ed18f commit 489180f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

stdlib/3/faulthandler.pyi

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import sys
2+
from typing import Union, Protocol
3+
4+
5+
class _HasFileno(Protocol):
6+
def fileno(self) -> int: ...
7+
8+
9+
if sys.version_info >= (3, 5):
10+
_File = Union[_HasFileno, int]
11+
else:
12+
_File = _HasFileno
13+
14+
15+
def cancel_dump_traceback_later() -> None: ...
16+
def disable() -> None: ...
17+
def dump_traceback(file: _File = ..., all_threads: bool = ...) -> None: ...
18+
def dump_traceback_later(timeout: int, repeat: bool = ..., file: _File = ..., exit: bool = ...) -> None: ...
19+
def enable(file: _File = ..., all_threads: bool = ...) -> None: ...
20+
def is_enabled() -> bool: ...
21+
if sys.platform != "win32":
22+
def register(signum: int, file: _File = ..., all_threads: bool = ..., chain: bool = ...) -> None: ...
23+
def unregister(signum: int) -> None: ...

0 commit comments

Comments
 (0)