Skip to content

Commit

Permalink
lint lint lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mscuthbert committed Jun 14, 2024
1 parent 2b60acf commit c6584a9
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions music21/figuredBass/resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ def augmentedSixthToDominant(
else:
raise ResolutionException(f'Unknown augSixthType: {augSixthType!r}')

if any(x is None for x in [bass, root, fifth, other]):
raise ResolutionException(f'Chord must have bass, root, fifth, and sixth or seventh')
if t.TYPE_CHECKING:
assert isinstance(bass, pitch.Pitch)
assert isinstance(root, pitch.Pitch)
assert isinstance(fifth, pitch.Pitch)
assert isinstance(other, pitch.Pitch)

howToResolve = [(lambda p: p.name == bass.name, '-m2'),
(lambda p: p.name == root.name, 'm2'),
Expand Down Expand Up @@ -190,8 +193,11 @@ def augmentedSixthToMajorTonic(
else:
raise ResolutionException(f'Unknown augSixthType: {augSixthType!r}')

if any(x is None for x in [bass, root, fifth, other]):
raise ResolutionException(f'Chord must have bass, root, fifth, and sixth or seventh')
if t.TYPE_CHECKING:
assert isinstance(bass, pitch.Pitch)
assert isinstance(root, pitch.Pitch)
assert isinstance(fifth, pitch.Pitch)
assert isinstance(other, pitch.Pitch)

howToResolve = [(lambda p: p.name == bass.name, '-m2'),
(lambda p: p.name == root.name, 'm2'),
Expand Down Expand Up @@ -272,8 +278,11 @@ def augmentedSixthToMinorTonic(
else:
raise ResolutionException(f'Unknown augSixthType: {augSixthType!r}')

if any(x is None for x in [bass, root, fifth, other]):
raise ResolutionException(f'Chord must have bass, root, fifth, and sixth or seventh')
if t.TYPE_CHECKING:
assert isinstance(bass, pitch.Pitch)
assert isinstance(root, pitch.Pitch)
assert isinstance(fifth, pitch.Pitch)
assert isinstance(other, pitch.Pitch)

howToResolve = [(lambda p: p.name == bass.name, '-m2'),
(lambda p: p.name == root.name, 'm2'),
Expand Down

0 comments on commit c6584a9

Please sign in to comment.