kasium
kasium
As far as I can see this is a limitation with the mypy plugin. I'm open to open/search for an issue on their side if it helps
Thanks a lot!
So, I just tried to rename the functions, but this doesn't work. It seems like that the function names must be same resulting in mypy issues: https://docs.sqlalchemy.org/en/14/orm/extensions/hybrid.html#defining-expression-behavior-distinct-from-attribute-behavior
Also, if I just ignore the duplicate names (# type:ignore[no-redef]), then mypy still complains about overloaded functions. I guess, mypy can't figure out which function to use in which case....
See sqlalchemy/alembic#867
@The-Compiler exactly these fixtures and the plugin sounds great. Some documentation would be great 😄
Would also an implementation over TypeGuard be possible? So that you can tell TypeGuard somehow that only concrete classes can be returned
@RonnyPfannschmidt if you have some time, a release would be great 😄
Thanks!
Accessing the context will now also lead to a deprecation warning ``` venv/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:14: in from flask import _app_ctx_stack, abort, current_app, request venv/lib/python3.7/site-packages/flask/__init__.py:56: in __getattr__ stacklevel=2, E DeprecationWarning: '_app_ctx_stack' is deprecated...