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

MAINT: flake8 updates #1165

Merged
merged 5 commits into from
Dec 20, 2023
Merged

MAINT: flake8 updates #1165

merged 5 commits into from
Dec 20, 2023

Conversation

jklenzing
Copy link
Member

@jklenzing jklenzing commented Dec 19, 2023

Description

There's a new version of flake8! Two major changes that I can tell:

  • Specifying specific errors to ignore for files in setup.cfg no longer works (see error here)
  • A number of additional flake8 errors are popping up (mostly unused imports, this may have slipped under the radar due to changes in how setup.cfg was processed with flake8 6.0)

This updates the issues throughout the code. Major changes include

  • Adding comments for pysat/__init__ to explain why imports and code are mixed, including updating the logical flow a bit
  • The file-level ignore statements have been moved to the files as line-level noqa statements (as is the standard elsewhere in the code)
  • Most of the "unused imports" that are removed are related to tests on deprecations (removed in this version). Not really sure why flake8 didn't catch this with 6.0.
  • Cleaned up some code duplication where proper style exceeded 80 chars (need space after ',')

Note that flake8 is expected to fail in all other branches.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

running flake8 and pytest locally.

Test Configuration:

  • Operating system: Ventura 13.6.1
  • Version number: Python 3.10.9

Checklist:

  • [rc] Make sure you are merging into the develop (not main) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Add a note to CHANGELOG.md, summarizing the changes

If this is a release PR, replace the first item of the above checklist with the release
checklist on the wiki: https://github.com/pysat/pysat/wiki/Checklist-for-Release

@jklenzing jklenzing marked this pull request as ready for review December 19, 2023 21:11
@jklenzing jklenzing merged commit 8b0ea76 into rc_3_2_0 Dec 20, 2023
21 of 23 checks passed
@jklenzing jklenzing deleted the maint/flake8 branch December 20, 2023 19:08
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.

None yet

2 participants