mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
🎨 Format Python code with Black
This commit is contained in:
parent
974f15d7d0
commit
b224dd356a
1 changed files with 15 additions and 11 deletions
|
@ -554,9 +554,11 @@ class Interface:
|
||||||
from pygments.token import Token
|
from pygments.token import Token
|
||||||
|
|
||||||
autocomplete_ = WordCompleter(autocomplete)
|
autocomplete_ = WordCompleter(autocomplete)
|
||||||
style = prompt_toolkit.styles.style_from_dict({
|
style = prompt_toolkit.styles.style_from_dict(
|
||||||
Token.Message: f'#ansi{color} bold',
|
{
|
||||||
})
|
Token.Message: f"#ansi{color} bold",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
def get_bottom_toolbar_tokens(cli):
|
def get_bottom_toolbar_tokens(cli):
|
||||||
if help:
|
if help:
|
||||||
|
@ -567,16 +569,18 @@ class Interface:
|
||||||
def get_tokens(cli):
|
def get_tokens(cli):
|
||||||
return [
|
return [
|
||||||
(Token.Message, message),
|
(Token.Message, message),
|
||||||
(Token, ': '),
|
(Token, ": "),
|
||||||
]
|
]
|
||||||
|
|
||||||
return prompt_toolkit.prompt(get_prompt_tokens=get_tokens,
|
return prompt_toolkit.prompt(
|
||||||
get_bottom_toolbar_tokens=get_bottom_toolbar_tokens,
|
get_prompt_tokens=get_tokens,
|
||||||
style=style,
|
get_bottom_toolbar_tokens=get_bottom_toolbar_tokens,
|
||||||
default=prefill,
|
style=style,
|
||||||
true_color=True,
|
default=prefill,
|
||||||
completer=autocomplete_,
|
true_color=True,
|
||||||
is_password=is_password)
|
completer=autocomplete_,
|
||||||
|
is_password=is_password,
|
||||||
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in a new issue