Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dict is not callable in TonedScale.scales #18

Merged
merged 2 commits into from
Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pytheory/charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def acceptable_tones(self):

@property
def acceptable_tone_names(self):
return tuple([tone.name for tone in self.acceptable_tones])
return tuple((tone.name for tone in self.acceptable_tones))

def _possible_fingerings(self, *, fretboard):
def find_fingerings(tone):
Expand Down Expand Up @@ -129,11 +129,11 @@ def gen():
if fingering_score(possible_fingering) == max_score:
yield possible_fingering

best_fingerings = tuple([g for g in gen()])
best_fingerings = tuple(g for g in gen())
if not multiple:
return self.fix_fingering(best_fingerings[0])
else:
return tuple([self.fix_fingering(f) for f in best_fingerings])
return tuple((self.fix_fingering(f) for f in best_fingerings))



Expand Down
4 changes: 2 additions & 2 deletions pytheory/chords.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def __init__(self, *, tones):
self.tones = tones

def __repr__(self):
l = tuple([tone.full_name for tone in self.tones])
l = tuple((tone.full_name for tone in self.tones))
return f"<Chord tones={l!r}>"

# @property
Expand All @@ -20,7 +20,7 @@ def __init__(self, *, tones):
self.tones = tones

def __repr__(self):
l = tuple([tone.full_name for tone in self.tones])
l = tuple((tone.full_name for tone in self.tones))
return f"<Fretboard tones={l!r}>"

def fingering(self, *positions):
Expand Down
2 changes: 1 addition & 1 deletion pytheory/scales.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def get(self, scale):

@property
def scales(self):
return tuple(self._scales().keys())
return tuple(self._scales.keys())

@property
def _scales(self):
Expand Down
2 changes: 1 addition & 1 deletion pytheory/systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def semitones(self):
@property
def tones(self):
from . import Tone
return tuple([Tone.from_tuple(tone) for tone in self.tone_names])
return tuple((Tone.from_tuple(tone) for tone in self.tone_names))


@property
Expand Down