mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
Update documentation and code snippets
This commit is contained in:
@@ -43,14 +43,14 @@ class Flag:
|
||||
"""
|
||||
if self.possible_values == PossibleValues.NEITHER:
|
||||
return input_flag_value is None
|
||||
|
||||
if self.possible_values == PossibleValues.ALL:
|
||||
return input_flag_value is not None
|
||||
|
||||
if isinstance(self.possible_values, Pattern):
|
||||
return isinstance(input_flag_value, str) and bool(self.possible_values.match(input_flag_value))
|
||||
|
||||
if isinstance(self.possible_values, list):
|
||||
return input_flag_value in self.possible_values
|
||||
|
||||
return True
|
||||
return input_flag_value in self.possible_values
|
||||
|
||||
@property
|
||||
def string_entity(self) -> str:
|
||||
|
||||
@@ -39,7 +39,7 @@ class Command:
|
||||
self.registered_flags: Flags = flags if isinstance(flags, Flags) else Flags([flags])
|
||||
self.trigger: str = trigger
|
||||
self.description: str = description
|
||||
self.aliases: list[str] = []
|
||||
self.aliases: list[str] = aliases
|
||||
|
||||
def validate_input_flag(self, flag: InputFlag) -> ValidationStatus:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user