Skip to content

Commit d5dff4e

Browse files
committed
Don't add the cast -- too complex!
1 parent a84caf2 commit d5dff4e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

music21/stream/iterator.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Authors: Michael Scott Asato Cuthbert
77
# Christopher Ariza
88
#
9-
# Copyright: Copyright © 2008-2024 Michael Scott Asato Cuthbert
9+
# Copyright: Copyright © 2008-2025 Michael Scott Asato Cuthbert
1010
# License: BSD, see license.txt
1111
# -----------------------------------------------------------------------------
1212
'''
@@ -658,9 +658,12 @@ def cleanup(self) -> None:
658658
self.reset()
659659

660660
# cleanupOnStop is rarely used, so we put in
661-
# a dummy stream so that srcStream does not need
662-
# to be x|None
663-
SrcStreamClass = t.cast(type[StreamType], self.srcStream.__class__)
661+
# a dummy stream so that self.srcStream does not need
662+
# to be typed as Stream|None
663+
664+
# eventually want this to work
665+
# SrcStreamClass = t.cast(type[StreamType], self.srcStream.__class__)
666+
SrcStreamClass = self.srcStream.__class__
664667

665668
del self.srcStream
666669
del self.srcStreamElements

0 commit comments

Comments
 (0)