decouple core data from CLI formatting
build / build (push) Successful in 49s
pytest / pytest (push) Successful in 30s

This commit is contained in:
Matteo Rosati
2026-04-29 12:44:28 +02:00
parent 615ab14a1a
commit d1b1238897
12 changed files with 142 additions and 87 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
from __future__ import annotations
from plistlib import InvalidFileException
from typing import Annotated, Callable
import typer
from chromadb.errors import InternalError, NotFoundError
from rich import print
from chromy.errors import UnsupportedTextFileError
from chromy.handlers.count_collection import handle_count_collection
from chromy.handlers.create_collection import handle_create_collection
from chromy.handlers.delete_collection import (
@@ -124,7 +124,7 @@ def import_data(
_fail(f"Collection '{collection}' does not exist.")
except FileNotFoundError:
_fail(f"The file '{file}' was not found.")
except InvalidFileException:
except UnsupportedTextFileError:
_fail(f"The file '{file}' is not a text file.")