mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 19:48:31 +02:00
clean up misc linting
This commit is contained in:
parent
1a6afd9f4a
commit
fabcd53c6f
6 changed files with 5 additions and 8 deletions
|
@ -3,7 +3,6 @@ import getpass
|
||||||
import hashlib
|
import hashlib
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ import datetime
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
|
|
||||||
from . import Entry
|
from . import Entry
|
||||||
from . import time
|
from . import time
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# Copyright (C) 2012-2021 jrnl contributors
|
# Copyright (C) 2012-2021 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import logging
|
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
|
|
||||||
from .text_exporter import TextExporter
|
from .text_exporter import TextExporter
|
||||||
|
|
||||||
|
|
|
@ -19,13 +19,16 @@ def create_password(journal_name: str) -> str:
|
||||||
print_msg(Message(MsgText.PasswordCanNotBeEmpty, MsgStyle.WARNING))
|
print_msg(Message(MsgText.PasswordCanNotBeEmpty, MsgStyle.WARNING))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
elif pw == print_msg(Message(MsgText.PasswordConfirmEntry, MsgStyle.PROMPT), **kwargs):
|
elif pw == print_msg(
|
||||||
|
Message(MsgText.PasswordConfirmEntry, MsgStyle.PROMPT), **kwargs
|
||||||
|
):
|
||||||
break
|
break
|
||||||
|
|
||||||
print_msg(Message(MsgText.PasswordDidNotMatch, MsgStyle.ERROR))
|
print_msg(Message(MsgText.PasswordDidNotMatch, MsgStyle.ERROR))
|
||||||
|
|
||||||
if yesno(Message(MsgText.PasswordStoreInKeychain), default=True):
|
if yesno(Message(MsgText.PasswordStoreInKeychain), default=True):
|
||||||
from .EncryptedJournal import set_keychain
|
from .EncryptedJournal import set_keychain
|
||||||
|
|
||||||
set_keychain(journal_name, pw)
|
set_keychain(journal_name, pw)
|
||||||
|
|
||||||
return pw
|
return pw
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
from . import Journal
|
from . import Journal
|
||||||
from . import __version__
|
from . import __version__
|
||||||
|
@ -32,7 +31,7 @@ def backup(filename, binary=False):
|
||||||
|
|
||||||
print_msg(
|
print_msg(
|
||||||
Message(
|
Message(
|
||||||
MsgText.BackupCreated, MsgStyle.NORMAL, {"filename": f"filename.backup"}
|
MsgText.BackupCreated, MsgStyle.NORMAL, {"filename": "filename.backup"}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue