Describe the bug
When using static typing on relationship which is lazy='dynamic' I used "AppenderQuery", which is the one which SQLAlchemy gave me at runtime. I type ignored it as Mapped does not support it clearly. After I use where/order_by mypy says:
error: "where" of "AppenderQuery" does not return a value.
Which is clearly not true, typing says it returns None, but at runtime it returns something.
Describe the bug When using static typing on relationship which is lazy='dynamic' I used "AppenderQuery", which is the one which SQLAlchemy gave me at runtime. I type ignored it as Mapped does not support it clearly. After I use where/order_by mypy says:
error: "where" of "AppenderQuery" does not return a value
. Which is clearly not true, typing says it returns None, but at runtime it returns something.Expected behavior Typing should reflect reality.
To Reproduce
Error
Versions.
Additional context Still trying to figure out real ways how to type, already existing code.
Thanks and have a nice day!