diff --git a/music21/converter/__init__.py b/music21/converter/__init__.py index 01a442e92..181c93889 100644 --- a/music21/converter/__init__.py +++ b/music21/converter/__init__.py @@ -475,7 +475,7 @@ def unregisterSubConverter( _deregisteredSubConverters.append('all') return - removeSubConverter = cast(Type[SubConverter], removeSubConverter) + removeSubConverter = t.cast(Type[SubConverter], removeSubConverter) try: _registeredSubConverters.remove(removeSubConverter) except ValueError: @@ -928,7 +928,7 @@ def subConvertersList( if unregistered == 'all': continue try: - unregistered = cast(Type[SubConverter], unregistered) + unregistered = t.cast(Type[SubConverter], unregistered) subConverterList.remove(unregistered) except ValueError: pass