Skip to content

fix: eliminate bare except: - #2350

Merged
aucampia merged 1 commit into
RDFLib:mainfrom
aucampia:iwana-20230411T2249-fix_bare_except
Apr 12, 2023
Merged

aucampia merged 1 commit into
RDFLib:mainfrom
aucampia:iwana-20230411T2249-fix_bare_except

Conversation

@aucampia

Copy link
Copy Markdown
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
Copy Markdown

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

@ghost ghost left a comment

Copy link
Copy Markdown

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
@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.

2 participants