Open pmeier opened 1 month ago
Thats no good! Sorry. @tazarov can you take a look?
@pmeier, You are correct that mypy
complains about the newly added types
This also affects get()
.
That said we do validate the the values of enum (and we even treat them as str
. Strings are ok approach and we can make this still work with existing code by making Include
a union type like so - Include = List[Union[IncludeEnum, str]]
. Though I feel that in the future Enums might be a better approach.
What happened?
TL;DR Type checking
Collection.query
withinclude
set breaks withchromadb>=0.5.4
or more specifically after #2416 (cc @jeffchuber).I took the example from the README, stripped all comments and added an
include
to theCollection.query
call:This type checks fine for
chromadb<=0.5.3
, but results in errors (see below) forchromadb>=0.5.4
.Versions
Chroma 0.5.3 / 0.5.4, Python 3.9.19, mypy 1.11.0
Relevant log output
chromadb<=0.5.3
chromadb>=0.5.4