Skip to content

Commit 1cbc5e3

Browse files
authored
Improve sql.crud (#30)
1 parent f92fd9c commit 1cbc5e3

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

sqlalchemy-stubs/sql/crud.pyi

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
from typing import Any
2+
from typing import TypeVar
23

3-
from . import coercions as coercions
4-
from . import dml as dml
5-
from . import elements as elements
6-
from . import roles as roles
7-
from .. import exc as exc
8-
from .. import util as util
4+
from . import elements
5+
from . import type_api
6+
from ..util import langhelpers
97

10-
REQUIRED: Any
8+
_TE = TypeVar("_TE", bound=type_api.TypeEngine[Any])
119

12-
class _multiparam_column(elements.ColumnElement):
10+
REQUIRED: langhelpers._symbol
11+
12+
class _multiparam_column(elements.ColumnElement[_TE]):
1313
index: Any = ...
14-
key: Any = ...
15-
original: Any = ...
14+
key: str = ...
15+
original: elements.ColumnElement[_TE] = ...
1616
default: Any = ...
17-
type: Any = ...
18-
def __init__(self, original: Any, index: Any) -> None: ...
19-
def compare(self, other: Any, **kw: Any) -> None: ...
20-
def __eq__(self, other: Any) -> Any: ...
17+
type: _TE = ... # type: ignore[assignment]
18+
def __init__(
19+
self, original: elements.ColumnElement[_TE], index: Any
20+
) -> None: ...
21+
def compare(self, other: Any, **kw: Any) -> bool: ...
22+
def __eq__(self, other: Any) -> bool: ... # type: ignore[override]

0 commit comments

Comments
 (0)