clalancette / pycdlib

Python library to read and write ISOs
GNU Lesser General Public License v2.1
143 stars 38 forks source link

Add py.typed marker file according to PEP 561 #83

Closed thunze closed 2 years ago

thunze commented 2 years ago

Thanks for the great work on this library!

I’ve been using it recently together with mypy and noticed that mypy skips analyzing the usage of pycdlib because it’s missing the PEP 561 marker file. (PEP 561 specifies a way to mark packages as having type information.)

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

Since pycdlib has proper type hints I thought it would be a good idea to include a py.typed file.

Running python setup.py sdist now includes the py.typed file as well.