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

test: Eliminate flake8 errors in tests #2353

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

aucampia
Copy link
Member

Summary of changes

Eliminate some occurrences of the following flake8 errors in tests:

  • E265 block comment should start with '# '
  • E266 too many leading '#' for block comment
  • E402 module level import not at top of file
  • E712 comparison to False should be 'if cond is False:' or 'if not cond:'
  • E712 comparison to True should be 'if cond is True:' or 'if cond:'
  • E722 do not use bare 'except'
  • F401 ... imported but unused
  • F403 ... used; unable to detect undefined names
  • F405 ... may be undefined, or defined from star imports: ...
  • F541 f-string is missing placeholders
  • F841 local variable 'result' is assigned to but never used
  • N806 variable 'TEST_DIR' in function should be lowercase

This is pursuant to eliminating
flakeheaven, as it no longer supports the latest version of flake8
[ref].

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.

Eliminate some occurrences of the following flake8 errors in tests:

* E265 block comment should start with '# '
* E266 too many leading '#' for block comment
* E402 module level import not at top of file
* E712 comparison to False should be 'if cond is False:' or 'if not cond:'
* E712 comparison to True should be 'if cond is True:' or 'if cond:'
* E722 do not use bare 'except'
* F401 ... imported but unused
* F403 ... used; unable to detect undefined names
* F405 ... may be undefined, or defined from star imports: ...
* F541 f-string is missing placeholders
* F841 local variable 'result' is assigned to but never used
* N806 variable 'TEST_DIR' in function should be lowercase

This is pursuant to eliminating
[flakeheaven](https://github.com/flakeheaven/flakeheaven), as it no longer
supports the latest version of flake8
[[ref](flakeheaven/flakeheaven#132)].
@coveralls
Copy link

Coverage Status

Coverage: 90.84%. Remained the same when pulling 2f93018 on aucampia:iwana-20230412T2313-fix_test_flake8 into 4ea1436 on RDFLib:main.

@aucampia aucampia marked this pull request as ready for review April 13, 2023 16:59
@aucampia aucampia requested a review from a team April 13, 2023 16:59
@aucampia aucampia merged commit cbd6151 into RDFLib:main Apr 14, 2023
@aucampia aucampia deleted the iwana-20230412T2313-fix_test_flake8 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants