types cleanup

This commit is contained in:
2026-04-24 18:20:22 +02:00
parent 55bbd897f4
commit 948f8500be
2 changed files with 11 additions and 12 deletions
+4 -3
View File
@@ -1,8 +1,10 @@
from __future__ import annotations
import os
from pathlib import Path
from rich import print
from chromy.utilities import ingest_file
@@ -21,11 +23,10 @@ def _get_absolute_path(file: str) -> str:
raise FileNotFoundError()
file_path = Path(file)
return str(file_path.resolve(file_path))
return str(file_path.resolve())
def handle_import(collection: str, file: str) -> int:
records_added = ingest_file(collection, _get_absolute_path(file))
print(
f"[bold green]Added[/] {records_added} records to collection '{collection}'.")
print(f"[bold green]Added[/] {records_added} records to collection '{collection}'.")
return 0