dprint_plugin_ruff/
format_text.rs

1use std::path::Path;
2
3use crate::configuration::Configuration;
4use anyhow::Result;
5// use ruff_python_formatter::format_module_source;
6// use ruff_python_formatter::PyFormatOptions;
7
8pub fn format_text(_file_path: &Path, input_text: &str, config: &Configuration) -> Result<Option<String>> {
9  // let options = PyFormatOptions::default();
10  // let printed = format_module_source(input_text, options)?;
11  // let code = printed.into_code();
12  // if code == input_text {
13  //   Ok(None)
14  // } else {
15  //   Ok(Some(code))
16  // }
17  Ok(None)
18}