Skip to content

Format README code block for ruff 0.16 - #307

Open
vahid-ahmadi wants to merge 1 commit into
mainfrom
fix/readme-ruff-016-format
Open

Format README code block for ruff 0.16#307
vahid-ahmadi wants to merge 1 commit into
mainfrom
fix/readme-ruff-016-format

Conversation

@vahid-ahmadi

Copy link
Copy Markdown

Closes #305

Problem

make lint fails on a clean checkout of main, so the lint job is red for every PR regardless of its contents.

ruff 0.16 began formatting Python code blocks embedded in Markdown. The README usage example uses single quotes and an expanded dict literal, which ruff now wants to reformat. The lint job installs ruff>=0.9.0 with no upper bound, so CI resolves 0.16.x.

Bisected against main:

ruff 0.9.10   8 files already formatted
ruff 0.12.12  8 files already formatted
ruff 0.14.0   8 files already formatted
ruff 0.15.0   8 files already formatted
ruff 0.16.5   1 file would be reformatted, 15 files already formatted   <- README.md

The jump from 8 to 16 files is ruff 0.16 picking up the Markdown files.

Change

Ran ruff format on the README. Only the fenced example changes (double quotes, collapsed dict) — no prose, no behaviour.

Pinning an upper bound on ruff would also work, but formatting the block keeps the repo compatible with whatever CI resolves next.

Verification

  • make lint — passes (16 files already formatted)
  • make test — 62 passed on pandas 3.0.5 and pandas 2.3.3

This one should merge first — the other PRs in this batch will show a red lint job until it does.

ruff 0.16 formats Python code blocks inside Markdown, so `make lint`
fails on a clean main: the README usage example uses single quotes and
an expanded dict literal. The lint job installs `ruff>=0.9.0` with no
upper bound, so CI picks up 0.16.x and every PR shows a red lint job.

Applying `ruff format` to the README fixes it without pinning ruff.

Co-Authored-By: Claude Opus 5 (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.

make lint fails on clean main with ruff 0.16 (README code block)

1 participant