Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 14, 2025

Replaces the Black formatter with Ruff's built-in formatter (ruff-format) in the pre-commit configuration. Ruff format is a drop-in Black replacement with better performance.

Changes

  • .pre-commit-config.yaml: Removed black-pre-commit-mirror repo, added ruff-format hook to existing ruff-pre-commit repo
  • light-curve/pyproject.toml: Removed black from dev dependencies
  • Code formatting: Ruff formatter applied minor style improvements to 2 files (added parentheses for operator precedence clarity, removed extra blank line)

Ruff format uses its default configuration which is fully compatible with Black's behavior.

<issue_title>pre-commit: replace black with ruff formatter </issue_title>
><issue_description></issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
>
>
>

Original prompt

This section details on the original issue you should resolve

<issue_title>pre-commit: replace black with ruff formatter </issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Replace black formatter with ruff for pre-commit Replace black with ruff formatter in pre-commit Nov 14, 2025
Copilot AI requested a review from hombit November 14, 2025 21:31
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 14, 2025

CodSpeed Performance Report

Merging #576 will degrade performances by 36.52%

Comparing copilot/replace-black-with-ruff-formatter (86853a3) with master (3ef2535)1

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

⚡ 51 improvements
❌ 12 regressions
✅ 43 untouched
⏩ 106 skipped2

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Mode Benchmark BASE HEAD Change
WallTime test_benchmark_naive 2.3 ms 2 ms +14.3%
WallTime test_benchmark_rust 61.4 µs 68.8 µs -10.77%
WallTime test_benchmark_lc_py 3.9 ms 3.3 ms +16.63%
WallTime test_benchmark_cesium 3.6 ms 3.3 ms +11.04%
WallTime test_benchmark_rust 2 µs 3.1 µs -36.52%
WallTime test_benchmark_lc_py 446.6 µs 359.5 µs +24.22%
WallTime test_benchmark_naive 430 µs 345.2 µs +24.58%
WallTime test_benchmark_naive 2.1 ms 1.6 ms +29.9%
WallTime test_benchmark_naive 2.1 ms 1.6 ms +28.86%
WallTime test_benchmark_lc_py 3.9 ms 3.4 ms +16.25%
WallTime test_benchmark_cesium 3.8 ms 3.4 ms +10.86%
WallTime test_benchmark_lc_py 34.8 µs 29.7 µs +17.32%
WallTime test_benchmark_rust 2.3 µs 2.6 µs -12%
WallTime test_benchmark_lc_py 47.6 µs 40 µs +19.12%
WallTime test_benchmark_rust 3.6 µs 4.8 µs -24.05%
WallTime test_benchmark_lc_py 29.9 µs 24.9 µs +20.27%
WallTime test_benchmark_naive 19.8 µs 17.8 µs +11.21%
WallTime test_benchmark_rust 3.1 µs 3.4 µs -10.28%
WallTime test_benchmark_lc_py 34.2 µs 28.3 µs +20.64%
WallTime test_benchmark_naive 23.7 µs 21.3 µs +11.06%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Footnotes

  1. No successful run was found on master (86853a3) during the generation of this report, so 3ef2535 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 106 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.60%. Comparing base (3ef2535) to head (86853a3).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #576   +/-   ##
=======================================
  Coverage   82.60%   82.60%           
=======================================
  Files           9        9           
  Lines        2604     2604           
=======================================
  Hits         2151     2151           
  Misses        453      453           

☔ 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.

Copilot AI requested a review from hombit November 14, 2025 22:35
@hombit hombit marked this pull request as ready for review November 14, 2025 22:36
@hombit hombit enabled auto-merge November 14, 2025 22:36
Copilot AI and others added 2 commits November 14, 2025 21:18
Co-authored-by: hombit <1784493+hombit@users.noreply.github.com>
Co-authored-by: hombit <1784493+hombit@users.noreply.github.com>
@hombit hombit force-pushed the copilot/replace-black-with-ruff-formatter branch from d19b1b0 to c870392 Compare November 15, 2025 02:18
@hombit hombit merged commit 7e89c2a into master Nov 15, 2025
68 of 70 checks passed
@hombit hombit deleted the copilot/replace-black-with-ruff-formatter branch November 15, 2025 02:58
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.

pre-commit: replace black with ruff formatter

2 participants