chore: add ANN type annotations to faiss, fastembed, firecrawl, github, google_ai#2988
Merged
julian-risch merged 1 commit intomainfrom Mar 19, 2026
Conversation
…, google_ai Enable ruff ANN ruleset (excluding ANN401) for five integrations and fix all resulting violations by adding missing return type annotations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
davidsbatista
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes
Enable ruff's ANN ruleset (flake8-annotations) for five integrations and fix all resulting violations. Changes are consistent across all integrations:
faiss: Enable ANN in ruff config; add-> Noneto__init__inFAISSDocumentStoreandFAISSEmbeddingRetriever; add-> Noneto_create_new_indexfastembed: Enable ANN in ruff config; add-> Noneto__init__in_FastembedEmbeddingBackend,_FastembedSparseEmbeddingBackend, andFastembedRanker; add-> Nonetowarm_upinFastembedRankerfirecrawl: Enable ANN in ruff config only (all annotations were already present)github: Enable ANN in ruff config; add-> Noneto__init__in all 6 connector classes and 6 tool classesgoogle_ai: Enable ANN in ruff config; add-> Noneto__init__in both generators; add-> "GoogleAIGeminiGenerator"to__new__with proper*_: Anyand**kwargs: Anyannotations; add-> dict[str, list[str]]/-> dict[str, list[ChatMessage]]torunandrun_asyncmethodsFor all integrations:
"ANN"to ruffselect"ANN401"to ruffignore(allowAnyat SDK/dynamic boundaries)"ANN"totests/**/*per-file-ignores (tests don't need type annotations)How did you test it
hatch run fmt-checkfor all 5 integrations — all passhatch run test:typesfor all 5 integrations — all pass (google_ai pre-existing errors are unchanged)ruff check --select ANN --ignore ANN401reports zero violations across all 5 integrationsNotes for reviewer
google_aihas pre-existing mypy errors unrelated to this PR. It's archived anyway.Checklist
hatch run test:typesand all checks passhatch run fmt-checkand all checks pass🤖 Generated with Claude Code