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 file #387

Merged
merged 1 commit into from
May 16, 2023
Merged

Add py.typed file #387

merged 1 commit into from
May 16, 2023

Conversation

robin-nitrokey
Copy link
Member

This patch adds a py.typed file so that users of the library can make use of our type annotations.

Checklist

Make sure to run make check and make fix before creating a PR, otherwise the CI will fail.

  • tested with Python3.9
  • signed commits
  • updated documentation (e.g. parameter description, inline doc, docs.nitrokey)
  • added labels

This patch adds a py.typed file so that users of the library can make
use of our type annotations.
@szszszsz
Copy link
Member

Hey! Can you link to proper the docs, so I could verify the PR?

@robin-nitrokey
Copy link
Member Author

This is specified by PEP 561.

@szszszsz
Copy link
Member

Does it work for you? I think you are missing adding this file to the project configuration (which is suggested in the docs).

@robin-nitrokey
Copy link
Member Author

Yes, it works for me. We use flit for packaging and it includes all files inside the package folder:

Data files which your code will use should go inside the Python package folder. Flit will package these with no special configuration.

https://flit.pypa.io/en/stable/pyproject_toml.html#external-data-section

Note that we don’t mention the VERSION file in there either.

@robin-nitrokey robin-nitrokey merged commit bf09e6d into master May 16, 2023
@robin-nitrokey robin-nitrokey deleted the py.typed branch May 16, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants