Introduce FormatterSettings (#7545)

This commit is contained in:
Micha Reiser 2023-09-21 08:01:24 +02:00 committed by GitHub
parent 87a0cd219f
commit f8f1cd5016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 159 additions and 75 deletions

View file

@ -1,4 +1,5 @@
use crate::{FormatOptions, IndentStyle, IndentWidth, LineWidth};
use ruff_macros::CacheKey;
/// Options that affect how the [`crate::Printer`] prints the format tokens
#[derive(Clone, Debug, Eq, PartialEq, Default)]
@ -120,7 +121,7 @@ impl SourceMapGeneration {
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Default)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Default, CacheKey)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum LineEnding {
/// Line Feed only (\n), common on Linux and macOS as well as inside git repos