replace argparse.Namespace plumbing with typed command inputs

This commit is contained in:
Matteo Rosati
2026-04-22 16:03:51 +02:00
parent 8ebab832d5
commit 2962a2e088
15 changed files with 560 additions and 115 deletions
+4 -3
View File
@@ -1,8 +1,9 @@
from argparse import Namespace
from __future__ import annotations
from chromy.chroma_functions import count_collection
from chromy.command_inputs import CountCollectionInput
def handle_count_collection(args: Namespace) -> int:
print(count_collection(args.collection))
def handle_count_collection(command: CountCollectionInput) -> int:
print(count_collection(command.collection))
return 0