Skip to content

Enable four more flake8 rules#7811

Merged
DaanHoogland merged 2 commits into
apache:mainfrom
jbampton:enable-more-flake8-rules
Oct 10, 2023
Merged

Enable four more flake8 rules#7811
DaanHoogland merged 2 commits into
apache:mainfrom
jbampton:enable-more-flake8-rules

Conversation

@jbampton

@jbampton jbampton commented Aug 3, 2023

Copy link
Copy Markdown
Member

https://www.flake8rules.com/
https://flake8.pycqa.org/en/latest/user/configuration.html#configuring-flake8

The Python code was already following these "rules" so we just need to enforce them to stop regressions.

Description

This PR adds four more flake8 rules to our testing with pre-commit

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

After #7861 was merged flake8 now runs with pre-commit.

You can now test locally with:

pre-commit run flake8 --all-files

@codecov

codecov Bot commented Aug 3, 2023

Copy link
Copy Markdown

Codecov Report

Merging #7811 (3c68862) into main (b0ae701) will increase coverage by 0.00%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #7811   +/-   ##
=========================================
  Coverage     14.38%   14.39%           
- Complexity    10078    10081    +3     
=========================================
  Files          2748     2748           
  Lines        258975   258975           
  Branches      40329    40329           
=========================================
+ Hits          37261    37271   +10     
+ Misses       216898   216890    -8     
+ Partials       4816     4814    -2     

see 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

From the repo root you can test locally with:

`flake8 --config=.github/linters/.flake8 .`

https://www.flake8rules.com/
https://flake8.pycqa.org/en/latest/user/configuration.html#configuring-flake8

The Python code was already following these "rules" so we just need to enforce them to stop regressions.
@DaanHoogland DaanHoogland force-pushed the enable-more-flake8-rules branch from 475b64a to b9206f7 Compare August 4, 2023 07:29
@DaanHoogland DaanHoogland added this to the 4.19.0.0 milestone Aug 4, 2023
@DaanHoogland DaanHoogland requested a review from vishesh92 August 4, 2023 07:33

@vishesh92 vishesh92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland DaanHoogland merged commit e0ab2a4 into apache:main Oct 10, 2023
@jbampton jbampton deleted the enable-more-flake8-rules branch October 10, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants