add some missing or incorrect types to peewee (#12251)

This commit is contained in:
Derek Horkel
2024-07-21 00:43:18 -04:00
committed by GitHub
parent 0782c2931c
commit aae471feff

View File

@@ -150,12 +150,12 @@ class _HashableSource:
def __init__(self, *args, **kwargs) -> None: ...
def alias(self, name) -> None: ...
def __hash__(self) -> int: ...
def __eq__(self, other) -> bool: ...
def __ne__(self, other) -> bool: ...
__lt__: Incomplete
__le__: Incomplete
__gt__: Incomplete
__ge__: Incomplete
def __eq__(self, other) -> Expression | bool: ... # type: ignore[override]
def __ne__(self, other) -> Expression | bool: ... # type: ignore[override]
__lt__: Callable[[Self, Any], Expression]
__le__: Callable[[Self, Any], Expression]
__gt__: Callable[[Self, Any], Expression]
__ge__: Callable[[Self, Any], Expression]
class BaseTable(Source):
__and__: Incomplete
@@ -239,44 +239,44 @@ class ColumnBase(Node):
def __invert__(self): ...
__and__: Incomplete
__or__: Incomplete
__add__: Incomplete
__add__: Callable[[Self, Any], Expression]
__sub__: Incomplete
__mul__: Incomplete
__div__: Incomplete
__truediv__: Incomplete
__xor__: Incomplete
__radd__: Incomplete
__rsub__: Incomplete
__rmul__: Incomplete
__rdiv__: Incomplete
__rtruediv__: Incomplete
__rand__: Incomplete
__ror__: Incomplete
__rxor__: Incomplete
def __eq__(self, rhs) -> bool: ...
def __ne__(self, rhs) -> bool: ...
__lt__: Incomplete
__le__: Incomplete
__gt__: Incomplete
__ge__: Incomplete
__lshift__: Incomplete
__rshift__: Incomplete
__mod__: Incomplete
__pow__: Incomplete
like: Incomplete
ilike: Incomplete
bin_and: Incomplete
bin_or: Incomplete
in_: Incomplete
not_in: Incomplete
def is_null(self, is_null: bool = ...): ...
def contains(self, rhs): ...
def startswith(self, rhs): ...
def endswith(self, rhs): ...
def between(self, lo, hi): ...
__mul__: Callable[[Self, Any], Expression]
__div__: Callable[[Self, Any], Expression]
__truediv__: Callable[[Self, Any], Expression]
__xor__: Callable[[Self, Any], Expression]
__radd__: Callable[[Self, Any], Expression]
__rsub__: Callable[[Self, Any], Expression]
__rmul__: Callable[[Self, Any], Expression]
__rdiv__: Callable[[Self, Any], Expression]
__rtruediv__: Callable[[Self, Any], Expression]
__rand__: Callable[[Self, Any], Expression]
__ror__: Callable[[Self, Any], Expression]
__rxor__: Callable[[Self, Any], Expression]
def __eq__(self, rhs) -> Expression: ... # type: ignore[override]
def __ne__(self, rhs) -> Expression: ... # type: ignore[override]
__lt__: Callable[[Self, Any], Expression]
__le__: Callable[[Self, Any], Expression]
__gt__: Callable[[Self, Any], Expression]
__ge__: Callable[[Self, Any], Expression]
__lshift__: Callable[[Self, Any], Expression]
__rshift__: Callable[[Self, Any], Expression]
__mod__: Callable[[Self, Any], Expression]
__pow__: Callable[[Self, Any], Expression]
like: Callable[[Self, Any], Expression]
ilike: Callable[[Self, Any], Expression]
bin_and: Callable[[Self, Any], Expression]
bin_or: Callable[[Self, Any], Expression]
in_: Callable[[Self, Any], Expression]
not_in: Callable[[Self, Any], Expression]
regexp: Callable[[Self, Any], Expression]
iregexp: Callable[[Self, Any], Expression]
def is_null(self, is_null: bool = ...) -> Expression: ...
def contains(self, rhs) -> Expression: ...
def startswith(self, rhs) -> Expression: ...
def endswith(self, rhs) -> Expression: ...
def between(self, lo, hi) -> Expression: ...
def concat(self, rhs): ...
def regexp(self, rhs): ...
def iregexp(self, rhs): ...
def __getitem__(self, item): ...
__iter__: Incomplete
def distinct(self): ...
@@ -1474,8 +1474,8 @@ class CompositeKey(MetaField):
def safe_field_names(self): ...
def __get__(self, instance, instance_type: Incomplete | None = ...): ...
def __set__(self, instance, value) -> None: ...
def __eq__(self, other) -> bool: ...
def __ne__(self, other) -> bool: ...
def __eq__(self, other) -> Expression | bool: ... # type: ignore[override]
def __ne__(self, other) -> Expression | bool: ... # type: ignore[override]
def __hash__(self) -> int: ...
def __sql__(self, ctx): ...
model: Incomplete
@@ -1677,8 +1677,8 @@ class Model(metaclass=ModelBase):
def dependencies(self, search_nullable: bool = ...) -> Generator[Incomplete, None, None]: ...
def delete_instance(self, recursive: bool = ..., delete_nullable: bool = ...): ...
def __hash__(self) -> int: ...
def __eq__(self, other) -> bool: ...
def __ne__(self, other) -> bool: ...
def __eq__(self, other) -> Expression | bool: ... # type: ignore[override]
def __ne__(self, other) -> Expression | bool: ... # type: ignore[override]
def __sql__(self, ctx): ...
@classmethod
def bind(cls, database, bind_refs: bool = ..., bind_backrefs: bool = ..., _exclude: Incomplete | None = ...): ...