diff --git a/music21/figuredBass/resolution.py b/music21/figuredBass/resolution.py index fc5cdede8..c0e15ca80 100644 --- a/music21/figuredBass/resolution.py +++ b/music21/figuredBass/resolution.py @@ -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'), @@ -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'), @@ -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'),