Make Python console opening more robust#17392
Merged
Merged
Conversation
See test results for failed build of commit b8192d5a63 |
seanbudd
reviewed
Nov 13, 2024
seanbudd
reviewed
Nov 13, 2024
seanbudd
approved these changes
Nov 13, 2024
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Contributor
Author
|
@seanbudd thanks for your review. I'll remove alll other lambda function following your example where not necessary. In addition, I'd like to know your opinion on:
|
See test results for failed build of commit 4967d080ed |
Contributor
Author
|
@seanbudd, finally, I have removed the noqa's for imports; maybe they appeared during Ruff's introduction. Just let me know for the message box in case of error. |
seanbudd
reviewed
Nov 13, 2024
seanbudd
approved these changes
Nov 13, 2024
seanbudd
left a comment
Member
There was a problem hiding this comment.
Thanks @CyrilleB79 - I don't think we should add a warning dialog, I think logging an error is enough
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:
Closes #17391
Summary of the issue:
When opening Python console with
NVDA+control+Z, NVDA initialize snapshot variables. If an error occurs during the initialization of these variables, the console cannot open.Description of user facing changes
The Python console will not fail to open anymore in case an error occurs while retrieving snapshot variables. If an exception occurs while retrieving a snapshot variable, this variable is set to
None.Note: I have imagined to display an error dialog if one or more variable cannot be retrieved successfully, but:
So I'd like to discuss this point before choosing investigating how to implement this design if you agree.
Description of development approach
For each snapshot variable, catch any exception that can occur during its retrieval and initialize the variable to
Noneif retrieval has failed. Also log the corresponding error.Note: I have added one more
#noqa E402. I am tempted to remove all of them but have not done so because I do not know why they have been added in the first place.Testing strategy:
Manual test:
Steps of #17391.
Known issues with pull request:
None
Code Review Checklist:
@coderabbitai summary