Skip to content

Commit

Permalink
Fix lint (and readme, thanks Greg!)
Browse files Browse the repository at this point in the history
  • Loading branch information
mscuthbert committed Sep 18, 2024
1 parent 913e9e0 commit 955224c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Maintainers will respect confidentiality with regard to reports.

## Acknowledgements ##

The early development of `music21` was been supported by
The early development of `music21` was supported by
the generosity of the Seaver Institute and the
National Endowment for the Humanities, along with MIT's Music and Theater Arts Section
and the School of Humanities, Arts, and Social Sciences.
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@
],
"source": [
"for n in alto.recurse().notes:\n",
" n.stemDirection = None\n",
" n.stemDirection = 'unspecified'\n",
"\n",
"alto.show()"
]
Expand Down
10 changes: 6 additions & 4 deletions music21/tinyNotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,17 @@ def affectTokenBeforeParse(self, tokenStr: str) -> str:

def affectTokenAfterParseBeforeModifiers(
self,
m21Obj: base.Music21Object
) -> base.Music21Object:
m21Obj: Music21Object
) -> Music21Object:
'''
called after the object has been acquired but before modifiers have been applied.
'''
return m21Obj

def affectTokenAfterParse(
self,
m21Obj: base.Music21Object
) -> base.Music21Object:
m21Obj: Music21Object
) -> Music21Object:
'''
called to modify the tokenObj after parsing
Expand All @@ -324,6 +324,8 @@ def affectTokenAfterParse(
self.end()
# this is a hack that should be done away with...
p = self.parent
if p is None:
return m21Obj

# I thought this was potentially O(n^2) but it's actually
# just O(n) on activeStates and on pop() operation.
Expand Down
2 changes: 1 addition & 1 deletion music21/tree/verticality.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def newNote(ts: spans.PitchedTimespan, n: note.Note) -> note.Note:
nNew.pitch = n.pitch

if nNew.stemDirection != 'noStem':
nNew.stemDirection = None
nNew.stemDirection = 'unspecified'
if not addTies:
return nNew

Expand Down

0 comments on commit 955224c

Please sign in to comment.