Nitrokey / pynitrokey

Python client for Nitrokey devices
Apache License 2.0
98 stars 27 forks source link

Add py.typed file #387

Closed robin-nitrokey closed 1 year ago

robin-nitrokey commented 1 year ago

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.

szszszsz commented 1 year ago

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

robin-nitrokey commented 1 year ago

This is specified by PEP 561.

szszszsz commented 1 year ago

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 commented 1 year ago

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.