Skip to content

Commit

Permalink
Merge pull request #18 from ramonsaraiva/few-fixes
Browse files Browse the repository at this point in the history
Fix dict is not callable in TonedScale.scales
  • Loading branch information
kennethreitz committed Sep 25, 2018
2 parents 629ce15 + 26f290b commit 66bc6bb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
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

0 comments on commit 66bc6bb

Please sign in to comment.