-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mypy: Skipping analyzing "geoalchemy2.functions": module is installed, but missing library stubs or py.typed marker [import] #476
Comments
@adrien-berchet I tested it locally and I now get:
instead, which I guess means that the types work. Are the types in |
Thanks for this test @pjonsson The return types stored in |
it seems to me in this case that the functions are known ahead of time (because they are defined in the |
Good point @mbway ! I will see how we can improve this. Or maybe you can have a look if you have some time? |
I'm looking into it now. I minor annoyance that I've run into before on other projects is that when a package or module is called
so I will put the script for generating the stubs outside the package itself |
Hi there, the new 0.14.2 release (https://pypi.org/project/GeoAlchemy2/0.14.2/) should now provide type hints. |
After updating to GeoAlchemy2 0.14.1 which mentions type annotations in the release notes, I tried removing the ignore_missing_imports exception in my pyproject.toml. Here's the output from running mypy on my source:
Are the type annotations not meant for use by third parties, so this is as expected?
If it's not as expected, I can say I haven't done anything special for pytest, and mypy somehow figures out the types for that without giving me any warnings. A difference I can see is that there is a py.typed file in that tree: https://github.com/pytest-dev/pytest/tree/main/src/pytest (which was alluded to in #464 (comment)).
The text was updated successfully, but these errors were encountered: