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

Add py.typed to the package to enable the type annotations #211

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

kourbou
Copy link
Contributor

@kourbou kourbou commented Jul 15, 2024

According to PEP 561, packages with inline type annotations should put a py.typed marker file in their package directory. This fixes mypy import-untyped errors when type checking code which imports laplace:

error: Skipping analyzing "laplace": module is installed, but missing library stubs or py.typed marker.
    from laplace import Laplace
    ^
note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

According to PEP 561, packages with inline type annotations should put
a `py.typed` marker file in their package directory. This fixes mypy's
`import-untyped` error when type checking code which imports `laplace`.
@wiseodd
Copy link
Collaborator

wiseodd commented Jul 15, 2024

LGTM thanks!

@wiseodd wiseodd merged commit 7f4c706 into aleximmer:main Jul 15, 2024
3 checks passed
@kourbou kourbou deleted the pep-561-compat branch July 15, 2024 16:09
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

Successfully merging this pull request may close these issues.

2 participants