From 90a642ad87d3f6cf195666f1ce6a13427c0e025e Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 29 Jan 2024 12:26:32 -0500 Subject: [PATCH] Add fix safety note for duplicate-parameterize-test-cases --- .../src/rules/flake8_pytest_style/rules/parametrize.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs b/crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs index 0f5a621f01eac..4ff975393b38a 100644 --- a/crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs +++ b/crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs @@ -226,6 +226,10 @@ impl Violation for PytestParametrizeValuesWrongType { /// ... /// ``` /// +/// ## Fix safety +/// This rule's fix is marked as unsafe, as tests that rely on mutable global +/// state may be affected by removing duplicate test cases. +/// /// ## References /// - [`pytest` documentation: How to parametrize fixtures and test functions](https://docs.pytest.org/en/latest/how-to/parametrize.html#pytest-mark-parametrize) #[violation]