Mypy crashes with "AssertionError: Cannot find module for UpdatedBase"
when analyzing lnt/server/db/migrations/upgrade_0_to_1.py with a
populated cache. This leads to a number of files not being analyzed by
mypy.
Details
Details
- Reviewers
tnfchris danilaml cmatthews - Commits
- rLNT28b6eb35d301: Disable mypy cache
Diff Detail
Diff Detail
- Repository
- rLNT LNT
- Build Status
Buildable 85866 Build 117414: arc lint + arc unit
Event Timeline
Comment Actions
I think it might be a problem with the sqlalchemy stub/plugin. UpdatedBase is alias to the same call to declarative_base() as Base in the same file. I'm guessing that plugin does not inform Mypy of the dynamic nature of that function call or something like that. It's still early days for that plugin apparently but without using it we get some error that cannot be fixed due to that same declarative_base. I'll try to report the bug.