| 1 |
# Fixture for for-else tests with exceptions |
| 2 |
# Combines needed elements from primitives.pyi and exception.pyi |
| 3 |
|
| 4 |
from typing import Generic, Iterator, Mapping, Sequence, TypeVar |
| 5 |
|
| 6 |
T = TypeVar('T') |
| 7 |
V = TypeVar('V') |
| 8 |
|
| 9 |
class object: |
| 10 |
def __init__(self) -> None: pass |
| 11 |
class type: |
| 12 |
def __init__(self, x: object) -> None: pass |
| 13 |
class int: |
| 14 |
def __init__(self, x: object = ..., base: int = ...) -> None: pass |
| 15 |
def __add__(self, i: int) -> int: pass |
| 16 |
def __rmul__(self, x: int) -> int: pass |
| 17 |
def __bool__(self) -> bool: pass |
| 18 |
def __eq__(self, x: object) -> bool: pass |
| 19 |
def __ne__(self, x: object) -> bool: pass |
| 20 |
def __lt__(self, x: 'int') -> bool: pass |
| 21 |
def __le__(self, x: 'int') -> bool: pass |
| 22 |
def __gt__(self, x: 'int') -> bool: pass |
| 23 |
def __ge__(self, x: 'int') -> bool: pass |
| 24 |
class float: |
| 25 |
def __float__(self) -> float: pass |
| 26 |
def __add__(self, x: float) -> float: pass |
| 27 |
def hex(self) -> str: pass |
| 28 |
class bool(int): pass |
| 29 |
class str(Sequence[str]): |
| 30 |
def __add__(self, s: str) -> str: pass |
| 31 |
def __iter__(self) -> Iterator[str]: pass |
| 32 |
def __contains__(self, other: object) -> bool: pass |
| 33 |
def __getitem__(self, item: int) -> str: pass |
| 34 |
def format(self, *args: object, **kwargs: object) -> str: pass |
| 35 |
class dict(Mapping[T, V]): |
| 36 |
def __iter__(self) -> Iterator[T]: pass |
| 37 |
class tuple(Generic[T]): |
| 38 |
def __contains__(self, other: object) -> bool: pass |
| 39 |
class ellipsis: pass |
| 40 |
|
| 41 |
class BaseException: |
| 42 |
def __init__(self, *args: object) -> None: ... |
| 43 |
class Exception(BaseException): pass |
| 44 |
class RuntimeError(Exception): pass |
| 45 |
|
| 46 |
class range(Sequence[int]): |
| 47 |
def __init__(self, __x: int, __y: int = ..., __z: int = ...) -> None: pass |
| 48 |
def count(self, value: int) -> int: pass |
| 49 |
def index(self, value: int) -> int: pass |
| 50 |
def __getitem__(self, i: int) -> int: pass |
| 51 |
def __iter__(self) -> Iterator[int]: pass |
| 52 |
def __contains__(self, other: object) -> bool: pass |
| 53 |
|
| 54 |
def print(x: object) -> None: pass |