-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Make exceptions.pyi import its definitions from __builtin__.pyi #1610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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): ... |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be
ArithmeticError as ArithmeticError
so that the name is re-exported from this module.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's the test failure was about. I'll send another pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1611