mirror of https://github.com/astral-sh/ruff
466 B
466 B
Rust Python Formatter
For the formatter, we would like to implement Format from the rust_formatter crate for all AST
nodes, defined in the rustpython_parser crate. This violates rust's orphan rules. We therefore
generate in generate.py a newtype for each AST node with implementations of FormatNodeRule,
FormatRule, AsFormat and IntoFormat on it.