ruff/crates
Douglas Creager 8e3633f55a
Auto-generate AST boilerplate (#15544)
This PR replaces most of the hard-coded AST definitions with a
generation script, similar to what happens in `rust_python_formatter`.
I've replaced every "rote" definition that I could find, where the
content is entirely boilerplate and only depends on what syntax nodes
there are and which groups they belong to.

This is a pretty massive diff, but it's entirely a refactoring. It
should make absolutely no changes to the API or implementation. In
particular, this required adding some configuration knobs that let us
override default auto-generated names where they don't line up with
types that we created previously by hand.

## Test plan

There should be no changes outside of the `rust_python_ast` crate, which
verifies that there were no API changes as a result of the
auto-generation. Aggressive `cargo clippy` and `uvx pre-commit` runs
after each commit in the branch.

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-01-17 14:23:02 -05:00
..
red_knot Add support for configuring knot in `pyproject.toml` files (#15493) 2025-01-17 09:41:06 +01:00
red_knot_python_semantic [red-knot] Inline `SubclassOfType::as_instance_type_of_metaclass()` (#15556) 2025-01-17 19:01:36 +00:00
red_knot_server Add support for configuring knot in `pyproject.toml` files (#15493) 2025-01-17 09:41:06 +01:00
red_knot_test Add support for configuring knot in `pyproject.toml` files (#15493) 2025-01-17 09:41:06 +01:00
red_knot_vendored Auto-generate AST boilerplate (#15544) 2025-01-17 14:23:02 -05:00
red_knot_wasm Add support for configuring knot in `pyproject.toml` files (#15493) 2025-01-17 09:41:06 +01:00
red_knot_workspace Support `knot.toml` files in project discovery (#15505) 2025-01-17 09:01:58 +00:00
ruff Auto-generate AST boilerplate (#15544) 2025-01-17 14:23:02 -05:00
ruff_annotate_snippets ruff_annotate_snippets: support overriding the "cut indicator" 2025-01-15 13:37:52 -05:00
ruff_benchmark Add support for configuring knot in `pyproject.toml` files (#15493) 2025-01-17 09:41:06 +01:00
ruff_cache Fix cache key collisions for paths with separators (#12159) 2024-07-03 07:36:46 -05:00
ruff_db Remove workspace support (#15472) 2025-01-15 09:03:38 +01:00
ruff_dev Alternate quotes for strings inside f-strings in preview (#13860) 2024-10-23 07:57:53 +02:00
ruff_diagnostics Show errors for attempted fixes only when passed `--verbose` (#15237) 2025-01-03 08:50:13 -06:00
ruff_formatter Upgrade Rust toolchain to 1.84.0 (#15408) 2025-01-11 09:51:58 +01:00
ruff_graph Add support for configuring knot in `pyproject.toml` files (#15493) 2025-01-17 09:41:06 +01:00
ruff_index [red-knot] small efficiency improvements and bugfixes to use-def map building (#12373) 2024-07-18 09:24:58 -07:00
ruff_linter [`flake8-comprehensions`] strip parentheses around generators in `unnecessary-generator-set` (`C401`) (#15553) 2025-01-17 18:08:22 +01:00
ruff_macros Add support for configuring knot in `pyproject.toml` files (#15493) 2025-01-17 09:41:06 +01:00
ruff_notebook Bump MSRV to Rust 1.80 (#13826) 2024-10-20 10:55:36 +02:00
ruff_python_ast Auto-generate AST boilerplate (#15544) 2025-01-17 14:23:02 -05:00
ruff_python_ast_integration_tests Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_python_codegen ruff_python_ast: Make `Singleton` `Copy` (#14943) 2024-12-12 20:49:54 +01:00
ruff_python_formatter Auto-generate AST boilerplate (#15544) 2025-01-17 14:23:02 -05:00
ruff_python_index Extract `LineIndex` independent methods from `Locator` (#13938) 2024-10-28 07:53:41 +00:00
ruff_python_literal Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_python_parser Parse triple quoted string annotations as if parenthesized (#15387) 2025-01-16 11:38:15 +05:30
ruff_python_resolver Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_python_semantic [`unconventional-import-alias`] Fix infinite loop between ICN001 and I002 (`ICN001`) (#15480) 2025-01-16 10:45:24 -05:00
ruff_python_stdlib Revert "Add all PEP-585 names to UP006 rule" (#15250) 2025-01-04 12:23:53 +01:00
ruff_python_trivia `type: ignore[codes]` and `knot: ignore` (#15078) 2024-12-23 10:52:43 +01:00
ruff_python_trivia_integration_tests Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_server Avoid indexing the same workspace multiple times (#15495) 2025-01-15 18:58:28 +05:30
ruff_source_file [`pyupgrade`] Do not report when a UTF-8 comment is followed by a non-UTF-8 one (`UP009`) (#14728) 2024-12-11 10:30:41 +00:00
ruff_text_size [`ruff`] `itertools.starmap(..., zip(...))` (`RUF058`) (#15483) 2025-01-16 15:18:12 +01:00
ruff_wasm Bump version to 0.9.2 (#15529) 2025-01-16 13:07:26 +00:00
ruff_workspace [`pydoclint`] Allow ignoring one line docstrings for `DOC` rules (#13302) 2025-01-16 16:05:10 -06:00