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 marker (PEP-561) #9

Merged
merged 1 commit into from
Aug 10, 2024
Merged

Add py.typed marker (PEP-561) #9

merged 1 commit into from
Aug 10, 2024

Conversation

nemacysts
Copy link
Contributor

Without a py.typed marker, mypy and other type-checkers are unable to use the provided type-hints - instead, they return errors like the following mypy example when run with strict enough settings

path/to/file.py:1: error: Skipping analyzing "pyairnow.errors": module is installed, but missing
library stubs or py.typed marker  [import-untyped]
    from pyairnow.errors import EmptyResponseError

This change adds the required marker file and ensures it's built into the final build artifact.

Without a py.typed marker, `mypy` and other type-checkers are unable to
use the provided type-hints - instead, they return errors like the
following mypy example when run with strict enough settings
```
path/to/file.py:1: error: Skipping analyzing "pyairnow.errors": module is installed, but missing
library stubs or py.typed marker  [import-untyped]
    from pyairnow.errors import EmptyResponseError
```

This change adds the required marker file and ensures it's built into
the final build artifact.
@nemacysts
Copy link
Contributor Author

I tested this by pointing my project at a locally-built wheel with these changes, which then showed no mypy errors.

@asymworks
Copy link
Owner

Looks good, thanks @nemacysts!

@asymworks asymworks merged commit 8c24d09 into asymworks:master Aug 10, 2024
6 checks passed
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