Skip to content
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

Missing py.typed marker file #1292

Closed
timoffex opened this issue Jan 16, 2025 · 2 comments
Closed

Missing py.typed marker file #1292

timoffex opened this issue Jan 16, 2025 · 2 comments

Comments

@timoffex
Copy link
Contributor

https://typing.readthedocs.io/en/latest/spec/distributing.html#packaging-type-information

Package maintainers who wish to support type checking of their code MUST add a marker file named py.typed to their package supporting typing.

Without this file, mypy emits errors like this on h2 import statements:

Skipping analyzing "h2.config": module is installed, but missing library stubs or py.typed marker Mypy (import-untyped)

@timoffex
Copy link
Contributor Author

On second thought, maybe this is intentional? I see that not all public APIs are fully typed---for example, mypy infers the type of stream_id and headers on RequestReceived as None because they're not annotated and are set to None in the constructor.

@timoffex
Copy link
Contributor Author

I am happy to find out that this is being addressed by #1289.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant