mirror of
https://github.com/astral-sh/ruff
synced 2026-01-10 16:15:19 -05:00
[red-knot] Add 'Format document' to playground (#17217)
## Summary This is more "because we can" than something we need. But since we're already building an "almost IDE" ## Test Plan https://github.com/user-attachments/assets/3a4bdad1-ba32-455a-9909-cfeb8caa1b28
This commit is contained in:
9
crates/ruff_python_formatter/src/db.rs
Normal file
9
crates/ruff_python_formatter/src/db.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use ruff_db::{files::File, Db as SourceDb, Upcast};
|
||||
|
||||
use crate::PyFormatOptions;
|
||||
|
||||
#[salsa::db]
|
||||
pub trait Db: SourceDb + Upcast<dyn SourceDb> {
|
||||
/// Returns the formatting options
|
||||
fn format_options(&self, file: File) -> PyFormatOptions;
|
||||
}
|
||||
Reference in New Issue
Block a user