| 1 |
# Builtins stub used for format-string-related test cases. |
| 2 |
# We need str and list, and str needs join and format methods. |
| 3 |
|
| 4 |
from typing import TypeVar, Generic, Iterable, Iterator, List, overload |
| 5 |
|
| 6 |
T = TypeVar('T') |
| 7 |
|
| 8 |
class object: |
| 9 |
def __init__(self): pass |
| 10 |
|
| 11 |
class type: |
| 12 |
def __init__(self, x) -> None: pass |
| 13 |
|
| 14 |
class ellipsis: pass |
| 15 |
|
| 16 |
class list(Iterable[T], Generic[T]): |
| 17 |
@overload |
| 18 |
def __init__(self) -> None: pass |
| 19 |
@overload |
| 20 |
def __init__(self, x: Iterable[T]) -> None: pass |
| 21 |
def append(self, x: T) -> None: pass |
| 22 |
|
| 23 |
class tuple(Generic[T]): pass |
| 24 |
|
| 25 |
class function: pass |
| 26 |
class int: |
| 27 |
def __add__(self, i: int) -> int: pass |
| 28 |
|
| 29 |
class float: pass |
| 30 |
class bool(int): pass |
| 31 |
|
| 32 |
class str: |
| 33 |
def __add__(self, s: str) -> str: pass |
| 34 |
def format(self, *args) -> str: pass |
| 35 |
def join(self, l: List[str]) -> str: pass |
| 36 |
|
| 37 |
|
| 38 |
class dict: pass |