mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-12 06:38:21 +00:00
Formatter: Detect line endings (#7054)
This commit is contained in:
parent
834566f34f
commit
93ca8ebbc0
6 changed files with 32 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
|||
use thiserror::Error;
|
||||
use tracing::Level;
|
||||
|
||||
use ruff_formatter::prelude::*;
|
||||
use ruff_formatter::{format, FormatError, Formatted, PrintError, Printed, SourceCode};
|
||||
|
@ -119,6 +120,7 @@ impl From<ParseError> for FormatModuleError {
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(level=Level::TRACE, skip_all, err)]
|
||||
pub fn format_module(
|
||||
contents: &str,
|
||||
options: PyFormatOptions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue