-
-
Notifications
You must be signed in to change notification settings - Fork 633
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
create Enums for audioDucking and minor lint #12926
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than the query re _displayStringLabels
source/gui/settingsDialogs.py
Outdated
self.duckingList = settingsSizerHelper.addLabeledControl( | ||
duckingListLabelText, | ||
wx.Choice, | ||
choices=audioDucking.AudioDuckingMode._displayStringLabels.values() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this really work?
I think that _displayStringLabels is an instance property, and therefore can not be accessed on the class, rather it can only be accessed on the instance (one of the enum values).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this doesn't work. I've tested this PR using a try build now, and fixed how the choices are generated
# Conflicts: # user_docs/en/changes.t2t
Link to issue number:
None
Summary of the issue:
While debugging #12913, I created some Enums to help with logging and understanding the code.
This is not a focused refactor, and as such, more work could be done to improve the audioDucking API.
Description of how this pull request fixes the issue:
IntEnum
s for constantsTesting strategy:
with a try build of this PR:
Known issues with pull request:
Note, this is an API breaking change and should not be merged until 2022.1.
I have just created this PR as the work should not be lost, but adding backwards compatibility is not worth prioritising.
Change log entries:
See diff in changes.t2t
Code Review Checklist: