From fabcd53c6fa8d5a834eddd9b183aa0dcbc561e8f Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Tue, 17 May 2022 12:58:07 -0700 Subject: [PATCH] clean up misc linting --- jrnl/EncryptedJournal.py | 1 - jrnl/Journal.py | 1 - jrnl/output.py | 2 -- jrnl/plugins/yaml_exporter.py | 1 - jrnl/prompt.py | 5 ++++- jrnl/upgrade.py | 3 +-- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/jrnl/EncryptedJournal.py b/jrnl/EncryptedJournal.py index ef30504d..69c73681 100644 --- a/jrnl/EncryptedJournal.py +++ b/jrnl/EncryptedJournal.py @@ -3,7 +3,6 @@ import getpass import hashlib import logging import os -import sys from typing import Callable from typing import Optional diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 0365bbe5..061463d3 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -6,7 +6,6 @@ import datetime import logging import os import re -import sys from . import Entry from . import time diff --git a/jrnl/output.py b/jrnl/output.py index a91dae62..37caa24c 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -1,7 +1,5 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html - -import logging import textwrap from typing import Union diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index 4db1f97a..f78c781b 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -4,7 +4,6 @@ import os import re -import sys from .text_exporter import TextExporter diff --git a/jrnl/prompt.py b/jrnl/prompt.py index c9bbb1ea..a0efd539 100644 --- a/jrnl/prompt.py +++ b/jrnl/prompt.py @@ -19,13 +19,16 @@ def create_password(journal_name: str) -> str: print_msg(Message(MsgText.PasswordCanNotBeEmpty, MsgStyle.WARNING)) continue - elif pw == print_msg(Message(MsgText.PasswordConfirmEntry, MsgStyle.PROMPT), **kwargs): + elif pw == print_msg( + Message(MsgText.PasswordConfirmEntry, MsgStyle.PROMPT), **kwargs + ): break print_msg(Message(MsgText.PasswordDidNotMatch, MsgStyle.ERROR)) if yesno(Message(MsgText.PasswordStoreInKeychain), default=True): from .EncryptedJournal import set_keychain + set_keychain(journal_name, pw) return pw diff --git a/jrnl/upgrade.py b/jrnl/upgrade.py index 2eaebee8..fc8c581e 100644 --- a/jrnl/upgrade.py +++ b/jrnl/upgrade.py @@ -2,7 +2,6 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html import os -import sys from . import Journal from . import __version__ @@ -32,7 +31,7 @@ def backup(filename, binary=False): print_msg( Message( - MsgText.BackupCreated, MsgStyle.NORMAL, {"filename": f"filename.backup"} + MsgText.BackupCreated, MsgStyle.NORMAL, {"filename": "filename.backup"} ) )