fix: Replace builtin 'callable' with 'Callable' type hint

- Fix streaming_ingest.py line 180: callable -> Callable
- Fix streaming_adaptor.py line 39: callable -> Callable
- Add Callable import from collections.abc and typing
- Fixes TypeError in Python 3.11: unsupported operand type(s) for |
- Resolves CI coverage report collection errors
This commit is contained in:
yusyus
2026-02-08 14:47:26 +03:00
parent 8832542667
commit 32cb41e020
2 changed files with 4 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ Enables memory-efficient processing of large documentation sets.
import json
from pathlib import Path
from typing import Any
from typing import Any, Callable
import sys
# Add parent directory to path for imports
@@ -36,7 +36,7 @@ class StreamingAdaptorMixin:
chunk_size: int = 4000,
chunk_overlap: int = 200,
batch_size: int = 100,
progress_callback: callable | None = None,
progress_callback: Callable | None = None,
) -> Path:
"""
Package skill using streaming ingestion.

View File

@@ -9,7 +9,7 @@ skill documentation. Handles chunking, progress tracking, and resume functionali
import json
import hashlib
from pathlib import Path
from collections.abc import Iterator
from collections.abc import Callable, Iterator
from dataclasses import dataclass
import time
@@ -177,7 +177,7 @@ class StreamingIngester:
return hashlib.md5(id_string.encode()).hexdigest()
def stream_skill_directory(
self, skill_dir: Path, callback: callable | None = None
self, skill_dir: Path, callback: Callable | None = None
) -> Iterator[tuple[str, dict]]:
"""
Stream all documents from skill directory.