745 Commits
Author SHA1 Message Date
Brent Westbrook 9e4938c4a6 Bump 0.16.5 (#28110) 2026-08-27 12:09:07 -04:00
Brent WestbrookandMicha Reiser 29c8e5b2d0 Document rule acceptance guidelines (#27910)
Summary
--

This PR includes the contributor-facing documentation for the new
categories, as well as updated
rule acceptance guidelines built atop them.

I think we could also update our rule request template based on some of
these guidelines, but I'll save that for a follow-up once these are
solidified.

Test Plan
--

Future rule requests

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
2026-08-27 11:26:34 -04:00
Brent WestbrookandMicha Reiser 50a4d7fd10 Document the new category selectors (#27906)
Summary
--

This includes the user-facing updates to our linter docs and selection
settings to accompany #27666.

Test Plan
--

A few existing snapshot updates but mostly users reading this

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
2026-08-27 11:26:33 -04:00
Brent Westbrook 11c76bf48f Bump 0.16.4 (#27937) 2026-08-20 13:14:29 -04:00
William WoodruffandAlex Waygood 7ed8d1fbdd Manage docs build with a dep group (#27843)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Signed-off-by: William Woodruff <william@yossarian.net>
2026-08-18 20:56:20 +00:00
William Woodruff 66418ef0d4 Use pinned forms for uvx (#27798)
Signed-off-by: William Woodruff <william@yossarian.net>
2026-08-16 16:26:55 -04:00
Brent Westbrook b0e47022cf Bump 0.16.3 (#27723) 2026-08-13 09:39:16 -04:00
renovate[bot] 1f21a772f8 Update dependency mdformat-mkdocs to v5.3.0 (#27681) 2026-08-12 07:45:48 +02:00
renovate[bot] 0d773b07bf Update dependency ruff to v0.16.2 (#27672) 2026-08-11 22:20:33 -04:00
Brent Westbrook 5b48a04097 Bump 0.16.2 (#27555) 2026-08-07 09:12:50 -04:00
renovate[bot] 8348f2f064 Update dependency ruff to v0.16.1 (#27479) 2026-08-05 08:08:26 +02:00
Brent Westbrook 80790b348b Bump 0.16.1 (#27330) 2026-07-30 13:54:42 -04:00
renovate[bot] c76580935b Update dependency mkdocs-material to v9.7.7 (#27270) 2026-07-29 08:45:05 +02:00
renovate[bot] 837f3fcab4 Update dependency ruff to v0.16.0 (#27291) 2026-07-29 08:41:52 +02:00
Martijn PietersandBrent Westbrook 5539406c16 Cover pycon Markdown formatting (#27153)
## Summary

Add a section on `pycon` handling to the *Markdown code formatting*
section.

Fixes #27151

## Test Plan

- verified markdown output locally
- run `scripts/check_docs_formatted.py --generate-docs`
- run `mkdocs build --strict`
- run `mkdocs serve` and inspect the site preview

---------

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
2026-07-24 17:17:33 +00:00
Brent Westbrook a2635fd8f3 Bump 0.16.0 (#27136) 2026-07-23 14:37:34 -04:00
Brent Westbrook 2240070922 Reflect ruff: ignore and --add-ignore stabilization in documentation (#27127)
Summary
--

Follow up to #27125 and #26934 to update the docs.
2026-07-23 13:38:29 -04:00
Brent Westbrook 17ef71142c Stabilize --add-ignore (#27125)
Summary
--

This makes sense to accompany `ruff: ignore` comments being stabilized.
The preview gate has been pushed down to cover only the names vs codes
decision. I'll flag this as a comment, but I wasn't totally sure about
the LSP case. I left using `ruff: ignore` in its suppression edits
preview-gated for now.

Test Plan
--

Existing tests, dropping one that showed the preview error with
`--add-ignore`. I left `--preview` in many of the tests to continue
testing the human-readable names but removed it from one.
2026-07-23 13:38:29 -04:00
Brent Westbrook b30f040232 Stabilize new default rules (#27035)
This PR stabilizes the expanded default rule set currently in preview
and adds a new generated `Default Rules` page to the docs to avoid
needing to include a lengthy selector block in multiple places.
2026-07-23 13:38:29 -04:00
Brent Westbrook 1bb4bb0609 Stabilize Markdown formatting (#27018)
Summary
--

This PR stabilizes the Markdown formatting initially added in #22470. It
also reverts much of the
error plumbing in the LSP that was added in #24150. I considered keeping
the
`FormatResult::PreviewOnly` variant but went ahead and dropped it since
it was unused.

Closes #26866.

Test Plan
--

Updated existing snapshots, dropping `--preview` in some cases
2026-07-23 13:38:29 -04:00
Micha Reiser d96eab07b4 Insert a space after the colon in Ruff suppression comments (#27123) 2026-07-23 14:22:45 +02:00
renovate[bot] e8f6775b00 Update dependency ruff to v0.15.22 (#27064) 2026-07-22 08:07:51 +02:00
Brent Westbrook 0177a7e0d2 Bump 0.15.22 (#26884) 2026-07-16 10:54:43 -04:00
JoosboyandMahadev Annabhimoju d244fd75e9 Document argfile support (#26803)
Closes #21894 by adding a section about argfile support (using `@`) to
the configuration documentation.

---------

Co-authored-by: Mahadev Annabhimoju <219508079+Joosboy@users.noreply.github.com>
2026-07-16 10:01:32 -04:00
renovate[bot] 1659a424ce Update dependency mdformat-mkdocs to v5.2.1 (#26822) 2026-07-15 04:05:57 +00:00
renovate[bot] 80a09c8e2f Update dependency ruff to v0.15.21 (#26824) 2026-07-14 21:01:41 -07:00
Brent Westbrook 3e1f636451 Bump 0.15.21 (#26676) 2026-07-09 15:42:27 -04:00
renovate[bot] bb8c11600c Update dependency mdformat-mkdocs to v5.2.0 (#26618) 2026-07-07 20:44:41 -04:00
Brent Westbrook 63b82b0676 Add --add-ignore for adding ruff:ignore comments (#26346)
Summary
--

This PR adds the new `--add-ignore` flag. In preview, this adds
`ruff:ignore` comments with human-readable names instead of `noqa`
comments with codes. Without preview enabled, using the flag emits an
error. `--add-noqa` itself is still available in both preview and stable
mode.

In cases where an existing `noqa` or `ruff:ignore` comment is present, I
opted to preserve the
existing comment and to append the new comment. So something like this:

```py
import math  # noqa: RUF100
```

becomes:

```py
import math  # noqa: RUF100 # ruff:ignore[unused-import]
```

instead of also converting the existing `noqa` comment. I think we can
defer to one of our planned
lint rules for the conversion (and joining) instead.

As also shown in this example, the flag adds human-readable names rather
than rule codes and prefers
the same placement as a `noqa` comment, at the end of the line. The one
exception to this is an
existing `ruff:ignore` comment on its own line. In that case, we will
reuse and extend the existing
comment instead of adding an additional trailing comment, which I think
is a pretty nice balance.

Test Plan
--

Many new tests exercising the various cases Codex and I could come up
with. As the server test
shows, this actually applies to the LSP as well, where the `Disable for
this line` action now also
inserts a `ruff:ignore` comment with a rule name instead of a `noqa`
comment.

Ecosystem check
--

I also ran some tests against ecosystem projects as described in my
[comment](https://github.com/astral-sh/ruff/pull/26346#issuecomment-4801988686)
below. These revealed some additional discrepancies between
`ruff:ignore` and `noqa` (and some bugs in `noqa`/`--add-noqa` itself),
but I think it makes sense to leave these as follow-ups. I've already
opened (rough) drafts of them in:
- https://github.com/astral-sh/ruff/pull/26373
- https://github.com/astral-sh/ruff/pull/26409
- https://github.com/astral-sh/ruff/pull/26412

We could land the shebang fixes separately, but the other two are
stacked on this PR. With all three of these applied, the ecosystem check
showed parity with `--add-noqa`.

This also seems like an interesting check to add to our ecosystem
analysis in general.
2026-07-07 12:26:38 -04:00
renovate[bot] c8745834d3 Update dependency ruff to v0.15.20 (#26485) 2026-06-30 20:45:10 -04:00
ErikandMicha Reiser fa4a7bca2d ruff: Add --extend-exclude to ruff format (#26372)
Co-authored-by: Micha Reiser <micha@reiser.io>
2026-06-27 14:03:17 +00:00
Brent Westbrook f82a36b6ba Bump 0.15.20 (#26376) 2026-06-25 10:00:55 -07:00
Brent Westbrook f703f219d7 Allow human-readable names in rule selectors (#25887)
## Summary

This PR enables using rule names as selectors in preview by also
attempting to parse a selector as a human-readable name in
`UnresolvedRuleSelector::resolve`. If this succeeds and preview is
enabled, the rule is activated, and if preview is disabled you get a
custom error message.

## Test Plan

A few new CLI tests. I figured the tests from
https://github.com/astral-sh/ruff/pull/26113 cover the shared behavior
for the other selectors well enough and just focused on `select` as an
example for both the CLI and config file.
2026-06-25 08:34:26 -07:00
renovate[bot] 7527c251ab Update dependency ruff to v0.15.19 (#26294) 2026-06-24 01:42:58 +00:00
Charlie Marsh 7f0436561d Bump version to 0.15.19 (#26291) 2026-06-23 20:42:26 -04:00
Charlie Marsh dff016b7a4 Publish Ruff crates to crates.io (#26271)
## Summary

Publish Ruff's production Rust crates to crates.io as part of the
existing release workflow. This follows uv's setup: workspace
dependencies carry registry-compatible version pins, internal crates
receive generated READMEs and an explicit versioning policy, CI dry-runs
the full workspace publish, and release jobs publish missing crate
versions idempotently through crates.io trusted publishing.

The publishing set contains 32 packages: Ruff's CLI, WASM package,
server, linter, formatter, parser, and the internal Ruff component
crates required by them. It also includes `ty_module_resolver`,
`ty_site_packages`, and `ty_static`, because those three crates are part
of Ruff's normal dependency closure.

The publishing set deliberately excludes:

- Test-only crates: `mdtest`, `ruff_mdtest`,
`ruff_python_ast_integration_tests`, and
`ruff_python_trivia_integration_tests`.
- Benchmark and development crates: `ruff_benchmark` and `ruff_dev`.
- All remaining `ty_*` crates.

These packages retain `publish = false`, so bootstrap, version bumping,
README generation, CI dry-runs, and release publishing skip them through
Cargo metadata instead of a separate hard-coded allowlist.

The crates.io job is intentionally independent of release announcement,
so a crates.io outage cannot block the existing binary, PyPI, npm, or
GitHub release outputs. A bootstrap script reserves new crate names,
configures the release workflow as each crate's trusted publisher,
enables trusted-publishing-only releases, and records configured crates
for idempotent reruns.

The full workspace publish dry-run packages and verifies all 32 selected
crates.

Closes https://github.com/astral-sh/ruff/issues/43.
2026-06-23 12:49:23 -04:00
sanjibani 62ceb4e6b4 docs(editors/features): fix dead ruff preview/preview.md link (#26210) 2026-06-22 08:51:25 +00:00
sanjibani 694334c51c docs(installation): fix dead alpinelinux testing repo link (#26209) 2026-06-22 08:41:12 +00:00
Brent Westbrook 6686f63404 Bump 0.15.18 (#26135) 2026-06-18 11:07:24 -07:00
renovate[bot] b21812bca3 Update dependency ruff to v0.15.17 (#26061) 2026-06-16 20:49:30 -04:00
Brent Westbrook 7c645a9a1b Bump 0.15.17 (#25872) 2026-06-11 10:08:53 -07:00
Brent Westbrook 53f6ff7200 Allow human-readable names in suppression comments (#25614)
## Summary

I decided to start trying to break up
https://github.com/astral-sh/ruff/pull/23701, and this looked like the
easiest first piece. This PR allows using human-readable rule names in
the new `ruff:ignore` and similar suppression comments, in preview.

Rule names are still disallowed in `noqa` comments, and rule codes are
still allowed in `ruff:ignore` comments.

I also updated the suppression comment docs to prioritize human-readable
names for `ruff:ignore` and `ruff:file-ignore`, which are themselves
still in preview, and added a note about names also being supported for
the stable range suppression comments.

<hr>

I did notice one surprising property here in that a `noqa` comment with
a rule name does not emit [invalid-rule-code
(RUF102)](https://docs.astral.sh/ruff/rules/invalid-rule-code/#invalid-rule-code-ruf102),
even on main. This seems to be an artifact of our `noqa` parsing:


https://github.com/astral-sh/ruff/blob/f1d2b65af2529175c9a423ce83d57a6beaaa4c44/crates/ruff_linter/src/noqa.rs#L555-L562

that we may also want to consider updating now.

## Test Plan

New mdtests
2026-06-11 07:24:17 -07:00
renovate[bot] 8828ba9fd5 Update dependency ruff to v0.15.16 (#25795) 2026-06-09 21:22:53 -07:00
Brent Westbrook 6c498ab539 Bump 0.15.16 (#25635) 2026-06-04 09:15:41 -07:00
renovate[bot] 39a6434452 Update dependency ruff to v0.15.15 (#25568) 2026-06-02 22:20:00 -04:00
JohnKagundaandBrent Westbrook 7ef96bec9a [pydocstyle] Improve discoverability of rules enabled for each convention (#24973)
## Summary

Improves discoverability of `pydocstyle` convention-based rule filtering
by moving the authoritative documentation from the FAQ into the
`lint.pydocstyle.convention` settings reference, per #15217.
Closes #15217.

## Test Plan

Documentation-only change no functional code modifications.

Verification steps:
1. Ran `cargo dev generate-docs` to regenerate `docs/settings.md` and
`ruff.schema.json` from updated docstrings
2. Ran `cargo fmt --all` to ensure Rust formatting compliance
3. Ran `cargo clippy --workspace --all-targets --all-features -- -D
warnings` - no new warnings
4. Served docs locally with `uvx --with-requirements
docs/requirements.txt -- mkdocs serve -f mkdocs.yml` and verified:
- The `lint.pydocstyle.convention` section renders with the new content
   - The FAQ back-reference links to the settings section as intended
   
   ## Screenshots
   
   ### `/ruff/settings/#lint.pydocstyle`

<img width="1920" height="957" alt="image"
src="https://github.com/user-attachments/assets/d35e94a0-0968-43fb-bfe5-dd2821655716"
/>

### `/ruff/faq/#does-ruff-support-numpy-or-google-style-docstrings`

<img width="1920" height="952" alt="image"
src="https://github.com/user-attachments/assets/b8904757-f7c9-43c7-ac20-e0fbdb713acd"
/>

---------

Signed-off-by: RafaelJohn9 <rafaeljohb@gmail.com>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
2026-06-01 14:36:36 +00:00
Tejas AmleandClaude 042a6a1729 docs: fix typo bin/active → bin/activate in tutorial (#25473)
## Summary

Fixes a one-character typo in  (line 61).

The Linux/macOS virtual environment activation command was written as:

```
source .venv/bin/active
```

but should be:

```
source .venv/bin/activate
```

The Windows command on the same line () was already correct, making the
discrepancy easy to spot.

## How verified

The fix was verified by reading the file directly — is not a valid shell
script; the correct file installed by Python’s `venv` module is always .

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-30 09:57:12 +02:00
Brent Westbrook db5aa0a5f1 Bump 0.15.15 (#25431) 2026-05-28 06:54:03 -07:00
renovate[bot] 6aaa91ac2b Update dependency ruff to v0.15.14 (#25402) 2026-05-27 07:29:07 +01:00
Micha Reiser 305808d9ad Update configuration.md (#25396) 2026-05-26 15:58:14 +01:00