This commit is contained in:
Hans 2025-12-16 17:02:47 -05:00 committed by GitHub
commit 12ea9c982a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 21 additions and 0 deletions

View File

@ -47,6 +47,13 @@ use crate::{Edit, Fix, FixAvailability, Violation};
/// raise RuntimeError(msg) /// raise RuntimeError(msg)
/// RuntimeError: 'Some value' is incorrect /// RuntimeError: 'Some value' is incorrect
/// ``` /// ```
///
/// ## Fix safety
/// This fix is marked as unsafe because:
/// - Comments associated with the exception argument may not be reliably matched
/// to their original code positions after the fix is applied.
/// - The introduced `msg` variable may shadow an existing variable in the same
/// scope, potentially changing program behavior.
#[derive(ViolationMetadata)] #[derive(ViolationMetadata)]
#[violation_metadata(stable_since = "v0.0.183")] #[violation_metadata(stable_since = "v0.0.183")]
pub(crate) struct RawStringInException; pub(crate) struct RawStringInException;
@ -103,6 +110,13 @@ impl Violation for RawStringInException {
/// raise RuntimeError(msg) /// raise RuntimeError(msg)
/// RuntimeError: 'Some value' is incorrect /// RuntimeError: 'Some value' is incorrect
/// ``` /// ```
///
/// ## Fix safety
/// This fix is marked as unsafe because:
/// - Comments associated with the exception argument may not be reliably matched
/// to their original code positions after the fix is applied.
/// - The introduced `msg` variable may shadow an existing variable in the same
/// scope, potentially changing program behavior.
#[derive(ViolationMetadata)] #[derive(ViolationMetadata)]
#[violation_metadata(stable_since = "v0.0.183")] #[violation_metadata(stable_since = "v0.0.183")]
pub(crate) struct FStringInException; pub(crate) struct FStringInException;
@ -160,6 +174,13 @@ impl Violation for FStringInException {
/// raise RuntimeError(msg) /// raise RuntimeError(msg)
/// RuntimeError: 'Some value' is incorrect /// RuntimeError: 'Some value' is incorrect
/// ``` /// ```
///
/// ## Fix safety
/// This fix is marked as unsafe because:
/// - Comments associated with the exception argument may not be reliably matched
/// to their original code positions after the fix is applied.
/// - The introduced `msg` variable may shadow an existing variable in the same
/// scope, potentially changing program behavior.
#[derive(ViolationMetadata)] #[derive(ViolationMetadata)]
#[violation_metadata(stable_since = "v0.0.183")] #[violation_metadata(stable_since = "v0.0.183")]
pub(crate) struct DotFormatInException; pub(crate) struct DotFormatInException;