Skip to content

Enable ruff argument, idiom and pytest-style rules (ARG, B, C4, FBT, PERF, PLW, PT, PTH, RUF, SIM and others) - #3924

Merged
anth-volk merged 21 commits into
masterfrom
ruff-idioms-arguments
Oct 21, 2026
Merged

anth-volk merged 21 commits into
masterfrom
ruff-idioms-arguments

Apply this PR's rules to the code #3985 added (PTH123, PERF401, C420)

5ae76f9
Select commit
Loading
Failed to load commit list.
Codecov / codecov/project succeeded Oct 20, 2026 in 1s

84.74% (+35.53%) compared to f117791

View this Pull Request on Codecov

84.74% (+35.53%) compared to f117791

Details

Codecov Report

❌ Patch coverage is 73.05389% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.74%. Comparing base (f117791) to head (5ae76f9).
⚠️ Report is 28 commits behind head on master.

Files with missing lines Patch % Lines
policyengine_api/services/economy_comparison.py 31.03% 20 Missing ⚠️
policyengine_api/country.py 41.66% 6 Missing and 1 partial ⚠️
policyengine_api/data/orm.py 76.19% 3 Missing and 2 partials ⚠️
policyengine_api/data/v2/database.py 93.54% 0 Missing and 2 partials ⚠️
policyengine_api/routes/policy_routes.py 33.33% 0 Missing and 2 partials ⚠️
policyengine_api/services/economy_service.py 0.00% 0 Missing and 2 partials ⚠️
.../payload_validators/validate_set_policy_payload.py 0.00% 1 Missing and 1 partial ⚠️
policyengine_api/constants.py 50.00% 1 Missing ⚠️
policyengine_api/data/congressional_districts.py 0.00% 0 Missing and 1 partial ⚠️
...licyengine_api/data/v2/privilege_reconciliation.py 50.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3924       +/-   ##
===========================================
+ Coverage   49.20%   84.74%   +35.53%     
===========================================
  Files         242      258       +16     
  Lines       14307    15676     +1369     
  Branches     2357     2640      +283     
===========================================
+ Hits         7040    13284     +6244     
+ Misses       6637     1623     -5014     
- Partials      630      769      +139     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.