This commit is contained in:
2025-11-02 01:04:31 +03:00
parent 64c984a704
commit 9c58c10152
70 changed files with 341 additions and 391 deletions
+4 -7
View File
@@ -3,20 +3,17 @@ from argenta.command.flag import InputFlag, InputFlags, ValidationStatus
router = Router(title="Add Flag Example")
@router.command(Command("test", description="Test command"))
def test_handler(response: Response):
# Создаём новую коллекцию InputFlags
new_flags = InputFlags()
# Добавляем один флаг
test_flag = InputFlag(
name="test",
prefix="--",
input_value="value",
status=ValidationStatus.VALID
name="test", prefix="--", input_value="value", status=ValidationStatus.VALID
)
new_flags.add_flag(test_flag)
print(f"Flags count: {len(new_flags.flags)}")
print(f"First flag: {new_flags.flags[0].name}")