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