mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
fix misc linting
This commit is contained in:
parent
fcb8b2203e
commit
59e3477043
3 changed files with 7 additions and 9 deletions
|
@ -17,13 +17,13 @@ class _MsgColor(NamedTuple):
|
|||
|
||||
class MsgDecoration(Enum):
|
||||
NONE = {
|
||||
"callback": lambda x, **kwargs: x,
|
||||
"args": {}
|
||||
"callback": lambda x, **_: x,
|
||||
"args": {},
|
||||
}
|
||||
BRACKET = {
|
||||
# @todo this should be a more robust function
|
||||
"callback": lambda x, **kwargs: f"[ {x} ]",
|
||||
"args": {}
|
||||
"callback": lambda x, **_: f"[ {x} ]",
|
||||
"args": {},
|
||||
}
|
||||
BOX = {
|
||||
"callback": Panel,
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
import logging
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
from rich import print
|
||||
from rich.text import Text
|
||||
from rich.console import Console
|
||||
|
||||
|
@ -45,7 +43,9 @@ def print_msg(msg: Message) -> None:
|
|||
|
||||
|
||||
def print_msgs(
|
||||
msgs: list[Message], delimiter: str = "\n", style: MsgStyle = MsgStyle.NORMAL
|
||||
msgs: list[Message],
|
||||
delimiter: str = "\n",
|
||||
style: MsgStyle = MsgStyle.NORMAL,
|
||||
) -> None:
|
||||
# Same as print_msg, but for a list
|
||||
text = Text("")
|
||||
|
@ -93,4 +93,3 @@ def is_keyboard_int(msg: Message) -> bool:
|
|||
def format_msg(msg: Message) -> Text:
|
||||
text = textwrap.dedent(msg.text.value.format(**msg.params)).strip()
|
||||
return Text(text)
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
import getpass
|
||||
import sys
|
||||
|
||||
from jrnl.messages import Message
|
||||
from jrnl.messages import MsgText
|
||||
|
|
Loading…
Add table
Reference in a new issue