Open aberres opened 2 years ago
Might be related to https://github.com/sqlalchemy/sqlalchemy2-stubs/issues/141
This is related to the mypy plugin. Since v2 will not use it it's unlikely that it will be fixed. PR are welcome though. (The plugin code lives in the main sqlalchemy repo)
Describe the bug Given the code below I regularly run into a mypy crash when the cache is warm.
Expected behavior No crash
To Reproduce I am having a hard time to isolate the crash. It seems to be a combination of different (namespace?) packages and a change of the cache is needed. I tried to come up with a minimal example but failed.
Maybe it does ring a bell nevertheless... As the class is created in a function there is no module which can be looked up.
We ran into the issue when introducing a new test which creates a base class within the test function. Whenever we switched branches mypy crashed. The workaound is to move the instantiation out into the model.
Error
Versions.