mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
fix a few linting errors
This commit is contained in:
parent
97f8a4751e
commit
b84f862253
1 changed files with 9 additions and 3 deletions
|
@ -118,7 +118,6 @@ class Journal(object):
|
|||
last_entry_pos = match.end()
|
||||
entries.append(Entry.Entry(self, date=new_date))
|
||||
|
||||
|
||||
# If no entries were found, treat all the existing text as an entry made now
|
||||
if not entries:
|
||||
entries.append(Entry.Entry(self, date=time.parse("now")))
|
||||
|
@ -218,7 +217,11 @@ class Journal(object):
|
|||
if not date:
|
||||
colon_pos = first_line.find(": ")
|
||||
if colon_pos > 0:
|
||||
date = time.parse(raw[:colon_pos], default_hour=self.config['default_hour'], default_minute=self.config['default_minute'])
|
||||
date = time.parse(
|
||||
raw[:colon_pos],
|
||||
default_hour=self.config['default_hour'],
|
||||
default_minute=self.config['default_minute']
|
||||
)
|
||||
if date: # Parsed successfully, strip that from the raw text
|
||||
starred = raw[:colon_pos].strip().endswith("*")
|
||||
raw = raw[colon_pos + 1:].strip()
|
||||
|
@ -325,7 +328,10 @@ def open_journal(name, config, legacy=False):
|
|||
from . import DayOneJournal
|
||||
return DayOneJournal.DayOne(**config).open()
|
||||
else:
|
||||
util.prompt(u"[Error: {0} is a directory, but doesn't seem to be a DayOne journal either.".format(config['journal']))
|
||||
util.prompt(
|
||||
u"[Error: {0} is a directory, but doesn't seem to be a DayOne journal either.".format(config['journal'])
|
||||
)
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
if not config['encrypt']:
|
||||
|
|
Loading…
Add table
Reference in a new issue