SQLAlchemy: Annotate text() (#9498)

This commit is contained in:
Sebastian Rittau
2023-01-11 16:01:11 +01:00
committed by GitHub
parent b76e61734f
commit b8f337a452
2 changed files with 6 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
from _typeshed import Incomplete, Self
from typing import Any, Generic, TypeVar
from typing_extensions import Literal
@@ -136,8 +137,8 @@ class TextClause(
def __and__(self, other): ...
key: Any
text: Any
def __init__(self, text, bind: Any | None = ...): ...
def bindparams(self, *binds, **names_to_values) -> None: ...
def __init__(self, text: str, bind: Incomplete | None = None) -> None: ...
def bindparams(self: Self, *binds, **names_to_values) -> Self: ...
def columns(self, *cols, **types): ...
@property
def type(self): ...

View File

@@ -163,7 +163,9 @@ lateral: Incomplete
or_: Incomplete
bindparam: Incomplete
select: Incomplete
text: Incomplete
def text(text: str, bind: Incomplete | None = None) -> TextClause: ...
table: Incomplete
column: Incomplete
over: Incomplete