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

add some casts for PyCharm #1677

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 3 additions & 1 deletion music21/converter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Authors: Michael Scott Asato Cuthbert
# Christopher Ariza
#
# Copyright: Copyright © 2009-2015 Michael Scott Asato Cuthbert
# Copyright: Copyright © 2009-2024 Michael Scott Asato Cuthbert
# License: BSD, see license.txt
# ------------------------------------------------------------------------------
'''
Expand Down Expand Up @@ -475,6 +475,7 @@ def unregisterSubConverter(
_deregisteredSubConverters.append('all')
return

removeSubConverter = t.cast(Type[SubConverter], removeSubConverter)
try:
_registeredSubConverters.remove(removeSubConverter)
except ValueError:
Expand Down Expand Up @@ -927,6 +928,7 @@ def subConvertersList(
if unregistered == 'all':
continue
try:
unregistered = t.cast(Type[SubConverter], unregistered)
subConverterList.remove(unregistered)
except ValueError:
pass
Expand Down
Loading