Skip to content

don't rely on star imports from synthDriverHandler#12172

Merged
seanbudd merged 7 commits into
nvaccess:masterfrom
lukaszgo1:synthDriverHandlerExplicitImports
Mar 17, 2021
Merged

don't rely on star imports from synthDriverHandler#12172
seanbudd merged 7 commits into
nvaccess:masterfrom
lukaszgo1:synthDriverHandlerExplicitImports

Conversation

@lukaszgo1

@lukaszgo1 lukaszgo1 commented Mar 15, 2021

Copy link
Copy Markdown
Contributor

Link to issue number:

None

Summary of the issue:

Currently a few modules relies on star imports from synthDriverHandler making it unnecessarily difficult to perform refactoring (I've stumbled on this when writing code for #12168)

Description of how this pull request fixes the issue:

Now both settingsDialogs and globalCommands are importing what they need explicitly.

Testing strategy:

  • With git grep checked what modules imports synthDriverHander
  • For those which imported everything i.e from synthDriver import * I've executed flake8 for the entire file and imported explicitly only whatever they were using.

Known issues with pull request:

None known

Change log entry:

- the `synthDriverHandler` module is no longer star imported into `globalCommands` and `gui.settingsDialogs`  - use `from synthDriverHandler import synthFunctionExample` instead. (#12172)

Code Review Checklist:

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual tests.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit efca50c7f4

@seanbudd seanbudd added the deprecated/2021.1 Label used to track deprecations due for removal in the 2021.1 release label Mar 16, 2021
@seanbudd seanbudd added this to the 2021.1 milestone Mar 16, 2021
@seanbudd seanbudd self-assigned this Mar 16, 2021
@seanbudd seanbudd mentioned this pull request Mar 16, 2021
18 tasks
@seanbudd

Copy link
Copy Markdown
Member

I've added a changelog entry and tested this using a method similar to #12126, by checking if the functions that are exported from synthDriverHandler are imported via globalCommands and gui.settingsDialogs

@seanbudd seanbudd merged commit 04849b0 into nvaccess:master Mar 17, 2021
@lukaszgo1 lukaszgo1 deleted the synthDriverHandlerExplicitImports branch March 17, 2021 07:05
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