Skip to content

Switch code formatter from Black to Ruff#3317

Merged
MaxGhenis merged 1 commit intomasterfrom
switch-to-ruff
Mar 6, 2026
Merged

Switch code formatter from Black to Ruff#3317
MaxGhenis merged 1 commit intomasterfrom
switch-to-ruff

Conversation

@MaxGhenis
Copy link
Collaborator

Summary

  • Replace Black with Ruff (ruff format) for code formatting
  • Update Makefile format target to use ruff format .
  • Replace Black GitHub Actions in CI with ruff format --check .
  • Add ruff>=0.9.0 as a dev dependency in setup.py
  • Reformat all Python files with ruff defaults (88-char line length)

Test plan

  • CI lint job passes with ruff format --check .
  • Verify make format works locally

Generated with Claude Code

Replace Black with Ruff for code formatting across the project:
- Update Makefile format target to use `ruff format .`
- Replace Black GitHub Actions with `ruff format --check .` in CI
- Add ruff>=0.9.0 as a dev dependency in setup.py
- Reformat all Python files with ruff defaults

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 69.62025% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.20%. Comparing base (f3a7d44) to head (c0e719e).
⚠️ Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
policyengine_api/endpoints/economy/compare.py 37.50% 9 Missing and 1 partial ⚠️
policyengine_api/endpoints/policy.py 0.00% 5 Missing ⚠️
policyengine_api/routes/report_output_routes.py 33.33% 2 Missing ⚠️
policyengine_api/services/report_output_service.py 33.33% 2 Missing ⚠️
policyengine_api/country.py 85.71% 1 Missing ⚠️
policyengine_api/services/household_service.py 66.66% 1 Missing ⚠️
policyengine_api/services/simulation_service.py 75.00% 1 Missing ⚠️
.../payload_validators/validate_set_policy_payload.py 0.00% 0 Missing and 1 partial ⚠️
policyengine_api/utils/singleton.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3317   +/-   ##
=======================================
  Coverage   72.20%   72.20%           
=======================================
  Files          56       56           
  Lines        2425     2425           
  Branches      423      423           
=======================================
  Hits         1751     1751           
  Misses        595      595           
  Partials       79       79           

☔ View full report in Codecov by Sentry.
📢 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.

@MaxGhenis MaxGhenis merged commit 476da50 into master Mar 6, 2026
6 of 7 checks passed
@MaxGhenis MaxGhenis deleted the switch-to-ruff branch March 6, 2026 13:31
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