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

Add linters to deltametrics: flake8-bugbear #188

Merged

Conversation

mcflugen
Copy link
Collaborator

@mcflugen mcflugen commented Dec 13, 2024

Adds the flake8-bugbear linter to deltametrics and fixes some issues.

Maybe the two biggest changes here are:

  1. Set stacklevel=2 for warnings. The default of 1 produces warnings that can be difficult to understand.
  2. Use only immutable objects as keyword defaults. If you use a mutable object as a default and then change that object's value within the function, the default value for subsequent calls of the function will also change.

@mcflugen mcflugen marked this pull request as draft December 13, 2024 21:16
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.

Project coverage is 89.40%. Comparing base (8359596) to head (30156f4).
Report is 11 commits behind head on develop.

Files with missing lines Patch % Lines
deltametrics/utils.py 0.00% 2 Missing ⚠️
deltametrics/plan.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #188      +/-   ##
===========================================
+ Coverage    89.35%   89.40%   +0.05%     
===========================================
  Files            9        9              
  Lines         3617     3616       -1     
===========================================
+ Hits          3232     3233       +1     
+ Misses         385      383       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mcflugen mcflugen marked this pull request as ready for review December 13, 2024 22:10
@mcflugen mcflugen merged commit d69f475 into sandpiper-toolchain:develop Dec 13, 2024
10 of 11 checks passed
@mcflugen mcflugen deleted the mcflugen/add-flake8-bugbear branch December 13, 2024 22:10
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.

1 participant