mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
add and run isort
This commit is contained in:
parent
3fd109b6cd
commit
f8d0467db8
37 changed files with 183 additions and 162 deletions
|
@ -4,22 +4,22 @@
|
||||||
import datetime
|
import datetime
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
|
||||||
import platform
|
import platform
|
||||||
import plistlib
|
import plistlib
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
from pathlib import Path
|
||||||
from xml.parsers.expat import ExpatError
|
from xml.parsers.expat import ExpatError
|
||||||
|
|
||||||
import pytz
|
import pytz
|
||||||
import tzlocal
|
import tzlocal
|
||||||
|
|
||||||
from . import Entry
|
from jrnl import Entry
|
||||||
from . import Journal
|
from jrnl import Journal
|
||||||
from . import __title__
|
from jrnl import __title__
|
||||||
from . import __version__
|
from jrnl import __version__
|
||||||
|
|
||||||
|
|
||||||
class DayOne(Journal.Journal):
|
class DayOne(Journal.Journal):
|
||||||
|
|
|
@ -18,15 +18,14 @@ from cryptography.hazmat.primitives.ciphers import algorithms
|
||||||
from cryptography.hazmat.primitives.ciphers import modes
|
from cryptography.hazmat.primitives.ciphers import modes
|
||||||
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
|
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
|
||||||
|
|
||||||
from .Journal import Journal
|
|
||||||
from .Journal import LegacyJournal
|
|
||||||
from .prompt import create_password
|
|
||||||
|
|
||||||
from jrnl.exception import JrnlException
|
from jrnl.exception import JrnlException
|
||||||
|
from jrnl.Journal import Journal
|
||||||
|
from jrnl.Journal import LegacyJournal
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
from jrnl.output import print_msg
|
from jrnl.output import print_msg
|
||||||
|
from jrnl.prompt import create_password
|
||||||
|
|
||||||
|
|
||||||
def make_key(password):
|
def make_key(password):
|
||||||
|
|
|
@ -6,8 +6,8 @@ import re
|
||||||
|
|
||||||
import ansiwrap
|
import ansiwrap
|
||||||
|
|
||||||
from .color import colorize
|
from jrnl.color import colorize
|
||||||
from .color import highlight_tags_with_background_color
|
from jrnl.color import highlight_tags_with_background_color
|
||||||
|
|
||||||
|
|
||||||
class Entry:
|
class Entry:
|
||||||
|
|
|
@ -5,8 +5,8 @@ import codecs
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from . import Journal
|
from jrnl import Journal
|
||||||
from . import time
|
from jrnl import time
|
||||||
|
|
||||||
|
|
||||||
def get_files(journal_config):
|
def get_files(journal_config):
|
||||||
|
|
|
@ -6,15 +6,14 @@ import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from . import Entry
|
from jrnl import Entry
|
||||||
from . import time
|
from jrnl import time
|
||||||
from .prompt import yesno
|
|
||||||
from .path import expand_path
|
|
||||||
|
|
||||||
from jrnl.output import print_msg
|
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
|
from jrnl.output import print_msg
|
||||||
|
from jrnl.path import expand_path
|
||||||
|
from jrnl.prompt import yesno
|
||||||
|
|
||||||
|
|
||||||
class Tag:
|
class Tag:
|
||||||
|
|
20
jrnl/args.py
20
jrnl/args.py
|
@ -5,16 +5,16 @@ import argparse
|
||||||
import re
|
import re
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from .commands import postconfig_decrypt
|
from jrnl.commands import postconfig_decrypt
|
||||||
from .commands import postconfig_encrypt
|
from jrnl.commands import postconfig_encrypt
|
||||||
from .commands import postconfig_import
|
from jrnl.commands import postconfig_import
|
||||||
from .commands import postconfig_list
|
from jrnl.commands import postconfig_list
|
||||||
from .commands import preconfig_diagnostic
|
from jrnl.commands import preconfig_diagnostic
|
||||||
from .commands import preconfig_version
|
from jrnl.commands import preconfig_version
|
||||||
from .output import deprecated_cmd
|
from jrnl.output import deprecated_cmd
|
||||||
from .plugins import EXPORT_FORMATS
|
from jrnl.plugins import EXPORT_FORMATS
|
||||||
from .plugins import IMPORT_FORMATS
|
from jrnl.plugins import IMPORT_FORMATS
|
||||||
from .plugins import util
|
from jrnl.plugins import util
|
||||||
|
|
||||||
|
|
||||||
class WrappingFormatter(argparse.RawTextHelpFormatter):
|
class WrappingFormatter(argparse.RawTextHelpFormatter):
|
||||||
|
|
|
@ -5,14 +5,13 @@ import logging
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from .jrnl import run
|
from jrnl.args import parse_args
|
||||||
from .args import parse_args
|
|
||||||
from jrnl.output import print_msg
|
|
||||||
|
|
||||||
from jrnl.exception import JrnlException
|
from jrnl.exception import JrnlException
|
||||||
|
from jrnl.jrnl import run
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
|
from jrnl.output import print_msg
|
||||||
|
|
||||||
|
|
||||||
def configure_logger(debug=False):
|
def configure_logger(debug=False):
|
||||||
|
|
|
@ -7,7 +7,7 @@ from string import whitespace
|
||||||
|
|
||||||
import colorama
|
import colorama
|
||||||
|
|
||||||
from .os_compat import on_windows
|
from jrnl.os_compat import on_windows
|
||||||
|
|
||||||
if on_windows():
|
if on_windows():
|
||||||
colorama.init()
|
colorama.init()
|
||||||
|
|
|
@ -17,11 +17,11 @@ avoid any possible overhead for these standalone commands.
|
||||||
import platform
|
import platform
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from jrnl.output import print_msg
|
|
||||||
from jrnl.exception import JrnlException
|
from jrnl.exception import JrnlException
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
|
from jrnl.output import print_msg
|
||||||
from jrnl.prompt import create_password
|
from jrnl.prompt import create_password
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,10 +70,10 @@ def postconfig_encrypt(args, config, original_config, **kwargs):
|
||||||
"""
|
"""
|
||||||
Encrypt a journal in place, or optionally to a new file
|
Encrypt a journal in place, or optionally to a new file
|
||||||
"""
|
"""
|
||||||
from .EncryptedJournal import EncryptedJournal
|
|
||||||
from .Journal import open_journal
|
|
||||||
from .config import update_config
|
from .config import update_config
|
||||||
|
from .EncryptedJournal import EncryptedJournal
|
||||||
from .install import save_config
|
from .install import save_config
|
||||||
|
from .Journal import open_journal
|
||||||
|
|
||||||
# Open the journal
|
# Open the journal
|
||||||
journal = open_journal(args.journal_name, config)
|
journal = open_journal(args.journal_name, config)
|
||||||
|
@ -118,10 +118,10 @@ def postconfig_encrypt(args, config, original_config, **kwargs):
|
||||||
|
|
||||||
def postconfig_decrypt(args, config, original_config, **kwargs):
|
def postconfig_decrypt(args, config, original_config, **kwargs):
|
||||||
"""Decrypts into new file. If filename is not set, we encrypt the journal file itself."""
|
"""Decrypts into new file. If filename is not set, we encrypt the journal file itself."""
|
||||||
from .Journal import PlainJournal
|
|
||||||
from .Journal import open_journal
|
|
||||||
from .config import update_config
|
from .config import update_config
|
||||||
from .install import save_config
|
from .install import save_config
|
||||||
|
from .Journal import PlainJournal
|
||||||
|
from .Journal import open_journal
|
||||||
|
|
||||||
journal = open_journal(args.journal_name, config)
|
journal = open_journal(args.journal_name, config)
|
||||||
journal.config["encrypt"] = False
|
journal.config["encrypt"] = False
|
||||||
|
|
|
@ -5,18 +5,17 @@ import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import colorama
|
import colorama
|
||||||
from ruamel.yaml import YAML
|
|
||||||
import xdg.BaseDirectory
|
import xdg.BaseDirectory
|
||||||
|
from ruamel.yaml import YAML
|
||||||
|
|
||||||
from . import __version__
|
from jrnl import __version__
|
||||||
from jrnl.output import list_journals
|
|
||||||
from jrnl.output import print_msg
|
|
||||||
from jrnl.exception import JrnlException
|
from jrnl.exception import JrnlException
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
from .path import home_dir
|
from jrnl.output import list_journals
|
||||||
|
from jrnl.output import print_msg
|
||||||
|
from jrnl.path import home_dir
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
DEFAULT_CONFIG_NAME = "jrnl.yaml"
|
DEFAULT_CONFIG_NAME = "jrnl.yaml"
|
||||||
|
|
|
@ -8,15 +8,14 @@ import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from jrnl.exception import JrnlException
|
||||||
|
from jrnl.messages import Message
|
||||||
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
from jrnl.os_compat import on_windows
|
from jrnl.os_compat import on_windows
|
||||||
from jrnl.os_compat import split_args
|
from jrnl.os_compat import split_args
|
||||||
from jrnl.output import print_msg
|
from jrnl.output import print_msg
|
||||||
|
|
||||||
from jrnl.exception import JrnlException
|
|
||||||
from jrnl.messages import Message
|
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
|
||||||
|
|
||||||
|
|
||||||
def get_text_from_editor(config, template=""):
|
def get_text_from_editor(config, template=""):
|
||||||
suffix = ".jrnl"
|
suffix = ".jrnl"
|
||||||
|
|
|
@ -6,24 +6,23 @@ import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from .path import home_dir
|
from jrnl.config import DEFAULT_JOURNAL_KEY
|
||||||
from .path import absolute_path
|
from jrnl.config import get_config_path
|
||||||
from .path import expand_path
|
from jrnl.config import get_default_config
|
||||||
from .config import DEFAULT_JOURNAL_KEY
|
from jrnl.config import get_default_journal_path
|
||||||
from .config import get_config_path
|
from jrnl.config import load_config
|
||||||
from .config import get_default_config
|
from jrnl.config import save_config
|
||||||
from .config import get_default_journal_path
|
from jrnl.config import verify_config_colors
|
||||||
from .config import load_config
|
|
||||||
from .config import save_config
|
|
||||||
from .config import verify_config_colors
|
|
||||||
from .prompt import yesno
|
|
||||||
from .upgrade import is_old_version
|
|
||||||
|
|
||||||
from jrnl.output import print_msg
|
|
||||||
from jrnl.exception import JrnlException
|
from jrnl.exception import JrnlException
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
|
from jrnl.output import print_msg
|
||||||
|
from jrnl.path import absolute_path
|
||||||
|
from jrnl.path import expand_path
|
||||||
|
from jrnl.path import home_dir
|
||||||
|
from jrnl.prompt import yesno
|
||||||
|
from jrnl.upgrade import is_old_version
|
||||||
|
|
||||||
|
|
||||||
def upgrade_config(config_data, alt_config_path=None):
|
def upgrade_config(config_data, alt_config_path=None):
|
||||||
|
|
31
jrnl/jrnl.py
31
jrnl/jrnl.py
|
@ -4,24 +4,23 @@
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from . import install
|
from jrnl import install
|
||||||
from . import plugins
|
from jrnl import plugins
|
||||||
from .Journal import open_journal
|
from jrnl import time
|
||||||
from .config import get_journal_name
|
from jrnl.config import get_config_path
|
||||||
from .config import scope_config
|
from jrnl.config import get_journal_name
|
||||||
from .config import get_config_path
|
from jrnl.config import scope_config
|
||||||
from .editor import get_text_from_editor
|
from jrnl.editor import get_text_from_editor
|
||||||
from .editor import get_text_from_stdin
|
from jrnl.editor import get_text_from_stdin
|
||||||
from . import time
|
from jrnl.exception import JrnlException
|
||||||
from .override import apply_overrides
|
from jrnl.Journal import open_journal
|
||||||
|
from jrnl.messages import Message
|
||||||
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
from jrnl.output import print_msg
|
from jrnl.output import print_msg
|
||||||
from jrnl.output import print_msgs
|
from jrnl.output import print_msgs
|
||||||
from .path import expand_path
|
from jrnl.override import apply_overrides
|
||||||
|
from jrnl.path import expand_path
|
||||||
from jrnl.exception import JrnlException
|
|
||||||
from jrnl.messages import Message
|
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
|
||||||
|
|
||||||
|
|
||||||
def run(args):
|
def run(args):
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
from typing import NamedTuple
|
|
||||||
from typing import Mapping
|
from typing import Mapping
|
||||||
|
from typing import NamedTuple
|
||||||
|
|
||||||
from .MsgText import MsgText
|
|
||||||
from .MsgStyle import MsgStyle
|
from .MsgStyle import MsgStyle
|
||||||
|
from .MsgText import MsgText
|
||||||
|
|
||||||
|
|
||||||
class Message(NamedTuple):
|
class Message(NamedTuple):
|
||||||
|
|
|
@ -2,10 +2,11 @@
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import NamedTuple
|
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
from rich.panel import Panel
|
from typing import NamedTuple
|
||||||
|
|
||||||
from rich import box
|
from rich import box
|
||||||
|
from rich.panel import Panel
|
||||||
|
|
||||||
from .MsgText import MsgText
|
from .MsgText import MsgText
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
from rich.text import Text
|
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
|
from rich.text import Text
|
||||||
|
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
from .config import update_config, make_yaml_valid_dict
|
|
||||||
from argparse import Namespace
|
from argparse import Namespace
|
||||||
|
|
||||||
|
from jrnl.config import make_yaml_valid_dict
|
||||||
|
from jrnl.config import update_config
|
||||||
|
|
||||||
|
|
||||||
# import logging
|
# import logging
|
||||||
def apply_overrides(args: Namespace, base_config: dict) -> dict:
|
def apply_overrides(args: Namespace, base_config: dict) -> dict:
|
||||||
"""Unpack CLI provided overrides into the configuration tree.
|
"""Unpack CLI provided overrides into the configuration tree.
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
from .dates_exporter import DatesExporter
|
||||||
from .fancy_exporter import FancyExporter
|
from .fancy_exporter import FancyExporter
|
||||||
from .jrnl_importer import JRNLImporter
|
from .jrnl_importer import JRNLImporter
|
||||||
from .json_exporter import JSONExporter
|
from .json_exporter import JSONExporter
|
||||||
from .markdown_exporter import MarkdownExporter
|
from .markdown_exporter import MarkdownExporter
|
||||||
from .tag_exporter import TagExporter
|
from .tag_exporter import TagExporter
|
||||||
from .dates_exporter import DatesExporter
|
|
||||||
from .text_exporter import TextExporter
|
from .text_exporter import TextExporter
|
||||||
from .xml_exporter import XMLExporter
|
from .xml_exporter import XMLExporter
|
||||||
from .yaml_exporter import YAMLExporter
|
from .yaml_exporter import YAMLExporter
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
from textwrap import TextWrapper
|
||||||
|
|
||||||
from jrnl.exception import JrnlException
|
from jrnl.exception import JrnlException
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
from textwrap import TextWrapper
|
from jrnl.messages import MsgText
|
||||||
|
|
||||||
from .text_exporter import TextExporter
|
from .text_exporter import TextExporter
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ import sys
|
||||||
|
|
||||||
from jrnl.exception import JrnlException
|
from jrnl.exception import JrnlException
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
from jrnl.output import print_msg
|
from jrnl.output import print_msg
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from .text_exporter import TextExporter
|
|
||||||
|
|
||||||
from jrnl.output import print_msg
|
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
|
from jrnl.output import print_msg
|
||||||
|
|
||||||
|
from .text_exporter import TextExporter
|
||||||
|
|
||||||
|
|
||||||
class MarkdownExporter(TextExporter):
|
class MarkdownExporter(TextExporter):
|
||||||
|
|
|
@ -5,10 +5,10 @@ import os
|
||||||
import re
|
import re
|
||||||
import unicodedata
|
import unicodedata
|
||||||
|
|
||||||
from jrnl.output import print_msg
|
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
|
from jrnl.output import print_msg
|
||||||
|
|
||||||
|
|
||||||
class TextExporter:
|
class TextExporter:
|
||||||
|
|
|
@ -4,14 +4,14 @@
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from .text_exporter import TextExporter
|
|
||||||
|
|
||||||
from jrnl.exception import JrnlException
|
from jrnl.exception import JrnlException
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
from jrnl.output import print_msg
|
from jrnl.output import print_msg
|
||||||
|
|
||||||
|
from .text_exporter import TextExporter
|
||||||
|
|
||||||
|
|
||||||
class YAMLExporter(TextExporter):
|
class YAMLExporter(TextExporter):
|
||||||
"""This Exporter can convert entries and journals into Markdown formatted text with YAML front matter."""
|
"""This Exporter can convert entries and journals into Markdown formatted text with YAML front matter."""
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
from jrnl.output import print_msg
|
from jrnl.output import print_msg
|
||||||
from jrnl.output import print_msgs
|
from jrnl.output import print_msgs
|
||||||
|
|
||||||
|
|
|
@ -3,21 +3,20 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from . import Journal
|
from jrnl import Journal
|
||||||
from . import __version__
|
from jrnl import __version__
|
||||||
from .EncryptedJournal import EncryptedJournal
|
from jrnl.config import is_config_json
|
||||||
from .config import is_config_json
|
from jrnl.config import load_config
|
||||||
from .config import load_config
|
from jrnl.config import scope_config
|
||||||
from .config import scope_config
|
from jrnl.EncryptedJournal import EncryptedJournal
|
||||||
from .prompt import yesno
|
|
||||||
from .path import expand_path
|
|
||||||
|
|
||||||
from jrnl.output import print_msg
|
|
||||||
from jrnl.output import print_msgs
|
|
||||||
from jrnl.exception import JrnlException
|
from jrnl.exception import JrnlException
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
|
from jrnl.messages import MsgText
|
||||||
|
from jrnl.output import print_msg
|
||||||
|
from jrnl.output import print_msgs
|
||||||
|
from jrnl.path import expand_path
|
||||||
|
from jrnl.prompt import yesno
|
||||||
|
|
||||||
|
|
||||||
def backup(filename, binary=False):
|
def backup(filename, binary=False):
|
||||||
|
|
37
poetry.lock
generated
37
poetry.lock
generated
|
@ -227,7 +227,7 @@ python-versions = "*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "importlib-metadata"
|
name = "importlib-metadata"
|
||||||
version = "4.11.4"
|
version = "4.12.0"
|
||||||
description = "Read metadata from Python packages"
|
description = "Read metadata from Python packages"
|
||||||
category = "main"
|
category = "main"
|
||||||
optional = false
|
optional = false
|
||||||
|
@ -239,7 +239,7 @@ zipp = ">=0.5"
|
||||||
[package.extras]
|
[package.extras]
|
||||||
docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"]
|
docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"]
|
||||||
perf = ["ipython"]
|
perf = ["ipython"]
|
||||||
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"]
|
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iniconfig"
|
name = "iniconfig"
|
||||||
|
@ -297,6 +297,20 @@ qtconsole = ["qtconsole"]
|
||||||
test = ["pytest (<7.1)", "pytest-asyncio", "testpath"]
|
test = ["pytest (<7.1)", "pytest-asyncio", "testpath"]
|
||||||
test_extra = ["pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "trio"]
|
test_extra = ["pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "trio"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "isort"
|
||||||
|
version = "5.10.1"
|
||||||
|
description = "A Python utility / library to sort Python imports."
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.6.1,<4.0"
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
pipfile_deprecated_finder = ["pipreqs", "requirementslib"]
|
||||||
|
requirements_deprecated_finder = ["pipreqs", "pip-api"]
|
||||||
|
colors = ["colorama (>=0.4.3,<0.5.0)"]
|
||||||
|
plugins = ["setuptools"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jedi"
|
name = "jedi"
|
||||||
version = "0.18.1"
|
version = "0.18.1"
|
||||||
|
@ -938,7 +952,7 @@ pytz = "*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "virtualenv"
|
name = "virtualenv"
|
||||||
version = "20.14.1"
|
version = "20.15.0"
|
||||||
description = "Virtual Python Environment builder"
|
description = "Virtual Python Environment builder"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
|
@ -1010,13 +1024,10 @@ python-versions = ">=3.7"
|
||||||
docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"]
|
docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"]
|
||||||
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"]
|
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"]
|
||||||
|
|
||||||
[extras]
|
|
||||||
testing = []
|
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "1.1"
|
lock-version = "1.1"
|
||||||
python-versions = ">=3.9.0, <3.12"
|
python-versions = ">=3.9.0, <3.12"
|
||||||
content-hash = "ceca9186ac31a0b8ec81a6cc134469842080c786971bb8642d9e67d51bd73fca"
|
content-hash = "aa6579a24cd86b73dd5a6229a29f2d50b33600c880c528f18ad5beabeed99cea"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
ansiwrap = [
|
ansiwrap = [
|
||||||
|
@ -1188,8 +1199,8 @@ glob2 = [
|
||||||
{file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"},
|
{file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"},
|
||||||
]
|
]
|
||||||
importlib-metadata = [
|
importlib-metadata = [
|
||||||
{file = "importlib_metadata-4.11.4-py3-none-any.whl", hash = "sha256:c58c8eb8a762858f49e18436ff552e83914778e50e9d2f1660535ffb364552ec"},
|
{file = "importlib_metadata-4.12.0-py3-none-any.whl", hash = "sha256:7401a975809ea1fdc658c3aa4f78cc2195a0e019c5cbc4c06122884e9ae80c23"},
|
||||||
{file = "importlib_metadata-4.11.4.tar.gz", hash = "sha256:5d26852efe48c0a32b0509ffbc583fda1a2266545a78d104a6f4aff3db17d700"},
|
{file = "importlib_metadata-4.12.0.tar.gz", hash = "sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670"},
|
||||||
]
|
]
|
||||||
iniconfig = [
|
iniconfig = [
|
||||||
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
|
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
|
||||||
|
@ -1202,6 +1213,10 @@ ipython = [
|
||||||
{file = "ipython-8.4.0-py3-none-any.whl", hash = "sha256:7ca74052a38fa25fe9bedf52da0be7d3fdd2fb027c3b778ea78dfe8c212937d1"},
|
{file = "ipython-8.4.0-py3-none-any.whl", hash = "sha256:7ca74052a38fa25fe9bedf52da0be7d3fdd2fb027c3b778ea78dfe8c212937d1"},
|
||||||
{file = "ipython-8.4.0.tar.gz", hash = "sha256:f2db3a10254241d9b447232cec8b424847f338d9d36f9a577a6192c332a46abd"},
|
{file = "ipython-8.4.0.tar.gz", hash = "sha256:f2db3a10254241d9b447232cec8b424847f338d9d36f9a577a6192c332a46abd"},
|
||||||
]
|
]
|
||||||
|
isort = [
|
||||||
|
{file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"},
|
||||||
|
{file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"},
|
||||||
|
]
|
||||||
jedi = [
|
jedi = [
|
||||||
{file = "jedi-0.18.1-py2.py3-none-any.whl", hash = "sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d"},
|
{file = "jedi-0.18.1-py2.py3-none-any.whl", hash = "sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d"},
|
||||||
{file = "jedi-0.18.1.tar.gz", hash = "sha256:74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab"},
|
{file = "jedi-0.18.1.tar.gz", hash = "sha256:74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab"},
|
||||||
|
@ -1521,8 +1536,8 @@ tzlocal = [
|
||||||
{file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"},
|
{file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"},
|
||||||
]
|
]
|
||||||
virtualenv = [
|
virtualenv = [
|
||||||
{file = "virtualenv-20.14.1-py2.py3-none-any.whl", hash = "sha256:e617f16e25b42eb4f6e74096b9c9e37713cf10bf30168fb4a739f3fa8f898a3a"},
|
{file = "virtualenv-20.15.0-py2.py3-none-any.whl", hash = "sha256:804cce4de5b8a322f099897e308eecc8f6e2951f1a8e7e2b3598dff865f01336"},
|
||||||
{file = "virtualenv-20.14.1.tar.gz", hash = "sha256:ef589a79795589aada0c1c5b319486797c03b67ac3984c48c669c0e4f50df3a5"},
|
{file = "virtualenv-20.15.0.tar.gz", hash = "sha256:4c44b1d77ca81f8368e2d7414f9b20c428ad16b343ac6d226206c5b84e2b4fcc"},
|
||||||
]
|
]
|
||||||
watchdog = [
|
watchdog = [
|
||||||
{file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"},
|
{file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"},
|
||||||
|
|
|
@ -46,6 +46,7 @@ tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGE
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
black = { version = ">=21.5b2", allow-prereleases = true }
|
black = { version = ">=21.5b2", allow-prereleases = true }
|
||||||
ipdb = "*"
|
ipdb = "*"
|
||||||
|
isort = ">=5.10"
|
||||||
mkdocs = ">=1.0,<1.3"
|
mkdocs = ">=1.0,<1.3"
|
||||||
poethepoet = "*"
|
poethepoet = "*"
|
||||||
pyproject-flake8 = "*"
|
pyproject-flake8 = "*"
|
||||||
|
@ -71,6 +72,13 @@ style-check = [
|
||||||
{cmd = "pflake8 --version"},
|
{cmd = "pflake8 --version"},
|
||||||
{cmd = "pflake8 jrnl tests"},
|
{cmd = "pflake8 jrnl tests"},
|
||||||
]
|
]
|
||||||
|
sort-run = [
|
||||||
|
{cmd = "isort ."},
|
||||||
|
]
|
||||||
|
sort-check = [
|
||||||
|
{cmd = "isort --version"},
|
||||||
|
{cmd = "isort --check ."},
|
||||||
|
]
|
||||||
# docs-check = ?
|
# docs-check = ?
|
||||||
docs-run = [
|
docs-run = [
|
||||||
{cmd = "mkdocs serve"},
|
{cmd = "mkdocs serve"},
|
||||||
|
@ -85,23 +93,25 @@ installer-check = [
|
||||||
]
|
]
|
||||||
|
|
||||||
# Groups of tasks
|
# Groups of tasks
|
||||||
|
format = [
|
||||||
|
"format-run",
|
||||||
|
"sort-run",
|
||||||
|
]
|
||||||
lint = [
|
lint = [
|
||||||
"installer-check",
|
"installer-check",
|
||||||
"style-check",
|
"style-check",
|
||||||
|
"sort-check",
|
||||||
"format-check",
|
"format-check",
|
||||||
]
|
]
|
||||||
|
|
||||||
test = [
|
test = [
|
||||||
"lint",
|
"lint",
|
||||||
"test-run",
|
"test-run",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
multi_line_output = 7
|
profile = "black"
|
||||||
force_single_line = true
|
force_single_line = true
|
||||||
line_length = 88
|
|
||||||
known_first_party = ["jrnl"]
|
known_first_party = ["jrnl"]
|
||||||
force_sort_within_sections = true
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
minversion = "6.0"
|
minversion = "6.0"
|
||||||
|
|
|
@ -4,9 +4,8 @@
|
||||||
from pytest import mark
|
from pytest import mark
|
||||||
from pytest import skip
|
from pytest import skip
|
||||||
|
|
||||||
from jrnl.os_compat import on_windows
|
|
||||||
from jrnl.os_compat import on_posix
|
from jrnl.os_compat import on_posix
|
||||||
|
from jrnl.os_compat import on_windows
|
||||||
|
|
||||||
pytest_plugins = [
|
pytest_plugins = [
|
||||||
"tests.lib.fixtures",
|
"tests.lib.fixtures",
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
from collections import defaultdict
|
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from collections import defaultdict
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
|
from pathlib import Path
|
||||||
|
from unittest.mock import Mock
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
|
import toml
|
||||||
from keyring import backend
|
from keyring import backend
|
||||||
from keyring import errors
|
from keyring import errors
|
||||||
from pytest import fixture
|
from pytest import fixture
|
||||||
from unittest.mock import patch
|
|
||||||
from unittest.mock import Mock
|
|
||||||
from .helpers import get_fixture
|
|
||||||
import toml
|
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
|
|
||||||
from jrnl.config import load_config
|
from jrnl.config import load_config
|
||||||
from jrnl.os_compat import split_args
|
from jrnl.os_compat import split_args
|
||||||
|
from tests.lib.helpers import get_fixture
|
||||||
|
|
||||||
|
|
||||||
# --- Keyring --- #
|
# --- Keyring --- #
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import shutil
|
import shutil
|
||||||
import string
|
import string
|
||||||
|
from datetime import datetime
|
||||||
from unittest.mock import MagicMock
|
from unittest.mock import MagicMock
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
from xml.etree import ElementTree
|
from xml.etree import ElementTree
|
||||||
|
@ -16,10 +16,9 @@ from pytest_bdd.parsers import parse
|
||||||
|
|
||||||
from jrnl import __version__
|
from jrnl import __version__
|
||||||
from jrnl.time import __get_pdt_calendar
|
from jrnl.time import __get_pdt_calendar
|
||||||
|
from tests.lib.fixtures import FailedKeyring
|
||||||
from .fixtures import FailedKeyring
|
from tests.lib.fixtures import TestKeyring
|
||||||
from .fixtures import TestKeyring
|
from tests.lib.helpers import get_fixture
|
||||||
from .helpers import get_fixture
|
|
||||||
|
|
||||||
|
|
||||||
@given(parse("we {editor_method} to the editor if opened\n{editor_input}"))
|
@given(parse("we {editor_method} to the editor if opened\n{editor_input}"))
|
||||||
|
|
|
@ -14,8 +14,8 @@ from jrnl.config import scope_config
|
||||||
|
|
||||||
from .helpers import assert_equal_tags_ignoring_order
|
from .helpers import assert_equal_tags_ignoring_order
|
||||||
from .helpers import does_directory_contain_files
|
from .helpers import does_directory_contain_files
|
||||||
from .helpers import parse_should_or_should_not
|
|
||||||
from .helpers import get_nested_val
|
from .helpers import get_nested_val
|
||||||
|
from .helpers import parse_should_or_should_not
|
||||||
|
|
||||||
|
|
||||||
@then("we should get no error")
|
@then("we should get no error")
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
from contextlib import ExitStack
|
|
||||||
import os
|
import os
|
||||||
|
from contextlib import ExitStack
|
||||||
|
|
||||||
from pytest_bdd import when
|
from pytest_bdd import when
|
||||||
from pytest_bdd.parsers import parse
|
from pytest_bdd.parsers import parse
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
import pytest
|
||||||
from colorama import Fore
|
from colorama import Fore
|
||||||
from colorama import Style
|
from colorama import Style
|
||||||
import pytest
|
|
||||||
|
|
||||||
from jrnl.color import colorize
|
from jrnl.color import colorize
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import pytest
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from jrnl.install import find_alt_config
|
import pytest
|
||||||
|
|
||||||
from jrnl.exception import JrnlException
|
from jrnl.exception import JrnlException
|
||||||
|
from jrnl.install import find_alt_config
|
||||||
|
|
||||||
|
|
||||||
def test_find_alt_config(request):
|
def test_find_alt_config(request):
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
import random
|
||||||
|
import string
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import random
|
|
||||||
import string
|
|
||||||
import jrnl
|
import jrnl
|
||||||
from jrnl.jrnl import _display_search_results
|
|
||||||
from jrnl.args import parse_args
|
from jrnl.args import parse_args
|
||||||
|
from jrnl.jrnl import _display_search_results
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
from argparse import Namespace
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from jrnl.override import _convert_dots_to_list
|
from jrnl.override import _convert_dots_to_list
|
||||||
|
@ -9,8 +11,6 @@ from jrnl.override import _get_key_and_value_from_pair
|
||||||
from jrnl.override import _recursively_apply
|
from jrnl.override import _recursively_apply
|
||||||
from jrnl.override import apply_overrides
|
from jrnl.override import apply_overrides
|
||||||
|
|
||||||
from argparse import Namespace
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
def minimal_config():
|
def minimal_config():
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
# Copyright (C) 2012-2022 jrnl contributors
|
# Copyright (C) 2012-2022 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import pytest
|
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
|
||||||
from os import getenv
|
from os import getenv
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from jrnl.path import home_dir
|
import pytest
|
||||||
from jrnl.path import expand_path
|
|
||||||
from jrnl.path import absolute_path
|
from jrnl.path import absolute_path
|
||||||
|
from jrnl.path import expand_path
|
||||||
|
from jrnl.path import home_dir
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
Loading…
Add table
Reference in a new issue