diff --git a/crates/ruff_linter/src/rules/flake8_bugbear/mod.rs b/crates/ruff_linter/src/rules/flake8_bugbear/mod.rs index 163d1758724d0..3e953d2f907a2 100644 --- a/crates/ruff_linter/src/rules/flake8_bugbear/mod.rs +++ b/crates/ruff_linter/src/rules/flake8_bugbear/mod.rs @@ -73,6 +73,7 @@ mod tests { #[test_case(Rule::LoopIteratorMutation, Path::new("B909.py"))] #[test_case(Rule::MutableContextvarDefault, Path::new("B039.py"))] #[test_case(Rule::BatchedWithoutExplicitStrict, Path::new("B911.py"))] + #[test_case(Rule::MapWithoutExplicitStrict, Path::new("B912.py"))] fn rules(rule_code: Rule, path: &Path) -> Result<()> { let snapshot = format!("{}_{}", rule_code.noqa_code(), path.to_string_lossy()); let diagnostics = test_path( @@ -83,7 +84,6 @@ mod tests { Ok(()) } - #[test_case(Rule::MapWithoutExplicitStrict, Path::new("B912.py"))] #[test_case(Rule::MutableArgumentDefault, Path::new("B006_1.py"))] #[test_case(Rule::MutableArgumentDefault, Path::new("B006_2.py"))] #[test_case(Rule::MutableArgumentDefault, Path::new("B006_3.py"))] diff --git a/crates/ruff_linter/src/rules/flake8_bugbear/rules/map_without_explicit_strict.rs b/crates/ruff_linter/src/rules/flake8_bugbear/rules/map_without_explicit_strict.rs index 04e9640e09f97..a8b2ad601ce85 100644 --- a/crates/ruff_linter/src/rules/flake8_bugbear/rules/map_without_explicit_strict.rs +++ b/crates/ruff_linter/src/rules/flake8_bugbear/rules/map_without_explicit_strict.rs @@ -9,10 +9,11 @@ use crate::rules::flake8_bugbear::helpers::any_infinite_iterables; use crate::{AlwaysFixableViolation, Applicability, Fix}; /// ## What it does -/// Checks for `map` calls without an explicit `strict` parameter when called with two or more iterables, or any starred argument. +/// Checks for `map` calls without an explicit `strict` parameter when called with two or more +/// iterables, or any starred argument. /// /// This rule applies to Python 3.14 and later, where `map` accepts a `strict` keyword -/// argument. For details, see: [What’s New in Python 3.14](https://docs.python.org/dev/whatsnew/3.14.html). +/// argument. For details, see: [What’s New in Python 3.14]. /// /// ## Why is this bad? /// By default, if the iterables passed to `map` are of different lengths, the @@ -41,9 +42,11 @@ use crate::{AlwaysFixableViolation, Applicability, Fix}; /// /// ## References /// - [Python documentation: `map`](https://docs.python.org/3/library/functions.html#map) -/// - [What’s New in Python 3.14](https://docs.python.org/dev/whatsnew/3.14.html) +/// - [What’s New in Python 3.14] +/// +/// [What's New in Python 3.14]: https://docs.python.org/dev/whatsnew/3.14.html #[derive(ViolationMetadata)] -#[violation_metadata(preview_since = "0.13.2")] +#[violation_metadata(stable_since = "0.15.0")] pub(crate) struct MapWithoutExplicitStrict; impl AlwaysFixableViolation for MapWithoutExplicitStrict { diff --git a/crates/ruff_linter/src/rules/flake8_bugbear/snapshots/ruff_linter__rules__flake8_bugbear__tests__preview__B912_B912.py.snap b/crates/ruff_linter/src/rules/flake8_bugbear/snapshots/ruff_linter__rules__flake8_bugbear__tests__B912_B912.py.snap similarity index 100% rename from crates/ruff_linter/src/rules/flake8_bugbear/snapshots/ruff_linter__rules__flake8_bugbear__tests__preview__B912_B912.py.snap rename to crates/ruff_linter/src/rules/flake8_bugbear/snapshots/ruff_linter__rules__flake8_bugbear__tests__B912_B912.py.snap