mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Make exceptions.pyi import its definitions from __builtin__.pyi (#1610)
* Make exceptions.pyi import its definitions from __builtin__.pyi * Make ReferenceError a full class again. * Restore blank line at EOF.
This commit is contained in:
@@ -1,80 +1,49 @@
|
||||
from typing import Any, Tuple, Optional
|
||||
from __builtin__ import ArithmeticError
|
||||
from __builtin__ import AssertionError
|
||||
from __builtin__ import AttributeError
|
||||
from __builtin__ import BaseException
|
||||
from __builtin__ import BufferError
|
||||
from __builtin__ import BytesWarning
|
||||
from __builtin__ import DeprecationWarning
|
||||
from __builtin__ import EOFError
|
||||
from __builtin__ import EnvironmentError
|
||||
from __builtin__ import Exception
|
||||
from __builtin__ import FloatingPointError
|
||||
from __builtin__ import FutureWarning
|
||||
from __builtin__ import GeneratorExit
|
||||
from __builtin__ import IOError
|
||||
from __builtin__ import ImportError
|
||||
from __builtin__ import ImportWarning
|
||||
from __builtin__ import IndentationError
|
||||
from __builtin__ import IndexError
|
||||
from __builtin__ import KeyError
|
||||
from __builtin__ import KeyboardInterrupt
|
||||
from __builtin__ import LookupError
|
||||
from __builtin__ import MemoryError
|
||||
from __builtin__ import NameError
|
||||
from __builtin__ import NotImplementedError
|
||||
from __builtin__ import OSError
|
||||
from __builtin__ import OverflowError
|
||||
from __builtin__ import PendingDeprecationWarning
|
||||
from __builtin__ import RuntimeError
|
||||
from __builtin__ import RuntimeWarning
|
||||
from __builtin__ import StandardError
|
||||
from __builtin__ import StopIteration
|
||||
from __builtin__ import SyntaxError
|
||||
from __builtin__ import SyntaxWarning
|
||||
from __builtin__ import SystemError
|
||||
from __builtin__ import SystemExit
|
||||
from __builtin__ import TabError
|
||||
from __builtin__ import TypeError
|
||||
from __builtin__ import UnboundLocalError
|
||||
from __builtin__ import UnicodeError
|
||||
from __builtin__ import UnicodeDecodeError
|
||||
from __builtin__ import UnicodeEncodeError
|
||||
from __builtin__ import UnicodeTranslateError
|
||||
from __builtin__ import UnicodeWarning
|
||||
from __builtin__ import UserWarning
|
||||
from __builtin__ import ValueError
|
||||
from __builtin__ import Warning
|
||||
from __builtin__ import ZeroDivisionError
|
||||
|
||||
class StandardError(Exception): ...
|
||||
class ArithmeticError(StandardError): ...
|
||||
class AssertionError(StandardError): ...
|
||||
class AttributeError(StandardError): ...
|
||||
class BaseException(object):
|
||||
args = ... # type: Tuple[Any, ...]
|
||||
message = ... # type: str
|
||||
def __getslice__(self, start, end) -> Any: ...
|
||||
def __getitem__(self, start, end) -> Any: ...
|
||||
def __unicode__(self) -> unicode: ...
|
||||
class BufferError(StandardError): ...
|
||||
class BytesWarning(Warning): ...
|
||||
class DeprecationWarning(Warning): ...
|
||||
class EOFError(StandardError): ...
|
||||
class EnvironmentError(StandardError):
|
||||
errno = ... # type: int
|
||||
strerror = ... # type: str
|
||||
filename = ... # type: str
|
||||
class Exception(BaseException): ...
|
||||
class FloatingPointError(ArithmeticError): ...
|
||||
class FutureWarning(Warning): ...
|
||||
class GeneratorExit(BaseException): ...
|
||||
class IOError(EnvironmentError): ...
|
||||
class ImportError(StandardError): ...
|
||||
class ImportWarning(Warning): ...
|
||||
class IndentationError(SyntaxError): ...
|
||||
class IndexError(LookupError): ...
|
||||
class KeyError(LookupError): ...
|
||||
class KeyboardInterrupt(BaseException): ...
|
||||
class LookupError(StandardError): ...
|
||||
class MemoryError(StandardError): ...
|
||||
class NameError(StandardError): ...
|
||||
class NotImplementedError(RuntimeError): ...
|
||||
class OSError(EnvironmentError): ...
|
||||
class OverflowError(ArithmeticError): ...
|
||||
class PendingDeprecationWarning(Warning): ...
|
||||
class ReferenceError(StandardError): ...
|
||||
class RuntimeError(StandardError): ...
|
||||
class RuntimeWarning(Warning): ...
|
||||
class StopIteration(Exception): ...
|
||||
class SyntaxError(StandardError):
|
||||
text = ... # type: str
|
||||
print_file_and_line = ... # type: Optional[str]
|
||||
filename = ... # type: str
|
||||
lineno = ... # type: int
|
||||
offset = ... # type: int
|
||||
msg = ... # type: str
|
||||
class SyntaxWarning(Warning): ...
|
||||
class SystemError(StandardError): ...
|
||||
class SystemExit(BaseException):
|
||||
code = ... # type: int
|
||||
class TabError(IndentationError): ...
|
||||
class TypeError(StandardError): ...
|
||||
class UnboundLocalError(NameError): ...
|
||||
class UnicodeError(ValueError): ...
|
||||
class UnicodeDecodeError(UnicodeError):
|
||||
start = ... # type: int
|
||||
reason = ... # type: str
|
||||
object = ... # type: str
|
||||
end = ... # type: int
|
||||
encoding = ... # type: str
|
||||
class UnicodeEncodeError(UnicodeError):
|
||||
start = ... # type: int
|
||||
reason = ... # type: str
|
||||
object = ... # type: unicode
|
||||
end = ... # type: int
|
||||
encoding = ... # type: str
|
||||
class UnicodeTranslateError(UnicodeError):
|
||||
start = ... # type: int
|
||||
reason = ... # type: str
|
||||
object = ... # type: Any
|
||||
end = ... # type: int
|
||||
encoding = ... # type: str
|
||||
class UnicodeWarning(Warning): ...
|
||||
class UserWarning(Warning): ...
|
||||
class ValueError(StandardError): ...
|
||||
class Warning(Exception): ...
|
||||
class ZeroDivisionError(ArithmeticError): ...
|
||||
|
||||
Reference in New Issue
Block a user