Update documentation and code snippets

This commit is contained in:
2025-12-02 10:51:44 +03:00
parent 2a96dfcabe
commit 19906c1b1b
28 changed files with 85 additions and 531 deletions
+2 -8
View File
@@ -1,17 +1,11 @@
import re
from argenta.command import Command, Flag, Flags
from argenta import Command
from argenta.command import Flag, Flags
# Создание коллекции с флагами
flags = Flags(
[
Flag(
"host", possible_values=re.compile(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$")
),
Flag("host", possible_values=re.compile(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$")),
Flag("port", possible_values=re.compile(r"^\d{1,5}$")),
]
)
# Использование в команде
cmd = Command("start", description="Start the server", flags=flags)