code cleanup

This commit is contained in:
Jonathan Wren 2022-05-01 03:37:49 -07:00
parent 7ded211ff8
commit af220be35f
2 changed files with 6 additions and 11 deletions

View file

@ -19,7 +19,6 @@ from jrnl.messages import MsgText
def deprecated_cmd(old_cmd, new_cmd, callback=None, **kwargs):
warning_msg = f"""
The command {old_cmd} is deprecated and will be removed from jrnl soon.
Please use {new_cmd} instead.
@ -83,12 +82,5 @@ def is_keyboard_int(msg: Message) -> bool:
def format_msg(msg: Message) -> Text:
text = (
textwrap.dedent(msg.text.value.format(**msg.params)).strip()
# .splitlines(keepends=True)
)
result = Text(text)
# result = Text(text[0])
# result.stylize(msg.type.color)
# result.append("".join(text[1:]))
return result
text = textwrap.dedent(msg.text.value.format(**msg.params)).strip()
return Text(text)

View file

@ -40,6 +40,9 @@ class JRNLImporter:
Message(
MsgText.ImportSummary,
MsgType.NORMAL,
{"count": new_cnt - old_cnt, "journal_name": journal.name},
{
"count": new_cnt - old_cnt,
"journal_name": journal.name,
},
)
)