This commit is contained in:
2025-11-01 11:38:48 +03:00
parent 0598f6e7a5
commit e4a5c6d398
73 changed files with 53 additions and 50 deletions
+16
View File
@@ -0,0 +1,16 @@
from argenta.command import Flags, Flag
from argenta.command.flag.defaults import PredefinedFlags
flags = Flags([
PredefinedFlags.HOST,
PredefinedFlags.PORT,
Flag("verbose")
])
# Итерация по всем флагам
for flag in flags:
print(f"Flag: {flag.name} (type: {type(flag).__name__})")
# Использование в list comprehension
flag_names = [flag.name for flag in flags]
print(f"All flags: {flag_names}")