mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-24 20:09:01 +00:00
fix: bump lockfiles (#31923)
* bump lockfiles after upgrading ruff * resolve resulting linting fixes
This commit is contained in:
@@ -288,7 +288,7 @@ class Chroma(VectorStore):
|
||||
collection_metadata: Optional[dict] = None,
|
||||
client: Optional[chromadb.ClientAPI] = None,
|
||||
relevance_score_fn: Optional[Callable[[float], float]] = None,
|
||||
create_collection_if_not_exists: Optional[bool] = True, # noqa: FBT002
|
||||
create_collection_if_not_exists: Optional[bool] = True, # noqa: FBT001, FBT002
|
||||
) -> None:
|
||||
"""Initialize with a Chroma client.
|
||||
|
||||
@@ -1186,16 +1186,16 @@ class Chroma(VectorStore):
|
||||
else:
|
||||
ids = [id_ if id_ is not None else str(uuid.uuid4()) for id_ in ids]
|
||||
if hasattr(
|
||||
chroma_collection._client, # noqa: SLF001
|
||||
chroma_collection._client,
|
||||
"get_max_batch_size",
|
||||
) or hasattr( # for Chroma 0.5.1 and above
|
||||
chroma_collection._client, # noqa: SLF001
|
||||
chroma_collection._client,
|
||||
"max_batch_size",
|
||||
): # for Chroma 0.4.10 and above
|
||||
from chromadb.utils.batch_utils import create_batches
|
||||
|
||||
for batch in create_batches(
|
||||
api=chroma_collection._client, # noqa: SLF001
|
||||
api=chroma_collection._client,
|
||||
ids=ids,
|
||||
metadatas=metadatas, # type: ignore[arg-type]
|
||||
documents=texts,
|
||||
|
@@ -108,6 +108,8 @@ ignore = [
|
||||
"D105", # Missing docstring in magic method
|
||||
"D107", # Missing docstring in __init__
|
||||
"UP007", # pyupgrade: non-pep604-annotation-union
|
||||
"UP045", # pyupgrade: non-pep604-annotation-optional
|
||||
"COM812", # Messes with the formatter
|
||||
]
|
||||
unfixable = ["B028"] # People should intentionally tune the stacklevel
|
||||
|
||||
|
3491
libs/partners/chroma/uv.lock
generated
3491
libs/partners/chroma/uv.lock
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user