mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
The _types module can house any common type defintions used throughout the rest of typeshed to keep defintions in sync. First candidate is file descriptors where anything with `fileno()` method is accepted. There were several different implementations in various files that can be unified.
15 lines
685 B
Python
15 lines
685 B
Python
import io
|
|
import sys
|
|
from typing import Union, Protocol
|
|
from _types import FileDescriptorLike
|
|
|
|
def cancel_dump_traceback_later() -> None: ...
|
|
def disable() -> None: ...
|
|
def dump_traceback(file: FileDescriptorLike = ..., all_threads: bool = ...) -> None: ...
|
|
def dump_traceback_later(timeout: float, repeat: bool = ..., file: FileDescriptorLike = ..., exit: bool = ...) -> None: ...
|
|
def enable(file: FileDescriptorLike = ..., all_threads: bool = ...) -> None: ...
|
|
def is_enabled() -> bool: ...
|
|
if sys.platform != "win32":
|
|
def register(signum: int, file: FileDescriptorLike = ..., all_threads: bool = ..., chain: bool = ...) -> None: ...
|
|
def unregister(signum: int) -> None: ...
|