mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:55:08 +00:00
15 lines
412 B
Rust
15 lines
412 B
Rust
use ruff_python_ast::BytesLiteral;
|
|
|
|
use crate::prelude::*;
|
|
use crate::string::StringNormalizer;
|
|
|
|
#[derive(Default)]
|
|
pub struct FormatBytesLiteral;
|
|
|
|
impl FormatNodeRule<BytesLiteral> for FormatBytesLiteral {
|
|
fn fmt_fields(&self, item: &BytesLiteral, f: &mut PyFormatter) -> FormatResult<()> {
|
|
StringNormalizer::from_context(f.context())
|
|
.normalize(item.into())
|
|
.fmt(f)
|
|
}
|
|
}
|