dprint-plugin-ruff 0.0.1

Python formatter for dprint via Ruff.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::Path;

use crate::configuration::Configuration;
use anyhow::Result;
// use ruff_python_formatter::format_module_source;
// use ruff_python_formatter::PyFormatOptions;

pub fn format_text(_file_path: &Path, input_text: &str, config: &Configuration) -> Result<Option<String>> {
  // let options = PyFormatOptions::default();
  // let printed = format_module_source(input_text, options)?;
  // let code = printed.into_code();
  // if code == input_text {
  //   Ok(None)
  // } else {
  //   Ok(Some(code))
  // }
  Ok(None)
}