Skip to content

Commit aae471f

Browse files
authored
add some missing or incorrect types to peewee (#12251)
1 parent 0782c29 commit aae471f

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

stubs/peewee/peewee.pyi

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ class _HashableSource:
150150
def __init__(self, *args, **kwargs) -> None: ...
151151
def alias(self, name) -> None: ...
152152
def __hash__(self) -> int: ...
153-
def __eq__(self, other) -> bool: ...
154-
def __ne__(self, other) -> bool: ...
155-
__lt__: Incomplete
156-
__le__: Incomplete
157-
__gt__: Incomplete
158-
__ge__: Incomplete
153+
def __eq__(self, other) -> Expression | bool: ... # type: ignore[override]
154+
def __ne__(self, other) -> Expression | bool: ... # type: ignore[override]
155+
__lt__: Callable[[Self, Any], Expression]
156+
__le__: Callable[[Self, Any], Expression]
157+
__gt__: Callable[[Self, Any], Expression]
158+
__ge__: Callable[[Self, Any], Expression]
159159

160160
class BaseTable(Source):
161161
__and__: Incomplete
@@ -239,44 +239,44 @@ class ColumnBase(Node):
239239
def __invert__(self): ...
240240
__and__: Incomplete
241241
__or__: Incomplete
242-
__add__: Incomplete
242+
__add__: Callable[[Self, Any], Expression]
243243
__sub__: Incomplete
244-
__mul__: Incomplete
245-
__div__: Incomplete
246-
__truediv__: Incomplete
247-
__xor__: Incomplete
248-
__radd__: Incomplete
249-
__rsub__: Incomplete
250-
__rmul__: Incomplete
251-
__rdiv__: Incomplete
252-
__rtruediv__: Incomplete
253-
__rand__: Incomplete
254-
__ror__: Incomplete
255-
__rxor__: Incomplete
256-
def __eq__(self, rhs) -> bool: ...
257-
def __ne__(self, rhs) -> bool: ...
258-
__lt__: Incomplete
259-
__le__: Incomplete
260-
__gt__: Incomplete
261-
__ge__: Incomplete
262-
__lshift__: Incomplete
263-
__rshift__: Incomplete
264-
__mod__: Incomplete
265-
__pow__: Incomplete
266-
like: Incomplete
267-
ilike: Incomplete
268-
bin_and: Incomplete
269-
bin_or: Incomplete
270-
in_: Incomplete
271-
not_in: Incomplete
272-
def is_null(self, is_null: bool = ...): ...
273-
def contains(self, rhs): ...
274-
def startswith(self, rhs): ...
275-
def endswith(self, rhs): ...
276-
def between(self, lo, hi): ...
244+
__mul__: Callable[[Self, Any], Expression]
245+
__div__: Callable[[Self, Any], Expression]
246+
__truediv__: Callable[[Self, Any], Expression]
247+
__xor__: Callable[[Self, Any], Expression]
248+
__radd__: Callable[[Self, Any], Expression]
249+
__rsub__: Callable[[Self, Any], Expression]
250+
__rmul__: Callable[[Self, Any], Expression]
251+
__rdiv__: Callable[[Self, Any], Expression]
252+
__rtruediv__: Callable[[Self, Any], Expression]
253+
__rand__: Callable[[Self, Any], Expression]
254+
__ror__: Callable[[Self, Any], Expression]
255+
__rxor__: Callable[[Self, Any], Expression]
256+
def __eq__(self, rhs) -> Expression: ... # type: ignore[override]
257+
def __ne__(self, rhs) -> Expression: ... # type: ignore[override]
258+
__lt__: Callable[[Self, Any], Expression]
259+
__le__: Callable[[Self, Any], Expression]
260+
__gt__: Callable[[Self, Any], Expression]
261+
__ge__: Callable[[Self, Any], Expression]
262+
__lshift__: Callable[[Self, Any], Expression]
263+
__rshift__: Callable[[Self, Any], Expression]
264+
__mod__: Callable[[Self, Any], Expression]
265+
__pow__: Callable[[Self, Any], Expression]
266+
like: Callable[[Self, Any], Expression]
267+
ilike: Callable[[Self, Any], Expression]
268+
bin_and: Callable[[Self, Any], Expression]
269+
bin_or: Callable[[Self, Any], Expression]
270+
in_: Callable[[Self, Any], Expression]
271+
not_in: Callable[[Self, Any], Expression]
272+
regexp: Callable[[Self, Any], Expression]
273+
iregexp: Callable[[Self, Any], Expression]
274+
def is_null(self, is_null: bool = ...) -> Expression: ...
275+
def contains(self, rhs) -> Expression: ...
276+
def startswith(self, rhs) -> Expression: ...
277+
def endswith(self, rhs) -> Expression: ...
278+
def between(self, lo, hi) -> Expression: ...
277279
def concat(self, rhs): ...
278-
def regexp(self, rhs): ...
279-
def iregexp(self, rhs): ...
280280
def __getitem__(self, item): ...
281281
__iter__: Incomplete
282282
def distinct(self): ...
@@ -1474,8 +1474,8 @@ class CompositeKey(MetaField):
14741474
def safe_field_names(self): ...
14751475
def __get__(self, instance, instance_type: Incomplete | None = ...): ...
14761476
def __set__(self, instance, value) -> None: ...
1477-
def __eq__(self, other) -> bool: ...
1478-
def __ne__(self, other) -> bool: ...
1477+
def __eq__(self, other) -> Expression | bool: ... # type: ignore[override]
1478+
def __ne__(self, other) -> Expression | bool: ... # type: ignore[override]
14791479
def __hash__(self) -> int: ...
14801480
def __sql__(self, ctx): ...
14811481
model: Incomplete
@@ -1677,8 +1677,8 @@ class Model(metaclass=ModelBase):
16771677
def dependencies(self, search_nullable: bool = ...) -> Generator[Incomplete, None, None]: ...
16781678
def delete_instance(self, recursive: bool = ..., delete_nullable: bool = ...): ...
16791679
def __hash__(self) -> int: ...
1680-
def __eq__(self, other) -> bool: ...
1681-
def __ne__(self, other) -> bool: ...
1680+
def __eq__(self, other) -> Expression | bool: ... # type: ignore[override]
1681+
def __ne__(self, other) -> Expression | bool: ... # type: ignore[override]
16821682
def __sql__(self, ctx): ...
16831683
@classmethod
16841684
def bind(cls, database, bind_refs: bool = ..., bind_backrefs: bool = ..., _exclude: Incomplete | None = ...): ...

0 commit comments

Comments
 (0)