No stubs for event.py in sqlalchemy!
There is no stub for event.py in sqlalchemy, meaning no .pyi file, therefore mypy can not find it and throws an error.
The workaround for the moment would be import it separately from the import list of sqlalchemy and specify type: ignore. This needs to be done in every file that event actually is needed to be imported.
Comments (4)
-
repo owner -
repo owner Looks like one of Guido's "make static python" ideas, noting at https://www.python.org/dev/peps/pep-0484/#non-goals: "It should also be emphasized that Python will remain a dynamically typed language, and the authors have no desire to ever make type hints mandatory, even by convention. ".
-
repo owner - changed status to closed
okey doke, have consulted w/ some people familiar here. libraries can't be expected to supply typing information for mypy, and I'm told that people should use the
--ignore-missing-imports
option to deal with this problem.good luck!
-
reporter well yeah ok thnx i will use all the time type: ignore when i use events.
- Log in to comment
I have no idea what a .pyi file is. Can you please provide specifics as to what you wish to be changed? .pyi flies are not something that is contained within a Python package and this seems like something the "mypy" interpreter should know how to generate on its own.