Skip to content

chore: enable ANN ruff ruleset for chroma integration#2982

Merged
julian-risch merged 2 commits intomainfrom
feat/chroma-type-annotations
Mar 18, 2026
Merged

chore: enable ANN ruff ruleset for chroma integration#2982
julian-risch merged 2 commits intomainfrom
feat/chroma-type-annotations

Conversation

@julian-risch
Copy link
Copy Markdown
Member

@julian-risch julian-risch commented Mar 18, 2026

Related Issues

None

Proposed Changes:

  • Add ANN (flake8-annotations) to ruff select in pyproject.toml
  • Add ANN401 to ruff ignore (allow Any for **kwargs and dynamic metadata values)
  • Exclude tests/**/* from ANN checks via per-file-ignores
  • Add -> None return type annotations to __init__, _ensure_initialized, and _ensure_initialized_async in document_store.py
  • Add -> None return type annotations to __init__ in both retriever classes
  • Modernize isinstance check to use str | int | float union syntax

How did you test it?

Ran tests locally

Notes for the reviewer

Checklist

julian-risch and others added 2 commits March 17, 2026 20:13
… methods

Add the missing `-> None` return type annotation to `__init__` in
ChromaDocumentStore, ChromaQueryTextRetriever, and ChromaEmbeddingRetriever.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added integration:chroma type:documentation Improvements or additions to documentation labels Mar 18, 2026
@julian-risch julian-risch marked this pull request as ready for review March 18, 2026 13:17
@julian-risch julian-risch requested a review from a team as a code owner March 18, 2026 13:17
@julian-risch julian-risch requested review from sjrl and removed request for a team March 18, 2026 13:17
@julian-risch julian-risch enabled auto-merge (squash) March 18, 2026 13:17
Copy link
Copy Markdown
Contributor

@sjrl sjrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@julian-risch julian-risch merged commit 047f7a0 into main Mar 18, 2026
25 checks passed
@julian-risch julian-risch deleted the feat/chroma-type-annotations branch March 18, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:chroma type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants