mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 20:42:10 +00:00
21 lines
575 B
Rust
21 lines
575 B
Rust
use ruff_python_ast::StmtContinue;
|
|
|
|
use crate::comments::{SourceComment, SuppressionKind};
|
|
use crate::prelude::*;
|
|
|
|
#[derive(Default)]
|
|
pub struct FormatStmtContinue;
|
|
|
|
impl FormatNodeRule<StmtContinue> for FormatStmtContinue {
|
|
fn fmt_fields(&self, _item: &StmtContinue, f: &mut PyFormatter) -> FormatResult<()> {
|
|
token("continue").fmt(f)
|
|
}
|
|
|
|
fn is_suppressed(
|
|
&self,
|
|
trailing_comments: &[SourceComment],
|
|
context: &PyFormatContext,
|
|
) -> bool {
|
|
SuppressionKind::has_skip_comment(trailing_comments, context.source())
|
|
}
|
|
}
|