From 92065f6e8cbe3e91de0ee4f9a635e57b477f90f9 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 26 Feb 2022 18:42:57 -0800 Subject: [PATCH] clean up MsgText so value doesn't have to be used as much --- jrnl/editor.py | 4 ++-- jrnl/messages.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jrnl/editor.py b/jrnl/editor.py index ff304826..81ca659a 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -58,9 +58,9 @@ def get_text_from_stdin(): MsgText.WritingEntryStart, MsgType.TITLE, { - "how_to_quit": MsgText.HowToQuitWindows.value + "how_to_quit": MsgText.HowToQuitWindows if on_windows() - else MsgText.HowToQuitLinux.value + else MsgText.HowToQuitLinux }, ) ) diff --git a/jrnl/messages.py b/jrnl/messages.py index 41b76e3d..cbbf7936 100644 --- a/jrnl/messages.py +++ b/jrnl/messages.py @@ -21,6 +21,8 @@ class MsgType(Enum): class MsgText(Enum): + def __str__(self) -> str: + return self.value # --- Exceptions ---# UncaughtException = """