-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
wxGUI: Fix E722 do not use bare 'except' warnings in gui_core/
#4396
Conversation
Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
Do you happen to know if there's an extra flake8 exclusion removed here? |
Oh, I see that another wxGUI PR that I enabled automerge on would touch that line, so it's sure a conflict will happen. So probably this and some other PRs will need to have their conflicts fixed once that other PR is merged. But that other PR is queued after this and other ones. |
Sure, I will go through the PRs and fix the merge conflicts when and where they happen |
Conflicts to solve. |
Description:
This PR addresses the
E722 do not use bare 'except'
warnings by specifying the exception types to be caught in the following files ingui_core/
directory:dialogs.py:
re.error
for regular expression operations.forms.py:
Exception
as a general catch-all.IndexError
,AttributeError
)ghelp.py:
KeyError
for dictionary operations, a general catchallException
for everything elsegselect.py:
Exception
as a general catch-all.wx
module)widgets.py:
ValueError
for datetime parsing.Rationale:
Please review the changes and let me know if any further modifications are needed.