From bfa6e94ab18b9335d408b3884a05567cd477acd6 Mon Sep 17 00:00:00 2001 From: Michael Scott Asato Cuthbert Date: Mon, 28 Oct 2024 16:41:07 -1000 Subject: [PATCH] fix lint -- update copyright --- dist/dist.py | 2 +- documentation/source/about/about.rst | 2 +- documentation/source/conf.py | 2 +- documentation/testDocumentation.py | 2 +- music21/__init__.py | 2 +- music21/abcFormat/translate.py | 3 +- music21/alpha/__init__.py | 3 +- music21/base.py | 2 +- music21/beam.py | 5 ++-- music21/chord/__init__.py | 2 +- music21/clef.py | 2 +- music21/common/types.py | 2 +- music21/corpus/corpora.py | 3 +- music21/derivation.py | 3 +- music21/duration.py | 2 +- music21/editorial.py | 3 +- music21/environment.py | 3 +- music21/expressions.py | 2 +- music21/figuredBass/harmony.py | 2 +- music21/freezeThaw.py | 3 +- music21/graph/utilities.py | 2 +- music21/harmony.py | 5 ++-- music21/interval.py | 2 +- music21/license.txt | 4 +-- music21/lily/translate.py | 2 +- music21/metadata/__init__.py | 3 +- music21/metadata/caching.py | 3 +- music21/metadata/primitives.py | 2 +- music21/metadata/properties.py | 3 +- music21/meter/__init__.py | 2 +- music21/meter/base.py | 2 +- music21/meter/core.py | 2 +- music21/meter/tests.py | 2 +- music21/meter/tools.py | 2 +- music21/musedata/__init__.py | 41 ++++++++++++++-------------- music21/musicxml/archiveTools.py | 2 +- music21/musicxml/xmlObjects.py | 2 +- music21/musicxml/xmlToM21.py | 2 +- music21/note.py | 2 +- music21/roman.py | 2 +- music21/scale/test_scale_main.py | 2 +- music21/sorting.py | 3 +- music21/spanner.py | 3 +- music21/stream/base.py | 2 +- music21/stream/core.py | 2 +- music21/stream/iterator.py | 2 +- music21/stream/makeNotation.py | 2 +- music21/stream/streamStatus.py | 3 +- music21/stream/tests.py | 2 +- music21/style.py | 3 +- music21/test/testLint.py | 2 +- music21/test/testRunner.py | 3 +- music21/test/test_base.py | 2 +- music21/test/test_pitch.py | 2 +- music21/tinyNotation.py | 2 +- music21/tree/__init__.py | 3 +- music21/tree/analysis.py | 3 +- music21/tree/core.py | 3 +- music21/tree/fromStream.py | 3 +- music21/tree/node.py | 3 +- music21/tree/spans.py | 3 +- music21/tree/timespanTree.py | 3 +- music21/tree/toStream.py | 3 +- music21/tree/trees.py | 3 +- music21/tree/verticality.py | 3 +- music21/voiceLeading.py | 12 +++++--- 66 files changed, 98 insertions(+), 116 deletions(-) diff --git a/dist/dist.py b/dist/dist.py index f7a29a0224..77ca57b4c1 100644 --- a/dist/dist.py +++ b/dist/dist.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2010-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2010-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/documentation/source/about/about.rst b/documentation/source/about/about.rst index 29fe309bc6..1b6c1d5f38 100644 --- a/documentation/source/about/about.rst +++ b/documentation/source/about/about.rst @@ -174,7 +174,7 @@ Licensing and Copyright The `music21` Toolkit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Music21 is Copyright © 2006-2023 Michael Scott Asato Cuthbert. +Music21 is Copyright © 2006-2024 Michael Scott Asato Cuthbert. Music21 code (excluding content encoded in the corpus) is free and open-source software, licensed under the BSD License. diff --git a/documentation/source/conf.py b/documentation/source/conf.py index c3abe30485..bc23975ac5 100644 --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -48,7 +48,7 @@ project = 'music21' # pylint: disable=redefined-builtin # noinspection PyShadowingBuiltins -copyright = '2006-2023 Michael Scott Asato Cuthbert' +copyright = '2006-2024 Michael Scott Asato Cuthbert' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/documentation/testDocumentation.py b/documentation/testDocumentation.py index 4236f26c63..f32adc7275 100644 --- a/documentation/testDocumentation.py +++ b/documentation/testDocumentation.py @@ -5,7 +5,7 @@ # # Authors: Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2010-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2010-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/music21/__init__.py b/music21/__init__.py index aca185ffb1..61b0ebf3b5 100644 --- a/music21/__init__.py +++ b/music21/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ''' -The music21 Framework is Copyright © 2006-2023 Michael Scott Asato Cuthbert. +The music21 Framework is Copyright © 2006-2024 Michael Scott Asato Cuthbert. Some Rights Reserved Released under the BSD (3-clause) license. See license.txt. diff --git a/music21/abcFormat/translate.py b/music21/abcFormat/translate.py index 6b8a8d6300..091309f087 100644 --- a/music21/abcFormat/translate.py +++ b/music21/abcFormat/translate.py @@ -7,8 +7,7 @@ # Michael Scott Asato Cuthbert # Dylan Nagler # -# Copyright: Copyright © 2010-2023 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2010-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/alpha/__init__.py b/music21/alpha/__init__.py index f641dd8061..719fd1493a 100644 --- a/music21/alpha/__init__.py +++ b/music21/alpha/__init__.py @@ -5,8 +5,7 @@ # # Authors: Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2015 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/base.py b/music21/base.py index b32e1082d3..b9c3861db2 100644 --- a/music21/base.py +++ b/music21/base.py @@ -6,7 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2006-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2006-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/beam.py b/music21/beam.py index 3478efc7bf..6787f85adf 100644 --- a/music21/beam.py +++ b/music21/beam.py @@ -1,13 +1,12 @@ # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Name: beam.py -# Purpose: music21 classes for representing notes +# Purpose: music21 classes for representing beams and beam groups # # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2009-2012, 19 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2009-2012, 2019 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/chord/__init__.py b/music21/chord/__init__.py index 1888cc9768..99373fb913 100644 --- a/music21/chord/__init__.py +++ b/music21/chord/__init__.py @@ -6,7 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/music21/clef.py b/music21/clef.py index 29746e3f98..fa44f70168 100644 --- a/music21/clef.py +++ b/music21/clef.py @@ -7,7 +7,7 @@ # Christopher Ariza # Michael Bodenbach # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/music21/common/types.py b/music21/common/types.py index 8d2eccf662..1dfc0aeeba 100644 --- a/music21/common/types.py +++ b/music21/common/types.py @@ -5,7 +5,7 @@ # # Authors: Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2021-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2021-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ from __future__ import annotations diff --git a/music21/corpus/corpora.py b/music21/corpus/corpora.py index 10b03635bd..d89e03dfbf 100644 --- a/music21/corpus/corpora.py +++ b/music21/corpus/corpora.py @@ -5,8 +5,7 @@ # # Authors: Josiah Wolf Oberholtzer # -# Copyright: Copyright © 2009-2012, 2014 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2009-2012, 2014 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- from __future__ import annotations diff --git a/music21/derivation.py b/music21/derivation.py index c27d7e99f0..a0db84e3a4 100644 --- a/music21/derivation.py +++ b/music21/derivation.py @@ -7,8 +7,7 @@ # Josiah Oberholtzer # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2011-2014 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2011-2014 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ---------------------------------------------------------------------------- ''' diff --git a/music21/duration.py b/music21/duration.py index 784f684c5a..17717dabb0 100644 --- a/music21/duration.py +++ b/music21/duration.py @@ -6,7 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2008-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2008-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/music21/editorial.py b/music21/editorial.py index eeeb75e45c..f2f1e1073e 100644 --- a/music21/editorial.py +++ b/music21/editorial.py @@ -6,8 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2008-2015 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2008-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/environment.py b/music21/environment.py index dad04e3749..0987d1b945 100644 --- a/music21/environment.py +++ b/music21/environment.py @@ -6,8 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2017 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2009-2017 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/expressions.py b/music21/expressions.py index c56c9782ab..c1adb8dde5 100644 --- a/music21/expressions.py +++ b/music21/expressions.py @@ -7,7 +7,7 @@ # Christopher Ariza # Neena Parikh # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/music21/figuredBass/harmony.py b/music21/figuredBass/harmony.py index aa456d3cd7..c2f190ad6e 100644 --- a/music21/figuredBass/harmony.py +++ b/music21/figuredBass/harmony.py @@ -5,7 +5,7 @@ # Authors: Moritz Heffter # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2011-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2011-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/music21/freezeThaw.py b/music21/freezeThaw.py index 5881f97307..4c61990057 100644 --- a/music21/freezeThaw.py +++ b/music21/freezeThaw.py @@ -7,8 +7,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2011-2012 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2011-2012 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- r''' diff --git a/music21/graph/utilities.py b/music21/graph/utilities.py index 8737e88a24..971297fa87 100644 --- a/music21/graph/utilities.py +++ b/music21/graph/utilities.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert, +# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/music21/harmony.py b/music21/harmony.py index cb81127385..230332b659 100644 --- a/music21/harmony.py +++ b/music21/harmony.py @@ -8,7 +8,7 @@ # Jacob Tyler Walls # Christopher Ariza # -# Copyright: Copyright © 2011-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2011-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' @@ -1001,7 +1001,8 @@ def chordSymbolFigureFromChord(inChord: chord.Chord, includeChordType=False): * eleventh chords: third and/or fifth * thirteenth chords: fifth, eleventh, ninth - This chord could be minor 7th with a C4, but because this 5th is not present, it is not identified + This chord could be minor 7th with a C4, but because this 5th is not present, + it is not identified. >>> c = chord.Chord(['F3', 'A-3', 'E-4']) >>> harmony.chordSymbolFigureFromChord(c) diff --git a/music21/interval.py b/music21/interval.py index acaeef5b2d..450fca17eb 100644 --- a/music21/interval.py +++ b/music21/interval.py @@ -8,7 +8,7 @@ # Amy Hailes # Christopher Ariza # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/music21/license.txt b/music21/license.txt index d9e81a163d..286e2bcd0d 100644 --- a/music21/license.txt +++ b/music21/license.txt @@ -6,7 +6,7 @@ # distributed with this package, particularly the corpus files # which have their own copyrights and licenses. # -# Copyright: music21 is "Copyright © 2006-2023 Michael Scott Asato Cuthbert" +# Copyright: music21 is "Copyright © 2006-2024 Michael Scott Asato Cuthbert" # and is open-source licensed under the # BSD 3-Clause License (beginning with music21 v2.0) # reprinted below. @@ -22,7 +22,7 @@ the BSD license still under effect. --- BSD License -Copyright (c) 2006-2023 Michael Scott Asato Cuthbert +Copyright (c) 2006-2024 Michael Scott Asato Cuthbert All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/music21/lily/translate.py b/music21/lily/translate.py index c8e01e6fea..56b2b972a6 100644 --- a/music21/lily/translate.py +++ b/music21/lily/translate.py @@ -5,7 +5,7 @@ # # Authors: Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2007-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2007-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/music21/metadata/__init__.py b/music21/metadata/__init__.py index c98750fb47..5d95fd2fbb 100755 --- a/music21/metadata/__init__.py +++ b/music21/metadata/__init__.py @@ -7,8 +7,7 @@ # Greg Chapman # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2010-22 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2010-2022 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/metadata/caching.py b/music21/metadata/caching.py index f51d40cd83..f8caad9c10 100644 --- a/music21/metadata/caching.py +++ b/music21/metadata/caching.py @@ -6,8 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2010, 2012 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2010, 2012 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- from __future__ import annotations diff --git a/music21/metadata/primitives.py b/music21/metadata/primitives.py index 4d51c105d4..c553874565 100644 --- a/music21/metadata/primitives.py +++ b/music21/metadata/primitives.py @@ -7,7 +7,7 @@ # Michael Scott Asato Cuthbert # Greg Chapman # -# Copyright: Copyright © 2010-22 Michael Scott Asato Cuthbert and the music21 +# Copyright: Copyright © 2010-22 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- from __future__ import annotations diff --git a/music21/metadata/properties.py b/music21/metadata/properties.py index 91412fbead..59d7278802 100644 --- a/music21/metadata/properties.py +++ b/music21/metadata/properties.py @@ -6,8 +6,7 @@ # Authors: Greg Chapman # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2023 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2023–2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- from __future__ import annotations diff --git a/music21/meter/__init__.py b/music21/meter/__init__.py index 87a96de9a5..632ce29db7 100644 --- a/music21/meter/__init__.py +++ b/music21/meter/__init__.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- from __future__ import annotations diff --git a/music21/meter/base.py b/music21/meter/base.py index 3453410fc7..ffc0aa61c7 100644 --- a/music21/meter/base.py +++ b/music21/meter/base.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/meter/core.py b/music21/meter/core.py index 2637ccc8e7..870984dcad 100644 --- a/music21/meter/core.py +++ b/music21/meter/core.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/meter/tests.py b/music21/meter/tests.py index fef72e44d6..403280c4a5 100644 --- a/music21/meter/tests.py +++ b/music21/meter/tests.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- from __future__ import annotations diff --git a/music21/meter/tools.py b/music21/meter/tools.py index f0ff3e9f41..3a6629759a 100644 --- a/music21/meter/tools.py +++ b/music21/meter/tools.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- from __future__ import annotations diff --git a/music21/musedata/__init__.py b/music21/musedata/__init__.py index 38788ab053..69c75e7a7e 100644 --- a/music21/musedata/__init__.py +++ b/music21/musedata/__init__.py @@ -27,7 +27,7 @@ ''' from __future__ import annotations -from collections.abc import Sequence +from collections.abc import Iterable import os import typing as t import unittest @@ -59,8 +59,11 @@ class MuseDataRecord(prebase.ProtoM21Object): Object for extracting data from a Note or other related record, or a single line of musedata data. ''' - - def __init__(self, src='', parent=None): + def __init__( + self, + src: str = '', + parent=None + ): # environLocal.printDebug(['creating MuseDataRecord']) self.src = src # src here is one line of text self.parent = parent @@ -73,7 +76,7 @@ def __init__(self, src='', parent=None): # store frequently used values self._cache = {} - def isRest(self): + def isRest(self) -> bool: ''' Return a boolean if this record is a rest. @@ -83,7 +86,6 @@ def isRest(self): >>> mdr = musedata.MuseDataRecord('measure 1 A') >>> mdr.isRest() False - ''' if self.src and self.src[0] == 'r': return True @@ -516,7 +518,6 @@ def getDynamicObjects(self): >>> mdr = musedata.MuseDataRecord('E4 48 h u (pp') >>> mdr.getDynamicObjects() [] - ''' from music21 import dynamics post = [] @@ -524,25 +525,25 @@ def getDynamicObjects(self): if data is None: return post # find targets from largest to smallest - targets = ['ppp', 'fff', + targets = ('ppp', 'fff', 'pp', 'ff', 'fp', 'mp', 'mf', - 'p', 'f', 'm', 'Z', 'Zp', 'R'] - for t in targets: - pos = data.find(t) + 'p', 'f', 'm', 'Z', 'Zp', 'R') + for target in targets: + pos = data.find(target) if pos < 0: continue # remove from data to avoid double hits - data = data[:pos] + data[pos + len(t):] - # those that can be directedly created - if t in ['ppp', 'fff', 'pp', 'ff', 'p', 'f', 'mp', 'mf', 'fp']: - post.append(dynamics.Dynamic(t)) - elif t == 'm': + data = data[:pos] + data[pos + len(target):] + # those that can be directly created + if target in ('ppp', 'fff', 'pp', 'ff', 'p', 'f', 'mp', 'mf', 'fp'): + post.append(dynamics.Dynamic(target)) + elif target == 'm': post.append(dynamics.Dynamic('mp')) - elif t == 'Z': # sfz + elif target == 'Z': # sfz post.append(dynamics.Dynamic('sf')) - elif t == 'Zp': # sfp + elif target == 'Zp': # sfp post.append(dynamics.Dynamic('sf')) - elif t == 'R': # rfz + elif target == 'R': # rfz post.append(dynamics.Dynamic('sf')) # environLocal.printDebug(['got dynamics', post]) return post @@ -1553,12 +1554,12 @@ def __init__(self): self.files: list[MuseDataFile] = [] self.encoding: str = 'utf-8' - def addFile(self, fp: str | Sequence[str]) -> None: + def addFile(self, fp: str | Iterable[str]) -> None: ''' Open and read this file path or list of paths as MuseDataFile objects and set self.files ''' - fpList: Sequence[str] + fpList: Iterable[str] if not common.isIterable(fp): fp_single = t.cast(str, fp) fpList = [fp_single] diff --git a/music21/musicxml/archiveTools.py b/music21/musicxml/archiveTools.py index 1c41fac304..4840b5fc71 100644 --- a/music21/musicxml/archiveTools.py +++ b/music21/musicxml/archiveTools.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009, 2017-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009, 2017-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/musicxml/xmlObjects.py b/music21/musicxml/xmlObjects.py index c4635ef7f4..6a07ef388b 100644 --- a/music21/musicxml/xmlObjects.py +++ b/music21/musicxml/xmlObjects.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ from __future__ import annotations diff --git a/music21/musicxml/xmlToM21.py b/music21/musicxml/xmlToM21.py index a32f78b9d7..3025157e6c 100644 --- a/music21/musicxml/xmlToM21.py +++ b/music21/musicxml/xmlToM21.py @@ -7,7 +7,7 @@ # Christopher Ariza # Jacob Tyler Walls # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ from __future__ import annotations diff --git a/music21/note.py b/music21/note.py index 6982928991..1ba2e7dd38 100644 --- a/music21/note.py +++ b/music21/note.py @@ -6,7 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2006-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2006-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' diff --git a/music21/roman.py b/music21/roman.py index 061b4a5934..40c12fbe03 100644 --- a/music21/roman.py +++ b/music21/roman.py @@ -6,7 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2011-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2011-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/scale/test_scale_main.py b/music21/scale/test_scale_main.py index a65a36cd56..df9e45bdde 100644 --- a/music21/scale/test_scale_main.py +++ b/music21/scale/test_scale_main.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2010-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2010-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ from __future__ import annotations diff --git a/music21/sorting.py b/music21/sorting.py index 9ff870d9d9..b82ff53ac0 100644 --- a/music21/sorting.py +++ b/music21/sorting.py @@ -5,8 +5,7 @@ # # Authors: Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2014-2015 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2014-2015 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/spanner.py b/music21/spanner.py index 62dd2699af..0b41559dfc 100644 --- a/music21/spanner.py +++ b/music21/spanner.py @@ -584,7 +584,8 @@ def fill( >>> ott3 = spanner.Ottava(note.Note('D'), note.Note('E')) >>> ott3.fill() Traceback (most recent call last): - music21.spanner.SpannerException: Spanner.fill() requires a searchStream or getFirst().activeSite + music21.spanner.SpannerException: Spanner.fill() requires a searchStream + or getFirst().activeSite ''' if not self.fillElementTypes: diff --git a/music21/stream/base.py b/music21/stream/base.py index 242118cf71..04d1293a21 100644 --- a/music21/stream/base.py +++ b/music21/stream/base.py @@ -8,7 +8,7 @@ # Josiah Wolf Oberholtzer # Evan Lynch # -# Copyright: Copyright © 2008-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2008-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/stream/core.py b/music21/stream/core.py index 125babeae9..6605422296 100644 --- a/music21/stream/core.py +++ b/music21/stream/core.py @@ -6,7 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2008-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2008-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/stream/iterator.py b/music21/stream/iterator.py index 636cde4713..e545e8fe29 100644 --- a/music21/stream/iterator.py +++ b/music21/stream/iterator.py @@ -6,7 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2008-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2008-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/stream/makeNotation.py b/music21/stream/makeNotation.py index 43e6d97fd1..cc4824d92b 100644 --- a/music21/stream/makeNotation.py +++ b/music21/stream/makeNotation.py @@ -8,7 +8,7 @@ # Jacob Walls # Evan Lynch # -# Copyright: Copyright © 2008-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2008-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- from __future__ import annotations diff --git a/music21/stream/streamStatus.py b/music21/stream/streamStatus.py index d1b179da57..21196cfdf1 100644 --- a/music21/stream/streamStatus.py +++ b/music21/stream/streamStatus.py @@ -5,8 +5,7 @@ # # Authors: Josiah Wolf Oberholtzer # -# Copyright: Copyright © 2013 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- from __future__ import annotations diff --git a/music21/stream/tests.py b/music21/stream/tests.py index 506b25c7e9..adb2633651 100644 --- a/music21/stream/tests.py +++ b/music21/stream/tests.py @@ -6,7 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ from __future__ import annotations diff --git a/music21/style.py b/music21/style.py index c402c7cf2d..f01501c252 100644 --- a/music21/style.py +++ b/music21/style.py @@ -5,8 +5,7 @@ # # Authors: Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2016-22 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2016-2022 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/test/testLint.py b/music21/test/testLint.py index 69208eab07..522d1472d0 100644 --- a/music21/test/testLint.py +++ b/music21/test/testLint.py @@ -6,7 +6,7 @@ # Authors: Christopher Ariza # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert, +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ from __future__ import annotations diff --git a/music21/test/testRunner.py b/music21/test/testRunner.py index abf3808ab0..f79b3e7b5e 100644 --- a/music21/test/testRunner.py +++ b/music21/test/testRunner.py @@ -6,8 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2006-2016 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2006-2016 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/test/test_base.py b/music21/test/test_base.py index 2df461a91f..c1327f4ab0 100644 --- a/music21/test/test_base.py +++ b/music21/test/test_base.py @@ -6,7 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2008-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2008-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ from __future__ import annotations diff --git a/music21/test/test_pitch.py b/music21/test/test_pitch.py index 62d021a882..b6f9783a61 100644 --- a/music21/test/test_pitch.py +++ b/music21/test/test_pitch.py @@ -6,7 +6,7 @@ # Authors: Michael Scott Asato Cuthbert # Christopher Ariza # -# Copyright: Copyright © 2008-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2008-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ from __future__ import annotations diff --git a/music21/tinyNotation.py b/music21/tinyNotation.py index dc0001b1a0..6a5523e166 100644 --- a/music21/tinyNotation.py +++ b/music21/tinyNotation.py @@ -5,7 +5,7 @@ # # Authors: Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------- ''' diff --git a/music21/tree/__init__.py b/music21/tree/__init__.py index 73abfbcf9c..4e099fbac9 100644 --- a/music21/tree/__init__.py +++ b/music21/tree/__init__.py @@ -7,8 +7,7 @@ # Authors: Josiah Wolf Oberholtzer # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2013-15 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013-2015 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/tree/analysis.py b/music21/tree/analysis.py index ff35b2ac04..a8d621501a 100644 --- a/music21/tree/analysis.py +++ b/music21/tree/analysis.py @@ -5,8 +5,7 @@ # # Authors: Josiah Wolf Oberholtzer # -# Copyright: Copyright © 2013-14 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013-2014 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/tree/core.py b/music21/tree/core.py index 7e498f0dc1..cf83ef3135 100644 --- a/music21/tree/core.py +++ b/music21/tree/core.py @@ -6,8 +6,7 @@ # Authors: Josiah Wolf Oberholtzer # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2013-16 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013-2016 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/tree/fromStream.py b/music21/tree/fromStream.py index 11ea4b23ab..499973db77 100644 --- a/music21/tree/fromStream.py +++ b/music21/tree/fromStream.py @@ -6,8 +6,7 @@ # Authors: Josiah Wolf Oberholtzer # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2013-22 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013-2022 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/tree/node.py b/music21/tree/node.py index 191543c4ba..fb5cf8b4f4 100644 --- a/music21/tree/node.py +++ b/music21/tree/node.py @@ -6,8 +6,7 @@ # Authors: Josiah Wolf Oberholtzer # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2013-16 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013-2016 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/tree/spans.py b/music21/tree/spans.py index d5e10917d6..1c0eb87e82 100644 --- a/music21/tree/spans.py +++ b/music21/tree/spans.py @@ -7,8 +7,7 @@ # Authors: Josiah Wolf Oberholtzer # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2013-15 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/tree/timespanTree.py b/music21/tree/timespanTree.py index 6f0fbeabcc..7525535cba 100644 --- a/music21/tree/timespanTree.py +++ b/music21/tree/timespanTree.py @@ -6,8 +6,7 @@ # Authors: Josiah Wolf Oberholtzer # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2013-16 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/tree/toStream.py b/music21/tree/toStream.py index e6ee5cd2a7..7c0eede6a9 100644 --- a/music21/tree/toStream.py +++ b/music21/tree/toStream.py @@ -6,8 +6,7 @@ # Authors: Josiah Wolf Oberholtzer # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2013-15 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013-2015 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/tree/trees.py b/music21/tree/trees.py index 4af59678aa..f1f316bd1d 100644 --- a/music21/tree/trees.py +++ b/music21/tree/trees.py @@ -6,8 +6,7 @@ # Authors: Josiah Wolf Oberholtzer # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2013-16 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013-2016 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ----------------------------------------------------------------------------- ''' diff --git a/music21/tree/verticality.py b/music21/tree/verticality.py index 90c0b02a46..50f9eeacc3 100644 --- a/music21/tree/verticality.py +++ b/music21/tree/verticality.py @@ -7,8 +7,7 @@ # Authors: Josiah Wolf Oberholtzer # Michael Scott Asato Cuthbert # -# Copyright: Copyright © 2013-16 Michael Scott Asato Cuthbert and the music21 -# Project +# Copyright: Copyright © 2013-2016 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ---------------------------------------------------------------------------- ''' diff --git a/music21/voiceLeading.py b/music21/voiceLeading.py index ba7fb2a37a..46a39cdd88 100644 --- a/music21/voiceLeading.py +++ b/music21/voiceLeading.py @@ -8,7 +8,7 @@ # Jackie Rogoff # Beth Hadley # -# Copyright: Copyright © 2009-2023 Michael Scott Asato Cuthbert +# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert # License: BSD, see license.txt # ------------------------------------------------------------------------------ ''' @@ -844,9 +844,11 @@ def parallelOctave(self) -> bool: ''' Returns True if the motion is a parallel Perfect Octave. - (This is a concept so abhorrent we shudder to illustrate it with an example, but alas, we must:) + (This is a concept so abhorrent we shudder to illustrate it + with an example, but alas, we must:) We will make the examples shorter with this abbreviation: + >>> N = note.Note >>> vlq = voiceLeading.VoiceLeadingQuartet(N('C5'), N('D5'), N('C4'), N('D4')) @@ -857,13 +859,15 @@ def parallelOctave(self) -> bool: >>> vlq.parallelOctave() True - Or False if the motion is according to the rules of God's own creation: + Or False if the motion is according to the rules of God's own creation :-) >>> vlq = voiceLeading.VoiceLeadingQuartet(N('C4'), N('D4'), N('C4'), N('D4')) >>> vlq.parallelOctave() False - (P.S., we were joking about parallel octaves being abhorant or out of God's creation!) + (P.S., we were joking about parallel octaves being abhorant or out of God's creation! + music21 works just as well with popular music and other styles that do not + have problems with parallel octaves.) ''' return self.parallelInterval(self.octave)