Refactor for cancellable speech#11049
Merged
Merged
Conversation
Move VoiceInfo to top of driverHandler. It is used by other classes later in this file.
Move LanguageInfo to top of driverHandler. It is used by other classes later in this file.
Move driverHandler functions that use the SynthDriver class below the SynthDriver class definition.
Fix linting errors and add some type hinting to previously refactored blocks of driverHandler.
Add type hinting.
Change default for 'priority' argument in method 'speech.speak'. Using None makes the typing optional, however it is no longer really optional, the True default is Spri.NORMAL. Now this is explicit in the definition.
Many items were implicitly being imported by import *
Merged
michaelDCurran
approved these changes
Apr 27, 2020
This was referenced Mar 5, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
PR #10885
Summary of the issue:
#10885 introduces a way to cancel speech due to focus events that are no longer valid. However, the refactoring commits made the diff hard to view.
Description of how this pull request fixes the issue:
This PR splits out the refactoring commits.
Some static analysis tools I used while developing the cancellable speech PR did not properly understand several classes due to their order in the file. This PR re-orders those classes so they are defined before they are used. It also makes that code pass the flake8 checks. The move and restyling are done in separate commits to make reviewing easier. Turning off white space in the diff will also make this easier.
Testing performed:
Known issues with pull request:
Change log entry:
None