mirror of
https://github.com/astral-sh/ruff
synced 2026-01-07 14:44:17 -05:00
16 lines
415 B
Rust
16 lines
415 B
Rust
use ruff_python_ast::StmtBreak;
|
|
|
|
use crate::prelude::*;
|
|
|
|
#[derive(Default)]
|
|
pub struct FormatStmtBreak;
|
|
|
|
impl FormatNodeRule<StmtBreak> for FormatStmtBreak {
|
|
fn fmt_fields(&self, _item: &StmtBreak, f: &mut PyFormatter) -> FormatResult<()> {
|
|
token("break").fmt(f)
|
|
}
|
|
fn is_suppressed(&self, node: &StmtBreak, context: &PyFormatContext) -> bool {
|
|
context.is_suppressed(node.into())
|
|
}
|
|
}
|