add colors!
build / build (push) Successful in 12s
pytest / pytest (push) Successful in 29s

This commit is contained in:
Matteo Rosati
2026-04-23 21:49:46 +02:00
parent 3fcc3904b4
commit a14edebafe
10 changed files with 24 additions and 12 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
from __future__ import annotations
from rich import print
from chromy.chroma_functions import delete_collection, delete_data
@@ -22,7 +23,7 @@ def _parse_where_clause(where_clause: str) -> dict[str, str]:
def handle_delete_collection(collection: str) -> int:
delete_collection(collection)
print(f"Deleted collection '{collection}'.")
print(f"[bold green]Deleted[/] collection '{collection}'.")
return 0
@@ -31,7 +32,7 @@ def handle_delete_records(collection: str, where_clause: str) -> int:
deleted = delete_data(collection, where)
condition, value = next(iter(where.items()))
print(
f"Deleted {deleted} record(s) from collection '{collection}' "
f"[bold green]Deleted[/] {deleted} record(s) from collection '{collection}' "
f"where {condition}={value}."
)
return 0