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
I don't plan to add MyPy workarounds to the docs at this time. Also, this isn't correct from a typing perspective, the class used during type checking is not a SQLAlchemy declarative base. I'd suggest adding an ignore rule for the name-defined error in model files to your mypy config.
I suggest anyone having an issue with this add their vote to the linked issue python/mypy#8603.
mypy currently does not correctly handle inheritance from a class attribute with a model -
db.Model
:According on the related bugreport, this issue will not be resolved anytime soon.
So, there is working workaround:
It will be useful if this workaround will be mentioned in documentation.
I can make changes to the documentation myself if I get the approval.
The text was updated successfully, but these errors were encountered: