Skip to content
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

fix: eliminate bare except: #2350

Merged
merged 1 commit into from Apr 12, 2023

Conversation

aucampia
Copy link
Member

Summary of changes

Replace bare except: with except Exception, there are some cases where it can be narrowed further, but this is already an improvement over the current situation.

This is somewhat pursuant to eliminating
flakeheaven, as it no longer supports the latest version of flake8
[ref]. But it also is just the right thing to do as bare exceptions can cause problems.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Checked that all tests and type checking passes.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

Replace bare `except:` with `except Exception`, there are some cases where it
can be narrowed further, but this is already an improvement over the current
situation.

This is somewhat pursuant to eliminating
[flakeheaven](https://github.com/flakeheaven/flakeheaven), as it no longer
supports the latest version of flake8
[[ref](flakeheaven/flakeheaven#132)]. But it also is
just the right thing to do as bare exceptions can cause problems.
@coveralls
Copy link

Coverage Status

Coverage: 90.838%. Remained the same when pulling ae54dbf on aucampia:iwana-20230411T2249-fix_bare_except into 5c3c78a on RDFLib:main.

@aucampia aucampia marked this pull request as ready for review April 11, 2023 21:13
@aucampia aucampia requested a review from a team April 11, 2023 21:19
@aucampia aucampia added review wanted This indicates that the PR is ready for review ready to merge The PR will be merged soon if no further feedback is provided. labels Apr 11, 2023
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@aucampia aucampia merged commit 4ea1436 into RDFLib:main Apr 12, 2023
25 checks passed
@aucampia aucampia deleted the iwana-20230411T2249-fix_bare_except branch June 8, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR will be merged soon if no further feedback is provided. review wanted This indicates that the PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants