diff --git a/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__ruff_test__statement__while_py.snap b/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__ruff_test__statement__while_py.snap index fd9f812cda57ea..804cc9303c8d9d 100644 --- a/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__ruff_test__statement__while_py.snap +++ b/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__ruff_test__statement__while_py.snap @@ -41,14 +41,14 @@ while ( ## Output ```py while 34: # trailing test comment - NOT_YET_IMPLEMENTED_StmtPass # trailing last statement comment + pass # trailing last statement comment # trailing while body comment # leading else comment else: # trailing else comment - NOT_YET_IMPLEMENTED_StmtPass + pass # trailing else body comment @@ -56,7 +56,7 @@ else: # trailing else comment while ( aVeryLongConditionThatSpillsOverToTheNextLineBecauseItIsExtremelyLongAndGoesOnAndOnAndOnAndOnAndOnAndOnAndOnAndOnAndOn ): # trailing comment - NOT_YET_IMPLEMENTED_StmtPass + pass else: ... diff --git a/crates/ruff_python_formatter/src/statement/stmt_pass.rs b/crates/ruff_python_formatter/src/statement/stmt_pass.rs index f8a04e01632c3a..0f324233b2c59b 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_pass.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_pass.rs @@ -1,12 +1,13 @@ -use crate::{not_yet_implemented, FormatNodeRule, PyFormatter}; -use ruff_formatter::{write, Buffer, FormatResult}; +use crate::{FormatNodeRule, PyFormatter}; +use ruff_formatter::prelude::text; +use ruff_formatter::{Format, FormatResult}; use rustpython_parser::ast::StmtPass; #[derive(Default)] pub struct FormatStmtPass; impl FormatNodeRule for FormatStmtPass { - fn fmt_fields(&self, item: &StmtPass, f: &mut PyFormatter) -> FormatResult<()> { - write!(f, [not_yet_implemented(item)]) + fn fmt_fields(&self, _item: &StmtPass, f: &mut PyFormatter) -> FormatResult<()> { + text("pass").fmt(f) } }