From b0d475f3533b2ebbaa37ee8fc9c609c70ccd0fd8 Mon Sep 17 00:00:00 2001 From: Vasco Schiavo <115561717+VascoSch92@users.noreply.github.com> Date: Sat, 26 Apr 2025 23:43:53 +0200 Subject: [PATCH] [`ruff`] add fix safety section (`RUF027`) (#17485) The PR add the `fix safety` section for rule `RUF027` (#15584 ). Actually, I have an example of a false positive. Should I include it in the` fix safety` section? --------- Co-authored-by: Dylan --- .../src/rules/ruff/rules/missing_fstring_syntax.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ruff_linter/src/rules/ruff/rules/missing_fstring_syntax.rs b/crates/ruff_linter/src/rules/ruff/rules/missing_fstring_syntax.rs index c44bd2cb8a..f39b3c2b8f 100644 --- a/crates/ruff_linter/src/rules/ruff/rules/missing_fstring_syntax.rs +++ b/crates/ruff_linter/src/rules/ruff/rules/missing_fstring_syntax.rs @@ -53,6 +53,11 @@ use crate::Locator; /// print(f"Hello {name}! It is {day_of_week} today!") /// ``` /// +/// ## Fix safety +/// +/// This fix will always change the behavior of the program and, despite the precautions detailed +/// above, this may be undesired. As such the fix is always marked as unsafe. +/// /// [logging]: https://docs.python.org/3/howto/logging-cookbook.html#using-particular-formatting-styles-throughout-your-application /// [gettext]: https://docs.python.org/3/library/gettext.html /// [FastAPI path]: https://fastapi.tiangolo.com/tutorial/path-params/