mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 19:48:31 +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):
|
def deprecated_cmd(old_cmd, new_cmd, callback=None, **kwargs):
|
||||||
|
|
||||||
warning_msg = f"""
|
warning_msg = f"""
|
||||||
The command {old_cmd} is deprecated and will be removed from jrnl soon.
|
The command {old_cmd} is deprecated and will be removed from jrnl soon.
|
||||||
Please use {new_cmd} instead.
|
Please use {new_cmd} instead.
|
||||||
|
@ -83,12 +82,5 @@ def is_keyboard_int(msg: Message) -> bool:
|
||||||
|
|
||||||
|
|
||||||
def format_msg(msg: Message) -> Text:
|
def format_msg(msg: Message) -> Text:
|
||||||
text = (
|
text = textwrap.dedent(msg.text.value.format(**msg.params)).strip()
|
||||||
textwrap.dedent(msg.text.value.format(**msg.params)).strip()
|
return Text(text)
|
||||||
# .splitlines(keepends=True)
|
|
||||||
)
|
|
||||||
result = Text(text)
|
|
||||||
# result = Text(text[0])
|
|
||||||
# result.stylize(msg.type.color)
|
|
||||||
# result.append("".join(text[1:]))
|
|
||||||
return result
|
|
||||||
|
|
|
@ -40,6 +40,9 @@ class JRNLImporter:
|
||||||
Message(
|
Message(
|
||||||
MsgText.ImportSummary,
|
MsgText.ImportSummary,
|
||||||
MsgType.NORMAL,
|
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