Skip to content

Refactor for cancellable speech#11049

Merged
feerrenrut merged 8 commits into
masterfrom
refactor-forCancellableSpeech
Apr 28, 2020
Merged

Refactor for cancellable speech#11049
feerrenrut merged 8 commits into
masterfrom
refactor-forCancellableSpeech

Conversation

@feerrenrut

Copy link
Copy Markdown
Contributor

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.

  • Speech manager
    • Explicit imports
    • More typing information added to function definitions.
  • The order of classes in SynthDriverHandler

Testing performed:

Known issues with pull request:

Change log entry:

None

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.
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 *
@feerrenrut feerrenrut added the deprecated/2021.1 Label used to track deprecations due for removal in the 2021.1 release label Apr 23, 2020
@feerrenrut feerrenrut mentioned this pull request Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecated/2021.1 Label used to track deprecations due for removal in the 2021.1 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants