diff --git a/crates/ruff_linter/src/rules/flake8_bugbear/rules/mutable_argument_default.rs b/crates/ruff_linter/src/rules/flake8_bugbear/rules/mutable_argument_default.rs index b5a7effc28..c5e1b38969 100644 --- a/crates/ruff_linter/src/rules/flake8_bugbear/rules/mutable_argument_default.rs +++ b/crates/ruff_linter/src/rules/flake8_bugbear/rules/mutable_argument_default.rs @@ -68,6 +68,12 @@ use crate::{Edit, Fix, FixAvailability, Violation}; /// ## Options /// - `lint.flake8-bugbear.extend-immutable-calls` /// +/// ## Fix safety +/// +/// This fix is marked as unsafe because it replaces the mutable default with `None` +/// and initializes it in the function body, which may not be what the user intended, +/// as described above. +/// /// ## References /// - [Python documentation: Default Argument Values](https://docs.python.org/3/tutorial/controlflow.html#default-argument-values) #[derive(ViolationMetadata)]