You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the thing why Nor & Not works is lack of typing in query property,
others which are not overridden ll have error
@property
def query(self):
what we can do for now without opening bunch of errors and to handle typing error is:
temporarily remove query typing in LogicalOperatorForListOfExpressions
and
then -> we can proceed with typing adjustment for all logical operators in a new issue with all specifications needed
fyi: here unified query typing for all logical operators #1021
Describe the bug
Logical operators are not type compliant when using bool operations (eg.
Or(Product.price<10, Product.category=="Sweets")
)To Reproduce
Just use the same example from docs:
It seems that logical ops are missing bool in the accepted argument types: https://github.com/BeanieODM/beanie/blob/main/beanie/odm/operators/find/logical.py#L16
Expected behavior
Expected to work normally with type checking. Instead, got the error:
Regular
find
works ok with bool operations as it acceptsbool
as arg type:The text was updated successfully, but these errors were encountered: