fix: small lint cleanups in currency, enums, and legal process - #764
Open
inquilabee wants to merge 2 commits into
Open
fix: small lint cleanups in currency, enums, and legal process#764inquilabee wants to merge 2 commits into
inquilabee wants to merge 2 commits into
Conversation
Remove an unnecessary intermediate variable before return, simplify enum value collection, tighten month validation, and drop a redundant slice index. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #764 +/- ##
==========================================
+ Coverage 99.09% 99.22% +0.12%
==========================================
Files 26 26
Lines 775 774 -1
==========================================
Hits 768 768
+ Misses 7 6 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add unit tests so the simplified is_valid_month implementation stays fully covered for codecov patch checks. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Repo health: 52/100
Our analysis found 15 format issues and about 128 refactoring opportunities
across the reviewed scope. Your core validation utilities are well covered by tests
(175 unittest cases passed locally), and several security-oriented checks reported
no secrets. This pull request is a sample of those findings — 4 files with
roughly 11 focused changes so far — and is not a complete format pass or refactor cleanup.
Hotspots and improvement notes below are scoped to Python (
*.py) source.What you are doing right
What you could improve
Changes
brutils/currency.py: return formatted currency directly without an intermediate variable.brutils/data/enums/better_enum.py: simplifyvaluesproperty with a sorted generator expression.brutils/data/enums/months.py: replace ternary with direct set membership inis_valid_month.brutils/legal_process.py: use[:7]instead of[0:7]in checksum input.tests/test_date_utils.py: add coverage forMonthsEnum.is_valid_month.Review summary produced with ShipGate — a policy-first quality orchestrator that runs linters, formatters, security scanners, and refactor checks from one catalog. This PR used
check+refactor check --strictto find issues; docs.