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
{{ message }}
Repository navigation
Unhelpful error "Invalid base class mypy(error)" #6372
The following sql-entity class was generated by sqlalchemy -- so this is the standard way to create such a class and operate it. However, mypy calls Base here an Invalid base class. But why? No further details are given, I see no such error described in mypy documentation, and googling "Invalid base class" doesn't lead me to any obvious results. I have no way to diagnose the problem.
Activity
emmatyping commentedon Feb 11, 2019
In this case it is because the Base class is dynamic (computed from a function return), therefore mypy cannot use it for static analysis.
Also this is a duplicate of #2477 (the issue is tracking a better error message and add support for dynamic base classes #2477 (comment)).
ilevkivskyi commentedon Feb 11, 2019
@vivaldus As I mentioned in my closing notice for #2477 you should use SQLAlchemy plugin. The error message is now tracked in #4030.
Ignore "Invalid base class" error
Ignore "Invalid base class" error
MyPy: Adding type checking for SQLAlchemy types