I'm fixing up some code in an old repo and I need to get some (mypy) tests passing. Mypy doesn't seem to recognise dash.Dash
calls, throwing the following: error: Module has no attribute "Dash"
.
A simple fix I've found is to use dash.dash.Dash
which seems to be equivalent as they have the same source file. I was wondering:
- Are they equivalent? If yes why have both? If no what is another solution?
- Why does mypy throw this error?
Apologies if it is obvious - I've never used Dash I'm merely fixing someone else's code. My Python, Mypy and Dash versions are 3.8, 0.812 and 1.21.0 respectively.