[ruff] Add fix safety section (RUF028) (#17722)

The PR add the fix safety section for rule `RUF028`
(https://github.com/astral-sh/ruff/issues/15584 )

See also
[here](https://github.com/astral-sh/ruff/issues/15584#issuecomment-2820424485)
for the reason behind the _unsafe_ of the fix.
This commit is contained in:
Vasco Schiavo 2025-04-30 21:06:25 +02:00 committed by GitHub
parent 0eeb02c0c1
commit c5e41c278c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,6 +49,12 @@ use super::suppression_comment_visitor::{
/// # fmt: on
/// # yapf: enable
/// ```
///
/// ## Fix safety
///
/// This fix is always marked as unsafe because it deletes the invalid suppression comment,
/// rather than trying to move it to a valid position, which the user more likely intended.
///
#[derive(ViolationMetadata)]
pub(crate) struct InvalidFormatterSuppressionComment {
reason: IgnoredReason,