mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
12 lines
400 B
Rust
12 lines
400 B
Rust
use crate::{verbatim_text, FormatNodeRule, PyFormatter};
|
|
use ruff_formatter::{write, Buffer, FormatResult};
|
|
use rustpython_parser::ast::ExprCompare;
|
|
|
|
#[derive(Default)]
|
|
pub struct FormatExprCompare;
|
|
|
|
impl FormatNodeRule<ExprCompare> for FormatExprCompare {
|
|
fn fmt_fields(&self, item: &ExprCompare, f: &mut PyFormatter) -> FormatResult<()> {
|
|
write!(f, [verbatim_text(item.range)])
|
|
}
|
|
}
|