mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-21 05:28:31 +02:00
flake8 fixes
This commit is contained in:
parent
ad1bfd3092
commit
b58e387771
6 changed files with 7 additions and 11 deletions
|
@ -1,15 +1,14 @@
|
|||
import ast
|
||||
from codecs import decode, encode
|
||||
from collections import defaultdict
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import shlex
|
||||
import sys
|
||||
import time
|
||||
from unittest.mock import patch
|
||||
|
||||
import keyring
|
||||
import tzlocal
|
||||
import toml
|
||||
import yaml
|
||||
|
||||
from behave import given, then, when
|
||||
|
|
|
@ -3,7 +3,6 @@ import hashlib
|
|||
import logging
|
||||
import os
|
||||
import sys
|
||||
from typing import Optional
|
||||
|
||||
from cryptography.fernet import Fernet, InvalidToken
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import getpass
|
||||
import glob
|
||||
import logging
|
||||
import os
|
||||
|
@ -10,8 +9,6 @@ import xdg.BaseDirectory
|
|||
import yaml
|
||||
|
||||
from . import __version__, upgrade, util
|
||||
from .EncryptedJournal import EncryptedJournal
|
||||
from .Journal import PlainJournal
|
||||
from .util import UserAbort, verify_config
|
||||
|
||||
if "win32" not in sys.platform:
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
import sys
|
||||
|
||||
from .. import util
|
||||
|
||||
|
||||
class JRNLImporter:
|
||||
"""This plugin imports entries from other jrnl files."""
|
||||
|
@ -16,7 +14,6 @@ class JRNLImporter:
|
|||
"""Imports from an existing file if input is specified, and
|
||||
standard input otherwise."""
|
||||
old_cnt = len(journal.entries)
|
||||
old_entries = journal.entries
|
||||
if input:
|
||||
with open(input, "r", encoding="utf-8") as f:
|
||||
other_journal_txt = f.read()
|
||||
|
|
|
@ -55,6 +55,10 @@ class MarkdownExporter(TextExporter):
|
|||
previous_line = line
|
||||
newbody = newbody + previous_line # add very last line
|
||||
|
||||
# make sure the export ends with a blank line
|
||||
if previous_line not in ["\r", "\n", "\r\n", "\n\r"]:
|
||||
newbody = newbody + os.linesep
|
||||
|
||||
if warn_on_heading_level is True:
|
||||
print(
|
||||
f"{WARNING_COLOR}WARNING{RESET_COLOR}: "
|
||||
|
|
|
@ -46,7 +46,7 @@ include_trailing_comma = true
|
|||
force_grid_wrap = 0
|
||||
use_parentheses = true
|
||||
line_length = 88
|
||||
known_first_party = "jrnl"
|
||||
known_first_party = ["jrnl", "behave"]
|
||||
force_sort_within_sections = true
|
||||
|
||||
[build-system]
|
||||
|
|
Loading…
Add table
Reference in a new issue