Closed lemon24 closed 2 years ago
$ mypy --strict -c 'from reader import make_reader' <string>:1: error: Skipping analyzing "reader": module is installed, but missing library stubs or py.typed marker <string>:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports Found 1 error in 1 file (checked 1 source file) $ touch src/reader/py.typed $ mypy --strict -c 'from reader import make_reader' <string>:1: error: Module "reader" does not explicitly export attribute "make_reader"; implicit reexport disabled Found 1 error in 1 file (checked 1 source file) $ sed -i.old 's/make_reader/make_reader as make_reader/' src/reader/__init__.py $ mypy --strict -c 'from reader import make_reader' Success: no issues found in 1 source file
Heh, this exists: https://typing.readthedocs.io/en/latest/source/libraries.html