Skip to content

Merge dev into main#30

Open
christiankrider1 wants to merge 3 commits into
mainfrom
dev
Open

Merge dev into main#30
christiankrider1 wants to merge 3 commits into
mainfrom
dev

Conversation

@christiankrider1
Copy link
Copy Markdown

Summary

Created with dev-to-main-pr.py

daev1005 and others added 3 commits May 17, 2026 16:53
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants