voyage-ai / voyageai-python

Voyage AI Official Python Library
https://www.voyageai.com
MIT License
40 stars 6 forks source link

Request: `py.typed` for typing hints #8

Closed jamesbraza closed 3 weeks ago

jamesbraza commented 4 months ago

When running mypy on modules that import from voyagai, it fails with:

app/patches.py:16:1: error: Skipping analyzing "voyageai": module is installed, but missing library stubs or py.typed marker  [import-untyped]
    from voyageai import AsyncClient
    ^
app/patches.py:17:1: error: Skipping analyzing "voyageai.object": module is installed, but missing library stubs or py.typed marker  [import-untyped]
    from voyageai.object import EmbeddingsObject
    ^
app/patches.py:17:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

This is because a py.typed marker file is not present in the repo. Can we add one?

fredtcaroli commented 1 month ago

I hate to be the one to say "up", but I think it's fair since no one responded to this.

Pyright also complaints about the VoyageAI python SDK. And looking at this codebase it looks like just adding a py.typed file would fix it.