Skip to content

Missing py.typed marker file #1292

Closed
Closed

Description

@timoffex

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)

Activity

  1. timoffex commented on Jan 16, 2025

    @timoffex
    ContributorAuthor

    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.

  2. timoffex commented on Jan 17, 2025

    @timoffex
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions