mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
code cleanup
This commit is contained in:
parent
7ded211ff8
commit
af220be35f
2 changed files with 6 additions and 11 deletions
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue