mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00

<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary Format `continue` statement. ## Test Plan `continue` is used already in some tests, but if a new test is needed I could add it. --------- Co-authored-by: konstin <konstin@mailbox.org>
13 lines
404 B
Rust
13 lines
404 B
Rust
use crate::{FormatNodeRule, PyFormatter};
|
|
use ruff_formatter::prelude::text;
|
|
use ruff_formatter::{Format, FormatResult};
|
|
use rustpython_parser::ast::StmtContinue;
|
|
|
|
#[derive(Default)]
|
|
pub struct FormatStmtContinue;
|
|
|
|
impl FormatNodeRule<StmtContinue> for FormatStmtContinue {
|
|
fn fmt_fields(&self, _item: &StmtContinue, f: &mut PyFormatter) -> FormatResult<()> {
|
|
text("continue").fmt(f)
|
|
}
|
|
}
|