Skip to content

Commit

Permalink
REFACTOR : Satisfy linter.
Browse files Browse the repository at this point in the history
  • Loading branch information
crdoconnor committed Dec 25, 2023
1 parent d98297e commit 08bb01c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions orji/lookup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import orgmunge
from .note import Note
from pathlib import Path


class LookupItem:
def __init__(self, item):
self.index = int(item)


class Lookup:
def __init__(self, text):
self._text = text
Expand All @@ -25,14 +27,14 @@ def __init__(self, text):
def full(self):
return True

def load(self):
def load(self, temp_dir):
org_text = Path(self.filepath).read_text()
munge_parsed = orgmunge.Org(
org_text,
from_file=False,
todos={"todo_states": {"todo": "TODO"}, "done_states": {"done": "DONE"}},
)
notes = Note(munge_parsed.root, temp_dir=temp_dir)
current_note = None
current_note = Note(munge_parsed.root, temp_dir=temp_dir)
for item in self.parsed_ref:
current_note = current_note.children[item.index]
return current_note

0 comments on commit 08bb01c

Please sign in to comment.