|
15 | 15 | ''' |
16 | 16 | from __future__ import annotations |
17 | 17 |
|
18 | | -__all__ = ['tools', 'tables', 'Chord', 'ChordException', 'fromIntervalVector', 'fromForteClass'] |
| 18 | +__all__ = [ |
| 19 | + 'Chord', |
| 20 | + 'ChordBase', |
| 21 | + 'ChordException', |
| 22 | + 'fromForteClass', |
| 23 | + 'fromIntervalVector', |
| 24 | + 'tables', |
| 25 | + 'tools', |
| 26 | +] |
19 | 27 |
|
20 | 28 | from collections.abc import Iterable, Sequence |
21 | 29 | import copy |
22 | 30 | import typing as t |
23 | | -from typing import overload # pycharm bug |
| 31 | +# pycharm bug - need to import overload separately. typing.overload doesn't work |
| 32 | +from typing import overload |
24 | 33 | import unittest |
25 | 34 |
|
26 | | -from music21 import beam |
27 | 35 | from music21 import common |
28 | 36 | from music21.common.decorators import cacheMethod |
29 | 37 | from music21 import derivation |
|
42 | 50 |
|
43 | 51 | if t.TYPE_CHECKING: |
44 | 52 | from music21 import stream |
45 | | - from music21.style import Style |
46 | 53 |
|
47 | 54 | environLocal = environment.Environment('chord') |
48 | 55 |
|
@@ -468,7 +475,7 @@ def volume(self) -> 'music21.volume.Volume': # do NOT change to volume.Volume, |
468 | 475 |
|
469 | 476 |
|
470 | 477 | @volume.setter |
471 | | - def volume(self, expr: None|'music21.volume.Volume'|int|float): |
| 478 | + def volume(self, expr: 'None|music21.volume.Volume|int|float'): |
472 | 479 | # Do NOT change typing to volume.Volume w/o quotes because it will take the property as |
473 | 480 | # its name and be really confused. |
474 | 481 | if isinstance(expr, volume.Volume): |
@@ -4072,8 +4079,7 @@ def semiClosedPosition( |
4072 | 4079 | c2 = self |
4073 | 4080 |
|
4074 | 4081 | if t.TYPE_CHECKING: |
4075 | | - from music21.stream import Stream |
4076 | | - assert isinstance(c2, Stream) |
| 4082 | + assert isinstance(c2, stream.Stream) |
4077 | 4083 | # startOctave = c2.bass().octave |
4078 | 4084 | remainingPitches = copy.copy(c2.pitches) # no deepcopy needed |
4079 | 4085 |
|
@@ -6134,8 +6140,7 @@ def testCopyAndDeepcopy(self): |
6134 | 6140 | testCopyAll(self, globals()) |
6135 | 6141 |
|
6136 | 6142 |
|
6137 | | - |
6138 | | -_DOC_ORDER = [Chord] |
| 6143 | +_DOC_ORDER = [Chord, ChordBase, fromForteClass, fromIntervalVector] |
6139 | 6144 |
|
6140 | 6145 |
|
6141 | 6146 | if __name__ == '__main__': |
|
0 commit comments