Skip to content

Commit 809ba9d

Browse files
authored
Merge pull request #1704 from cuthbertLab/misc-apr-2024
Small spelling edits etc. (Misc-April-2024)
2 parents f7b9e7b + 53aa7ee commit 809ba9d

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

music21/pitch.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,8 @@ def _dissonanceScore(pitches, smallPythagoreanRatio=True, accidentalPenalty=True
565565
score_ratio = 0.0
566566
score_triad = 0.0
567567

568+
intervals: list[interval.Interval] = []
569+
568570
if not pitches:
569571
return 0.0
570572

@@ -1159,7 +1161,7 @@ def listNames(cls):
11591161
'one-and-a-half-flat', 'one-and-a-half-sharp', 'quadruple-flat', 'quadruple-sharp',
11601162
'sharp', 'triple-flat', 'triple-sharp']
11611163
'''
1162-
return sorted(accidentalNameToModifier.keys(), key=str.lower)
1164+
return sorted(a.lower() for a in accidentalNameToModifier)
11631165

11641166
# PUBLIC METHODS #
11651167

@@ -3209,7 +3211,7 @@ def implicitOctave(self) -> int:
32093211
else:
32103212
return self.octave
32113213

3212-
# noinspection SpellCheckingInspection
3214+
# noinspection SpellCheckingInspection,GrazieInspection
32133215
@property
32143216
def german(self) -> str:
32153217
'''
@@ -3274,7 +3276,7 @@ def german(self) -> str:
32743276
# noinspection SpellCheckingInspection
32753277
@property
32763278
def italian(self) -> str:
3277-
# noinspection SpellCheckingInspection
3279+
# noinspection SpellCheckingInspection,GrazieInspection
32783280
'''
32793281
Read-only attribute. Returns the name
32803282
of a Pitch in the Italian system
@@ -3357,7 +3359,7 @@ def _getSpanishCardinal(self) -> str:
33573359
'G': 'sol',
33583360
}
33593361

3360-
# noinspection SpellCheckingInspection
3362+
# noinspection SpellCheckingInspection,GrazieInspection
33613363
@property
33623364
def spanish(self) -> str:
33633365
'''
@@ -3731,10 +3733,6 @@ def harmonicFromFundamental(self,
37313733
# 'target', target])
37323734

37333735
if distanceLower <= distanceHigher:
3734-
# pd = 'distanceLower (%s); distanceHigher (%s); distance lower ' +
3735-
# 'is closer to target: %s'
3736-
# environLocal.printDebug(['harmonicFromFundamental():',
3737-
# pd % (candidateLower, candidateHigher, target)])
37383736
# the lower is closer, thus we need to raise gap
37393737
match = candidateLower
37403738
gap = -abs(distanceLower)
@@ -4253,6 +4251,7 @@ def simplifyEnharmonic(
42534251
return returnObj
42544252

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

5058-
# no pitches in past...
5057+
# no pitches in the past list...
50595058
if not pitchPastAll:
50605059
# if we have no past, we show the accidental if this pitch name
50615060
# is not in the alteredPitches list, or for naturals: if the

music21/tinyNotation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,7 @@ def _getDefaultTokenMap() -> list[tuple[str, type[Token]]]:
872872
}
873873

874874
class Converter:
875+
# noinspection GrazieInspection
875876
'''
876877
Main conversion object for TinyNotation.
877878
@@ -1405,7 +1406,7 @@ def postParse(self):
14051406
'''
14061407
Called after all the tokens have been run.
14071408
1408-
Currently runs `.makeMeasures` on `.stream` unless `.makeNotation` is `False`.
1409+
It currently runs `.makeMeasures()` on `.stream` unless `.makeNotation` is `False`.
14091410
'''
14101411
if self.makeNotation is not False:
14111412
self.stream.makeMeasures(inPlace=True)

0 commit comments

Comments
 (0)