diff --git a/stubs/twisted/internet/error.pyi b/stubs/twisted/internet/error.pyi new file mode 100644 --- /dev/null +++ b/stubs/twisted/internet/error.pyi @@ -0,0 +1,84 @@ +# Stubs for twisted.internet.error (Python 3) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional + +class BindError(Exception): ... + +class CannotListenError(BindError): + interface: Any = ... + port: Any = ... + socketError: Any = ... + def __init__(self, interface: Any, port: Any, socketError: Any) -> None: ... + +class MulticastJoinError(Exception): ... +class MessageLengthError(Exception): ... +class DNSLookupError(IOError): ... +class ConnectInProgressError(Exception): ... + +class ConnectError(Exception): + osError: Any = ... + def __init__(self, osError: Optional[Any] = ..., string: str = ...) -> None: ... + +class ConnectBindError(ConnectError): ... +class UnknownHostError(ConnectError): ... +class NoRouteError(ConnectError): ... +class ConnectionRefusedError(ConnectError): ... +class TCPTimedOutError(ConnectError): ... +class BadFileError(ConnectError): ... +class ServiceNameUnknownError(ConnectError): ... +class UserError(ConnectError): ... +class TimeoutError(UserError): ... +class SSLError(ConnectError): ... +class VerifyError(Exception): ... +class PeerVerifyError(VerifyError): ... +class CertificateError(Exception): ... + +def getConnectError(e: Any): ... + +class ConnectionClosed(Exception): ... +class ConnectionLost(ConnectionClosed): ... +class ConnectionAborted(ConnectionLost): ... +class ConnectionDone(ConnectionClosed): ... +class FileDescriptorOverrun(ConnectionLost): ... +class ConnectionFdescWentAway(ConnectionLost): ... +class AlreadyCalled(ValueError): ... +class AlreadyCancelled(ValueError): ... + +class PotentialZombieWarning(Warning): + MESSAGE: str = ... + +class ProcessDone(ConnectionDone): + exitCode: int = ... + signal: Any = ... + status: Any = ... + def __init__(self, status: Any) -> None: ... + +class ProcessTerminated(ConnectionLost): + exitCode: Any = ... + signal: Any = ... + status: Any = ... + def __init__(self, exitCode: Optional[Any] = ..., signal: Optional[Any] = ..., status: Optional[Any] = ...) -> None: ... + +class ProcessExitedAlready(Exception): ... +class NotConnectingError(RuntimeError): ... +class NotListeningError(RuntimeError): ... +class ReactorNotRunning(RuntimeError): ... +class ReactorNotRestartable(RuntimeError): ... +class ReactorAlreadyRunning(RuntimeError): ... +class ReactorAlreadyInstalledError(AssertionError): ... + +class ConnectingCancelledError(Exception): + address: Any = ... + def __init__(self, address: Any) -> None: ... + +class NoProtocol(Exception): ... +class UnsupportedAddressFamily(Exception): ... +class UnsupportedSocketType(Exception): ... +class AlreadyListened(Exception): ... + +class InvalidAddressError(ValueError): + address: Any = ... + message: Any = ... + def __init__(self, address: Any, message: Any) -> None: ...