Merge dev into main#30
Open
christiankrider1 wants to merge 3 commits into
Open
Conversation
Clear all 105 mypy errors in src/ and remove `|| true` from the type-check step so it now gates merges. Notable non-annotation changes: - rag/__init__.py: drop try/except ImportError scaffolding for internal modules with no optional deps (-60 lines dead code). - registry/model_registry.py: add fallthrough raises for unknown registry_type instead of silent None returns. - rag/processors.py: replace dict-based factory that defaulted to the abstract DocumentProcessor (would crash on uncovered DocumentType values) with explicit dispatch + raise. - rag/retrievers.py: explicit dispatch in get_retriever, same reason. - streaming/event_stream.py: subscribe() callback is now Optional to match its docstring and the PKG-INFO example. - streaming/schemas.py: convert topic str -> StreamTopics enum at the lookup boundary. - pyproject.toml: ignore_missing_imports for boto3/botocore/torch/ httpx/ollama.
The earlier mypy fix replaced the dict-based processor/retriever maps with explicit if/elif dispatch to dodge an abstract-class instantiation error. Annotating the maps as `Dict[K, Callable[..., Base]]` sidesteps the same error while keeping the data-driven layout (extending the map = one line). Also reverted the `advanced_retrieval` ternary to if/else with a prefixed Optional annotation — same behavior, more readable.
fix(types): resolve mypy errors and enforce in CI
|
|
||
| from abc import ABC, abstractmethod | ||
| from typing import List, Dict, Any, Optional | ||
| from typing import Any, Callable, Dict, List, Optional |
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.
Summary
Created with dev-to-main-pr.py