Skip to content

Switch code formatter from Black to Ruff#40

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

Switch code formatter from Black to Ruff#40
MaxGhenis merged 1 commit intomainfrom
switch-to-ruff-format

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • Replace Black with Ruff (ruff>=0.9.0) in dev dependencies
  • Remove [tool.black] configuration section from pyproject.toml
  • Update Makefile format target: black . -l 79 -> ruff format .
  • Reformat all Python files with Ruff defaults (88 char line length)

Test plan

  • ruff format --check . passes (21 files formatted)
  • CI passes

Generated with Claude Code

Replace Black with Ruff for code formatting across pyproject.toml,
Makefile, and all Python source files. Uses Ruff defaults (88 char
line length) with no custom configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MaxGhenis MaxGhenis merged commit 3b0d615 into main Mar 6, 2026
2 of 3 checks passed
@MaxGhenis MaxGhenis deleted the switch-to-ruff-format branch March 6, 2026 13:30
MaxGhenis added a commit that referenced this pull request Apr 17, 2026
#40 switched the repo's formatter from `black -l 79` to `ruff format`
(default 88-char line length) and updated the Makefile, but the reusable
lint workflow still invoked `lgeiger/black-action` with `. -l 79 --check`.
Since ruff-formatted files don't pass `black -l 79`, every PR's `lint`
check has been failing since #40.

Replace the black action with a `uvx ruff format --check .` run, matching
what `make format-check` would do locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Apr 17, 2026
* Delete CRITICAL_TEMPERATURE_BUG.md

This file documented a temperature-scaling bug in
`HardConcrete._deterministic_gates` and pointed readers at a "gold
standard" reference file `l0_louizos_improved_gate.py` that does not
actually exist in the repository. The bug itself is fixed by
#41 (the `sigmoid(qz_logits /
temperature)` change in `l0/distributions.py`), and the three standalone
modules (`distributions.py`, `calibration.py`, `sparse.py`) are now
consistent. Remove the stale doc now that its content is either obsolete
or misleading.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Switch CI lint job from black to ruff

#40 switched the repo's formatter from `black -l 79` to `ruff format`
(default 88-char line length) and updated the Makefile, but the reusable
lint workflow still invoked `lgeiger/black-action` with `. -l 79 --check`.
Since ruff-formatted files don't pass `black -l 79`, every PR's `lint`
check has been failing since #40.

Replace the black action with a `uvx ruff format --check .` run, matching
what `make format-check` would do locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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