fix: resolve all type checking errors (8 errors fixed)

Fixed 8 type checker errors across the codebase:

- vector/scanner.py: Handle None scroll results with null-safe iteration
- search/{bm25_hybrid,semantic}.py: Add None checks for result.payload
- auth/{unified_verifier,webhook_routes}.py: Assert non-None auth credentials
- client/webdav.py: Add None checks before int() conversions
- providers/openai.py: Assert embedding_model is not None
- search/algorithms.py: Explicitly type doc_types set and cast values
- observability/logging_config.py: Match parent class signature (log_data)

Also fixed test_create_tag_creates_system_tag to match WebDAV implementation
(was testing OCS API endpoint, now tests correct WebDAV endpoint with
Content-Location header).

Type checker: 0 errors (down from 8), 20 warnings (ignored)
Tests: All 192 unit tests passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2025-12-08 01:09:02 +01:00
parent 7f11c793ef
commit 3f06e2ee77
10 changed files with 49 additions and 34 deletions
+13 -3
View File
@@ -206,7 +206,11 @@ async def scan_user_documents(
limit=10000,
)
indexed_doc_ids = {point.payload["doc_id"] for point in scroll_result[0]}
indexed_doc_ids = {
point.payload["doc_id"]
for point in (scroll_result[0] or [])
if point.payload is not None
}
logger.debug(f"Found {len(indexed_doc_ids)} indexed documents in Qdrant")
@@ -376,7 +380,9 @@ async def scan_user_documents(
)
indexed_file_ids = {
point.payload["doc_id"] for point in file_scroll_result[0]
point.payload["doc_id"]
for point in (file_scroll_result[0] or [])
if point.payload is not None
}
logger.debug(f"Found {len(indexed_file_ids)} indexed files in Qdrant")
@@ -611,7 +617,11 @@ async def scan_news_items(
with_vectors=False,
limit=10000,
)
indexed_item_ids = {point.payload["doc_id"] for point in scroll_result[0]}
indexed_item_ids = {
point.payload["doc_id"]
for point in (scroll_result[0] or [])
if point.payload is not None
}
logger.debug(f"Found {len(indexed_item_ids)} indexed news items in Qdrant")
# Fetch all items (News app caps at ~200 per feed via auto-purge)