mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 19:48:31 +02:00
format with black
This commit is contained in:
parent
09c04aa5de
commit
5726bc6197
3 changed files with 9 additions and 12 deletions
|
@ -68,7 +68,7 @@ class Entry:
|
|||
|
||||
@staticmethod
|
||||
def tag_regex(tagsymbols):
|
||||
pattern = fr"(?<!\S)([{tagsymbols}][-+*#/\w]+)"
|
||||
pattern = rf"(?<!\S)([{tagsymbols}][-+*#/\w]+)"
|
||||
return re.compile(pattern)
|
||||
|
||||
def _parse_tags(self):
|
||||
|
|
|
@ -36,7 +36,7 @@ class YAMLExporter(TextExporter):
|
|||
|
||||
tagsymbols = entry.journal.config["tagsymbols"]
|
||||
# see also Entry.Entry.rag_regex
|
||||
multi_tag_regex = re.compile(fr"(?u)^\s*([{tagsymbols}][-+*#/\w]+\s*)+$")
|
||||
multi_tag_regex = re.compile(rf"(?u)^\s*([{tagsymbols}][-+*#/\w]+\s*)+$")
|
||||
|
||||
"""Increase heading levels in body text"""
|
||||
newbody = ""
|
||||
|
|
|
@ -10,13 +10,10 @@ def test_default_hour_is_added():
|
|||
|
||||
|
||||
def test_default_minute_is_added():
|
||||
assert (
|
||||
time.parse(
|
||||
"2020-06-20",
|
||||
inclusive=False,
|
||||
default_hour=0,
|
||||
default_minute=30,
|
||||
bracketed=False,
|
||||
)
|
||||
== datetime.datetime(2020, 6, 20, 0, 30)
|
||||
)
|
||||
assert time.parse(
|
||||
"2020-06-20",
|
||||
inclusive=False,
|
||||
default_hour=0,
|
||||
default_minute=30,
|
||||
bracketed=False,
|
||||
) == datetime.datetime(2020, 6, 20, 0, 30)
|
||||
|
|
Loading…
Add table
Reference in a new issue