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 #37

Merged
merged 2 commits into from
Aug 22, 2022
Merged

Add py.typed #37

merged 2 commits into from
Aug 22, 2022

Conversation

mmaslowskicc
Copy link
Contributor

This allows mypy to use the present type annotations in packages using an installed prometheus-fastapi-instrumentator.

@Kludex
Copy link
Contributor

Kludex commented May 31, 2021

I think you also need to add include = ["prometheus_fastapi_instrumentator/py.typed"] in the pyproject 🤔

@mmaslowskicc
Copy link
Contributor Author

It was included in the built sdist and wheel, but I'm not sure how Poetry determines what to include by default, so I added the include. Thanks.

@trallnag trallnag merged commit 0c67d1b into trallnag:master Aug 22, 2022
@trallnag
Copy link
Owner

Thanks

@trallnag
Copy link
Owner

According to this blogpost adding the file in pyproject.toml is not necessary https://blog.whtsky.me/tech/2021/dont-forget-py.typed-for-your-typed-python-package/

trallnag added a commit that referenced this pull request Aug 22, 2022
Not necessary for example according to the following blogpost:

https://blog.whtsky.me/tech/2021/dont-forget-py.typed-for-your-typed-python-package/

Also I tested it in another repository to make sure.
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.

3 participants