add (overwrite with) mypy stubs, if available

This commit is contained in:
Matthias Kramm
2015-09-30 07:36:12 -07:00
parent 69e10b3aed
commit 337abed05a
432 changed files with 22360 additions and 776 deletions
+40 -83
View File
@@ -1,94 +1,51 @@
"""Stub file for the 'signal' module."""
# This is an autogenerated file. It serves as a starting point
# for a more precise manual annotation of this module.
# Feel free to edit the source below, but remove this header when you do.
# Stubs for signal
from typing import Any, List, Tuple, Dict, Generic
# Based on http://docs.python.org/3.2/library/signal.html
ITIMER_PROF = ... # type: long
ITIMER_REAL = ... # type: long
ITIMER_VIRTUAL = ... # type: long
ItimerError = ... # type: object
NSIG = ... # type: long
SIGABRT = ... # type: long
SIGALRM = ... # type: long
SIGBUS = ... # type: long
SIGCHLD = ... # type: long
SIGCLD = ... # type: long
SIGCONT = ... # type: long
SIGFPE = ... # type: long
SIGHUP = ... # type: long
SIGILL = ... # type: long
SIGINT = ... # type: long
SIGIO = ... # type: long
SIGIOT = ... # type: long
SIGKILL = ... # type: long
SIGPIPE = ... # type: long
SIGPOLL = ... # type: long
SIGPROF = ... # type: long
SIGPWR = ... # type: long
SIGQUIT = ... # type: long
SIGRTMAX = ... # type: long
SIGRTMIN = ... # type: long
SIGSEGV = ... # type: long
SIGSTOP = ... # type: long
SIGSYS = ... # type: long
SIGTERM = ... # type: long
SIGTRAP = ... # type: long
SIGTSTP = ... # type: long
SIGTTIN = ... # type: long
SIGTTOU = ... # type: long
SIGURG = ... # type: long
SIGUSR1 = ... # type: long
SIGUSR2 = ... # type: long
SIGVTALRM = ... # type: long
SIGWINCH = ... # type: long
SIGXCPU = ... # type: long
SIGXFSZ = ... # type: long
SIG_DFL = ... # type: long
SIG_IGN = ... # type: long
from typing import Any, overload, Callable
def alarm(a: int) -> long: ...
SIG_DFL = 0
SIG_IGN = 0
def default_int_handler(*args, **kwargs) -> Any:
raise KeyboardInterrupt()
# TODO more SIG* constants (these should be platform specific?)
SIGHUP = 0
SIGINT = 0
SIGQUIT = 0
SIGABRT = 0
SIGKILL = 0
SIGALRM = 0
SIGTERM = 0
def getitimer(a: int) -> tuple: ...
SIGUSR1 = 0
SIGUSR2 = 0
SIGCONT = 0
SIGSTOP = 0
def getsignal(a: int) -> None:
raise ValueError()
SIGPOLL = 0
SIGVTALRM = 0
def pause() -> None: ...
CTRL_C_EVENT = 0 # Windows
CTRL_BREAK_EVENT = 0 # Windows
def pthread_kill(a: int, b: int) -> None:
raise OSError()
NSIG = 0
ITIMER_REAL = 0
ITIMER_VIRTUAL = 0
ITIMER_PROF = 0
def pthread_sigmask(a: int, b) -> Any:
raise OSError()
class ItimerError(IOError): ...
def set_wakeup_fd(a: int) -> long:
raise ValueError()
def alarm(time: int) -> int: ... # Unix
def getsignal(signalnum: int) -> Any: ...
def pause() -> None: ... # Unix
#def setitimer(which: int, seconds: float,
# internval: float = None) -> Tuple[float, float]: ... # Unix
#def getitimer(int which): ... # Unix
def set_wakeup_fd(fd: int) -> None: ...
def siginterrupt(signalnum: int, flag: bool) -> None: ...
def setitimer(a: int, b: float, *args, **kwargs) -> tuple: ...
def siginterrupt(a: int, b: int) -> None:
raise OSError()
raise ValueError()
def signal(a: int, b) -> None:
raise OSError()
raise TypeError()
raise ValueError()
def sigpending() -> Any:
raise OSError()
def sigtimedwait(a, b) -> Any:
raise OSError()
raise ValueError()
def sigwait(a) -> long:
raise OSError()
def sigwaitinfo(a) -> tuple:
raise OSError()
@overload
def signal(signalnum: int, handler: int) -> Any: ...
@overload
def signal(signalnum: int,
handler: Callable[[int, Any], None]) -> Any:
... # TODO frame object type