mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 05:51:03 -05:00
## Summary format `StmtBreak` trying to learn how to help out with the formatter. starting simple ## Test Plan new snapshot test
14 lines
386 B
Rust
14 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)
|
|
}
|
|
}
|