-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Logical operators are not type compliant when using bool operations #1000
Comments
after
the thing why
what we can do for now without opening bunch of errors and to handle typing error is: 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: