mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
comm
This commit is contained in:
@@ -100,7 +100,7 @@ class AutoCompleter:
|
|||||||
if buff.complete_state:
|
if buff.complete_state:
|
||||||
buff.complete_next()
|
buff.complete_next()
|
||||||
return
|
return
|
||||||
comps_gen = buff.completer.get_completions(buff.document, CompleteEvent())
|
comps_gen = iter(buff.completer.get_completions(buff.document, CompleteEvent()))
|
||||||
try:
|
try:
|
||||||
first = next(comps_gen)
|
first = next(comps_gen)
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class Flag:
|
|||||||
"""
|
"""
|
||||||
self.name: str = name
|
self.name: str = name
|
||||||
self.prefix: PREFIX_TYPE = prefix
|
self.prefix: PREFIX_TYPE = prefix
|
||||||
self.possible_values: list[str] | Pattern[str] | PossibleValues = possible_values
|
self.possible_values: Container[str] | Pattern[str] | PossibleValues = possible_values
|
||||||
|
|
||||||
def validate_input_flag_value(self, input_flag_value: str) -> bool:
|
def validate_input_flag_value(self, input_flag_value: str) -> bool:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -354,22 +354,6 @@ def test_set_exit_command_handler_stores_handler() -> None:
|
|||||||
assert app._exit_command_handler is handler
|
assert app._exit_command_handler is handler
|
||||||
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# Tests for default view setup
|
|
||||||
# ============================================================================
|
|
||||||
|
|
||||||
|
|
||||||
def test_setup_default_view_formats_prompt() -> None:
|
|
||||||
app = App(prompt='>>')
|
|
||||||
assert app._prompt == '<gray><b>>></b></gray>'
|
|
||||||
|
|
||||||
|
|
||||||
def test_setup_default_view_sets_default_unknown_command_handler() -> None:
|
|
||||||
app = App()
|
|
||||||
app._setup_default_view()
|
|
||||||
assert app._unknown_command_handler(InputCommand('nonexists')) is None
|
|
||||||
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# Tests for command processing
|
# Tests for command processing
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user