From af220be35fa4904a9530e15f03ff3a351fa2e0c6 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sun, 1 May 2022 03:37:49 -0700 Subject: [PATCH] code cleanup --- jrnl/output.py | 12 ++---------- jrnl/plugins/jrnl_importer.py | 5 ++++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/jrnl/output.py b/jrnl/output.py index e1e5e797..1a8e7fb1 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -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) diff --git a/jrnl/plugins/jrnl_importer.py b/jrnl/plugins/jrnl_importer.py index d820aa8e..61d0e0f1 100644 --- a/jrnl/plugins/jrnl_importer.py +++ b/jrnl/plugins/jrnl_importer.py @@ -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, + }, ) )