ruff_python_formatter 0.0.4

This is an internal component crate of Ruff
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use ruff_python_ast::ModExpression;

use crate::prelude::*;

#[derive(Default)]
pub struct FormatModExpression;

impl FormatNodeRule<ModExpression> for FormatModExpression {
    fn fmt_fields(&self, item: &ModExpression, f: &mut PyFormatter) -> FormatResult<()> {
        let ModExpression {
            body,
            range: _,
            node_index: _,
        } = item;
        body.format().fmt(f)
    }
}