From 1fa881c69a7fcf50f58a061da9bcdbdca0440486 Mon Sep 17 00:00:00 2001 From: Pavel Mosein Date: Wed, 17 Feb 2021 16:21:15 +0300 Subject: [PATCH 1/2] Fix is_ operator and jsonb astext_type --- sqlalchemy-stubs/sql/operators.pyi | 4 ++-- sqlalchemy-stubs/sql/sqltypes.pyi | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sqlalchemy-stubs/sql/operators.pyi b/sqlalchemy-stubs/sql/operators.pyi index 89a08e1..715ebf4 100644 --- a/sqlalchemy-stubs/sql/operators.pyi +++ b/sqlalchemy-stubs/sql/operators.pyi @@ -46,8 +46,8 @@ class ColumnOperators(Operators): def notin_(self, other: Union[Iterable[Any], BindParameter, Select, Alias]): ... def notlike(self, other, escape: Optional[Any] = ...): ... def notilike(self, other, escape: Optional[Any] = ...): ... - def is_(self, other): ... - def isnot(self, other): ... + def is_(self, other: bool): ... + def isnot(self, other: bool): ... def startswith(self, other: str, **kwargs): ... def endswith(self, other, **kwargs): ... def contains(self, other, **kwargs): ... diff --git a/sqlalchemy-stubs/sql/sqltypes.pyi b/sqlalchemy-stubs/sql/sqltypes.pyi index b3d84ba..a4cabee 100644 --- a/sqlalchemy-stubs/sql/sqltypes.pyi +++ b/sqlalchemy-stubs/sql/sqltypes.pyi @@ -252,7 +252,7 @@ class JSON(Indexable, TypeEngine[_JSONT]): hashable: bool = ... NULL: util.symbol = ... none_as_null: bool = ... - def __init__(self, none_as_null: bool = ...) -> None: ... + def __init__(self, none_as_null: bool = ..., astext_type: Optional[String] = ...) -> None: ... class JSONElementType(TypeEngine[Union[int, str]]): def string_bind_processor(self, dialect): ... def string_literal_processor(self, dialect): ... From 1d85c5ac2fac7decbf9e1608083af9b9dcb5ab36 Mon Sep 17 00:00:00 2001 From: Pavel Mosein Date: Wed, 17 Feb 2021 16:24:43 +0300 Subject: [PATCH 2/2] is_ and isnot_ optional --- sqlalchemy-stubs/sql/operators.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlalchemy-stubs/sql/operators.pyi b/sqlalchemy-stubs/sql/operators.pyi index 715ebf4..3c65284 100644 --- a/sqlalchemy-stubs/sql/operators.pyi +++ b/sqlalchemy-stubs/sql/operators.pyi @@ -46,8 +46,8 @@ class ColumnOperators(Operators): def notin_(self, other: Union[Iterable[Any], BindParameter, Select, Alias]): ... def notlike(self, other, escape: Optional[Any] = ...): ... def notilike(self, other, escape: Optional[Any] = ...): ... - def is_(self, other: bool): ... - def isnot(self, other: bool): ... + def is_(self, other: Optional[bool]): ... + def isnot(self, other: Optional[bool]): ... def startswith(self, other: str, **kwargs): ... def endswith(self, other, **kwargs): ... def contains(self, other, **kwargs): ...