types cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user