Auto-generate formatter nodes for string parts (#8837)

A follow-up to auto-generate the `FormatNodeRule` implementation for the
string part nodes. This is just a dummy implementation that is
unreachable because it's handled by the parent nodes.
This commit is contained in:
Dhruv Manilawala 2023-11-25 07:00:47 -06:00 committed by GitHub
parent 501cca8b72
commit 1dbfab9a0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 139 additions and 0 deletions

View file

@ -0,0 +1,12 @@
use ruff_python_ast::BytesLiteral;
use crate::prelude::*;
#[derive(Default)]
pub struct FormatBytesLiteral;
impl FormatNodeRule<BytesLiteral> for FormatBytesLiteral {
fn fmt_fields(&self, _item: &BytesLiteral, _f: &mut PyFormatter) -> FormatResult<()> {
unreachable!("Handled inside of `FormatExprBytesLiteral`");
}
}