Skip to content

Levels variable is never set#590

Merged
foarsitter merged 1 commit intojazzband:masterfrom
foarsitter:unused_variable_levels
Apr 3, 2024
Merged

Levels variable is never set#590
foarsitter merged 1 commit intojazzband:masterfrom
foarsitter:unused_variable_levels

Conversation

@foarsitter
Copy link
Contributor

Looking into the uncovered lines of code (at this moment 757 out of 768 lines are covered) I noticed that the levels variable in managers.py is never being set apart from None.

According to the test-suite it can be removed safely.

Can someone review this removal?

@codecov
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.94%. Comparing base (6e7158b) to head (ae562b4).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #590      +/-   ##
==========================================
+ Coverage   98.56%   98.94%   +0.37%     
==========================================
  Files           6        6              
  Lines         768      760       -8     
==========================================
- Hits          757      752       -5     
+ Misses         11        8       -3     

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

@foarsitter foarsitter added this to the 5.0.0 milestone Mar 22, 2024
Copy link
Contributor

@gmcrocetti gmcrocetti left a comment

Choose a reason for hiding this comment

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

Hi @foarsitter.
The change looks solid.
I investigated a bit about the reasoning of those changes and the majority of it was introduced by two PRs / commits:

They date back to 10 years ago and it targeted Django < 2.

Also, changes look consistent with git grep levels:
image
All that to say LGTM, nice job.

@foarsitter
Copy link
Contributor Author

@gmcrocetti thanks for checking out. Wasn't confided enough to merge it by my own so thanks for your approval!

@foarsitter foarsitter merged commit 714632e into jazzband:master Apr 3, 2024
@foarsitter foarsitter deleted the unused_variable_levels branch April 7, 2025 08:26
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