Support fmt: skip for simple-statements and decorators (#6561)

This commit is contained in:
Micha Reiser 2023-08-17 07:58:19 +02:00 committed by GitHub
parent e3ecbe660e
commit 4dc32a00d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 545 additions and 316 deletions

View file

@ -1,7 +1,8 @@
use crate::prelude::*;
use ruff_formatter::{FormatOwnedWithRule, FormatRefWithRule};
use ruff_python_ast::Stmt;
use crate::prelude::*;
pub(crate) mod stmt_ann_assign;
pub(crate) mod stmt_assert;
pub(crate) mod stmt_assign;
@ -59,7 +60,7 @@ impl FormatRule<Stmt, PyFormatContext<'_>> for FormatStmt {
Stmt::Break(x) => x.format().fmt(f),
Stmt::Continue(x) => x.format().fmt(f),
Stmt::TypeAlias(x) => x.format().fmt(f),
Stmt::IpyEscapeCommand(_) => todo!(),
Stmt::IpyEscapeCommand(x) => x.format().fmt(f),
}
}
}