Missing py.typed marker
chuckwondo opened this issue · comments
Since type annotations/hints are included within this repo, a py.typed
file should be included to let static type checkers know that this is the case. Otherwise, they complain when importing things from pangeo_forge_recipes
. For example, mypy
produces the following message:
Skipping analyzing "pangeo_forge_recipes.patterns": module is installed, but missing library stubs or py.typed marker [import] mypy
@chuckwondo thanks for catching this, seems like a best practice that we'd overlooked.
Out of curiosity, under what circumstance do you see the warning message you posted above?
I ask because we run mypy in CI (via pre-commit) and I haven't noticed that message myself. Maybe I haven't been reading the pre-commit logs closely enough.
@cisaacstern, I see such a message when using pangeo-forge-recipes
as a dependency.
For example, in #614 I'm using it as a dependency in my own recipe. When I run mypy against my recipe's code, I see such a warning (which I also see in my IDE when I hover over the import, since I have my IDE configured with a mypy extension).