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

Small spelling edits etc. (Misc-April-2024) #1704

Merged
merged 1 commit into from
Apr 25, 2024
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
9 changes: 9 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions music21/pitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,8 @@ def _dissonanceScore(pitches, smallPythagoreanRatio=True, accidentalPenalty=True
score_ratio = 0.0
score_triad = 0.0

intervals: list[interval.Interval] = []

if not pitches:
return 0.0

Expand Down Expand Up @@ -1159,7 +1161,7 @@ def listNames(cls):
'one-and-a-half-flat', 'one-and-a-half-sharp', 'quadruple-flat', 'quadruple-sharp',
'sharp', 'triple-flat', 'triple-sharp']
'''
return sorted(accidentalNameToModifier.keys(), key=str.lower)
return sorted(a.lower() for a in accidentalNameToModifier)

# PUBLIC METHODS #

Expand Down Expand Up @@ -3209,7 +3211,7 @@ def implicitOctave(self) -> int:
else:
return self.octave

# noinspection SpellCheckingInspection
# noinspection SpellCheckingInspection,GrazieInspection
@property
def german(self) -> str:
'''
Expand Down Expand Up @@ -3274,7 +3276,7 @@ def german(self) -> str:
# noinspection SpellCheckingInspection
@property
def italian(self) -> str:
# noinspection SpellCheckingInspection
# noinspection SpellCheckingInspection,GrazieInspection
'''
Read-only attribute. Returns the name
of a Pitch in the Italian system
Expand Down Expand Up @@ -3357,7 +3359,7 @@ def _getSpanishCardinal(self) -> str:
'G': 'sol',
}

# noinspection SpellCheckingInspection
# noinspection SpellCheckingInspection,GrazieInspection
@property
def spanish(self) -> str:
'''
Expand Down Expand Up @@ -3731,10 +3733,6 @@ def harmonicFromFundamental(self,
# 'target', target])

if distanceLower <= distanceHigher:
# pd = 'distanceLower (%s); distanceHigher (%s); distance lower ' +
# 'is closer to target: %s'
# environLocal.printDebug(['harmonicFromFundamental():',
# pd % (candidateLower, candidateHigher, target)])
# the lower is closer, thus we need to raise gap
match = candidateLower
gap = -abs(distanceLower)
Expand Down Expand Up @@ -4253,6 +4251,7 @@ def simplifyEnharmonic(
return returnObj

def getEnharmonic(self: PitchType, *, inPlace=False) -> PitchType|None:
# noinspection GrazieInspection
'''
Returns a new Pitch that is the(/an) enharmonic equivalent of this Pitch.
Can be thought of as flipEnharmonic or something like that.
Expand Down Expand Up @@ -5055,7 +5054,7 @@ def set_displayStatus(newDisplayStatus: bool):
set_displayStatus(True)
return

# no pitches in past...
# no pitches in the past list...
if not pitchPastAll:
# if we have no past, we show the accidental if this pitch name
# is not in the alteredPitches list, or for naturals: if the
Expand Down
3 changes: 2 additions & 1 deletion music21/tinyNotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,7 @@ def _getDefaultTokenMap() -> list[tuple[str, type[Token]]]:
}

class Converter:
# noinspection GrazieInspection
'''
Main conversion object for TinyNotation.

Expand Down Expand Up @@ -1405,7 +1406,7 @@ def postParse(self):
'''
Called after all the tokens have been run.

Currently runs `.makeMeasures` on `.stream` unless `.makeNotation` is `False`.
It currently runs `.makeMeasures()` on `.stream` unless `.makeNotation` is `False`.
'''
if self.makeNotation is not False:
self.stream.makeMeasures(inPlace=True)
Expand Down
Loading