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

v8: makeRests(inPlace=True) returns None for scores #1288

Merged
merged 1 commit into from
May 5, 2022
Merged
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
7 changes: 6 additions & 1 deletion music21/stream/makeNotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,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 @@ -846,7 +848,10 @@ def makeRests(
refStreamOrTimeRange=refStreamOrTimeRange,
timeRangeFromBarDuration=timeRangeFromBarDuration,
)
return returnObj
if inPlace:
return
else:
return returnObj

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