ollama / ollama-python

Ollama Python library
https://ollama.com
MIT License
2.69k stars 221 forks source link

Add py.typed to mark the library as typed #129

Closed davep closed 3 weeks ago

davep commented 2 months ago

Removes an error like this:

error: Skipping analyzing "ollama":
module is installed, but missing library stubs or py.typed marker  [import-untyped]

when running mypy over code that uses the library.

bpshaver commented 2 months ago

@jmorganca Any updates on this? It is quite hard to tell who the maintainer of this project is.

bpshaver commented 2 months ago

I don't use poetry but I would be very surprised if it doesn't automatically include py.typed in the distribution package.

davep commented 2 months ago

@bpshaver You may be right, but I remember us needing to do this to convince Poetry to include it when building Textual; perhaps that's changed in the last year or so?

davep commented 2 months ago

Just did a test build without the include and it does look like it does include it anyway.

mxyng commented 3 weeks ago

@davep I'm happy to merge this if you can remove the pyproject.toml change since poetry includes it

davep commented 3 weeks ago

If I can? Did a word get missed? Sorry, don't quite understand what's being asked.

mxyng commented 3 weeks ago

I missed a word "remove"

davep commented 3 weeks ago

Ahh! Got you! Sure, I'll sort that when I'm next at a keyboard (hopefully within the next hour).

davep commented 3 weeks ago

@mxyng Done!