Skip to content

Commit

Permalink
Merge pull request #1288 from cuthbertLab/v8-makeRests-return
Browse files Browse the repository at this point in the history
v8: makeRests(inPlace=True) returns None for scores
  • Loading branch information
mscuthbert authored May 5, 2022
2 parents 4c5cd6c + c081f61 commit c838856
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion music21/stream/makeNotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,8 @@ def makeRests(
- `inPlace` defaults False
- Recurses into parts, measures, voices
- Gave priority to `timeRangeFromBarDuration` over `refStreamOrTimeRange`
Changed in v8: scores (or other streams having parts) edited `inPlace` return `None`.
'''
from music21 import stream

Expand All @@ -847,7 +849,10 @@ def makeRests(
refStreamOrTimeRange=refStreamOrTimeRange,
timeRangeFromBarDuration=timeRangeFromBarDuration,
)
return returnObj
if inPlace:
return
else:
return returnObj

def oHighTargetForMeasure(
m: Optional[stream.Measure] = None,
Expand Down

0 comments on commit c838856

Please sign in to comment.