From 32cb41e020e6da59eefd5ce08931964cc992723c Mon Sep 17 00:00:00 2001 From: yusyus Date: Sun, 8 Feb 2026 14:47:26 +0300 Subject: [PATCH] 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 --- src/skill_seekers/cli/adaptors/streaming_adaptor.py | 4 ++-- src/skill_seekers/cli/streaming_ingest.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/skill_seekers/cli/adaptors/streaming_adaptor.py b/src/skill_seekers/cli/adaptors/streaming_adaptor.py index 09319e2..415fff0 100644 --- a/src/skill_seekers/cli/adaptors/streaming_adaptor.py +++ b/src/skill_seekers/cli/adaptors/streaming_adaptor.py @@ -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. diff --git a/src/skill_seekers/cli/streaming_ingest.py b/src/skill_seekers/cli/streaming_ingest.py index 152e4fc..9720d35 100644 --- a/src/skill_seekers/cli/streaming_ingest.py +++ b/src/skill_seekers/cli/streaming_ingest.py @@ -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.