This commit is contained in:
2026-01-24 00:04:28 +03:00
parent 2ad86dbedd
commit 1c54f11f31
9 changed files with 136 additions and 29 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ __all__ = ["PossibleValues", "ValidationStatus", "Flag", "InputFlag", "InputFlag
from enum import Enum
from re import Pattern
from typing import Literal, override, TypeVar, Generic, Iterator, Any
from typing import Literal, override, TypeVar, Generic, Iterator, Any, Container
PREFIX_TYPE = Literal["-", "--", "---"]
@@ -24,7 +24,7 @@ class Flag:
name: str,
*,
prefix: PREFIX_TYPE = "--",
possible_values: list[str] | Pattern[str] | PossibleValues = PossibleValues.ALL,
possible_values: Container[str] | Pattern[str] | PossibleValues = PossibleValues.ALL,
) -> None:
"""
Public. The entity of the flag being registered for subsequent processing