Feature: Add a py.typed file to support type checking in downstream code #312
Open
Description
We use plenty of type annotations in this repo. If we add a py.typed
file, downstream use of functions and classes imported from nomic
can be type-checked.
This should only be done if the type annotations are relatively complete, though - if they are too permissive, this could let strict type checks pass on incorrect downstream code.
I'm not sure if it'll be a problem that mypy doesn't pass on this repo, since downstream projects may use mypy. pyi stubs generated with e.g. stubgen could be one way around that.
See also (Python/mypy): https://typing.readthedocs.io/en/latest/spec/distributing.html#packaging-type-information
See also (pyright): https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface