|
| 1 | +from collections.abc import Iterator |
1 | 2 | from typing import Any |
2 | 3 |
|
3 | 4 | class Composable: |
4 | 5 | def __init__(self, wrapped) -> None: ... |
5 | 6 | def as_string(self, context) -> str: ... |
6 | | - def __add__(self, other): ... |
7 | | - def __mul__(self, n): ... |
8 | | - def __eq__(self, other): ... |
9 | | - def __ne__(self, other): ... |
| 7 | + def __add__(self, other) -> Composed: ... |
| 8 | + def __mul__(self, n) -> Composed: ... |
| 9 | + def __eq__(self, other) -> bool: ... |
| 10 | + def __ne__(self, other) -> bool: ... |
10 | 11 |
|
11 | 12 | class Composed(Composable): |
12 | 13 | def __init__(self, seq) -> None: ... |
13 | 14 | @property |
14 | | - def seq(self): ... |
15 | | - def as_string(self, context): ... |
16 | | - def __iter__(self): ... |
17 | | - def __add__(self, other): ... |
18 | | - def join(self, joiner): ... |
| 15 | + def seq(self) -> list[Composable]: ... |
| 16 | + def as_string(self, context) -> str: ... |
| 17 | + def __iter__(self) -> Iterator[Composable]: ... |
| 18 | + def __add__(self, other) -> Composed: ... |
| 19 | + def join(self, joiner) -> Composed: ... |
19 | 20 |
|
20 | 21 | class SQL(Composable): |
21 | 22 | def __init__(self, string) -> None: ... |
22 | 23 | @property |
23 | | - def string(self): ... |
24 | | - def as_string(self, context): ... |
25 | | - def format(self, *args, **kwargs): ... |
26 | | - def join(self, seq): ... |
| 24 | + def string(self) -> str: ... |
| 25 | + def as_string(self, context) -> str: ... |
| 26 | + def format(self, *args, **kwargs) -> Composed: ... |
| 27 | + def join(self, seq) -> Composed: ... |
27 | 28 |
|
28 | 29 | class Identifier(Composable): |
29 | 30 | def __init__(self, *strings) -> None: ... |
30 | 31 | @property |
31 | | - def strings(self): ... |
| 32 | + def strings(self) -> tuple[str, ...]: ... |
32 | 33 | @property |
33 | | - def string(self): ... |
34 | | - def as_string(self, context): ... |
| 34 | + def string(self) -> str: ... |
| 35 | + def as_string(self, context) -> str: ... |
35 | 36 |
|
36 | 37 | class Literal(Composable): |
37 | 38 | @property |
38 | 39 | def wrapped(self): ... |
39 | | - def as_string(self, context): ... |
| 40 | + def as_string(self, context) -> str: ... |
40 | 41 |
|
41 | 42 | class Placeholder(Composable): |
42 | 43 | def __init__(self, name: Any | None = ...) -> None: ... |
43 | 44 | @property |
44 | | - def name(self): ... |
45 | | - def as_string(self, context): ... |
| 45 | + def name(self) -> str | None: ... |
| 46 | + def as_string(self, context) -> str: ... |
46 | 47 |
|
47 | 48 | NULL: Any |
48 | 49 | DEFAULT: Any |
0 commit comments