mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 04:19:18 +00:00

## Summary format `StmtBreak` trying to learn how to help out with the formatter. starting simple ## Test Plan new snapshot test
13 lines
386 B
Rust
13 lines
386 B
Rust
use crate::{FormatNodeRule, PyFormatter};
|
|
use ruff_formatter::prelude::text;
|
|
use ruff_formatter::{Format, FormatResult};
|
|
use rustpython_parser::ast::StmtBreak;
|
|
|
|
#[derive(Default)]
|
|
pub struct FormatStmtBreak;
|
|
|
|
impl FormatNodeRule<StmtBreak> for FormatStmtBreak {
|
|
fn fmt_fields(&self, _item: &StmtBreak, f: &mut PyFormatter) -> FormatResult<()> {
|
|
text("break").fmt(f)
|
|
}
|
|
}
|