Skip to content

Commit

Permalink
feat: return chordmaps and success boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
GetPsyched committed Jan 16, 2024
1 parent 7ac2c6f commit 49d34a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion charachorder/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def populate_chordmaps(
limit: int | None = None,
manual_interrupt: Callable[[], bool] = lambda: False,
timeout: float | None = None,
) -> None:
) -> tuple[list[tuple[Chord, ChordPhrase]], bool]:
chordmaps = []
interrupted = False
start_time = time.time()
Expand All @@ -165,6 +165,7 @@ def populate_chordmaps(

if not interrupted:
self.chordmaps = chordmaps
return chordmaps, interrupted

def get_chord_phrase(self, chord: str) -> ChordPhrase | None:
phrase = self.execute("CML", "C2", chord)[0]
Expand Down

0 comments on commit 49d34a1

Please sign in to comment.