mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-15 08:00:19 +00:00
Add PreviewMode option to formatter
## Summary This PR adds the `--preview` and `--no-preview` options to the `format` command (hidden) and passes it through to the formatte. ## Test Plan I added the `dbg(f.options().preview())` statement in `FormatNodeRule::fmt` and verified that the option gets correctly passed to the formatter.
This commit is contained in:
parent
d9544a2d37
commit
47a253fb62
7 changed files with 54 additions and 7 deletions
|
@ -14,7 +14,7 @@ use crate::comments::{
|
|||
dangling_comments, leading_comments, trailing_comments, Comments, SourceComment,
|
||||
};
|
||||
pub use crate::context::PyFormatContext;
|
||||
pub use crate::options::{MagicTrailingComma, PyFormatOptions, QuoteStyle};
|
||||
pub use crate::options::{MagicTrailingComma, PreviewMode, PyFormatOptions, QuoteStyle};
|
||||
use crate::verbatim::suppressed_node;
|
||||
|
||||
pub(crate) mod builders;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue