Skip to content
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] BaseFindComparisonOperator is untyped #672

Open
markedwards opened this issue Aug 22, 2023 · 3 comments
Open

[BUG] BaseFindComparisonOperator is untyped #672

markedwards opened this issue Aug 22, 2023 · 3 comments

Comments

@markedwards
Copy link

Describe the bug
Using any operator that subclasses BaseFindComparisonOperator results in a type error when no-untyped-call is enabled.

To Reproduce

class Foo(Document):
    foo: str | None = None


Foo.find(NE(Foo.foo, None))  # this raises a type error

Expected behavior
BaseFindComparisonOperator should be typed so this doesn't occur.

@markedwards
Copy link
Author

Reproduces with mypy 1.5.1.

@staticxterm
Copy link

Hi @markedwards,
I am unable to reproduce this with given example on mypy 1.5.1 or with the current latest 1.12.1.
Could you please share additional information on how to reproduce?

Even without reproduction, the bug is indeed still valid as the beanie.odm.operators.find.comparison.BaseFindOperator is not fully typed.

@markedwards
Copy link
Author

Sorry, I'm no longer working on the project that used Beanie. Maybe it was fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants