From cbd927f3463e1de4b664103b2cc70d5e67486e0e Mon Sep 17 00:00:00 2001 From: Eero Vaher Date: Wed, 6 Mar 2024 16:47:14 +0100 Subject: [PATCH] Make rule PT012 example clearer (#10248) --- .../src/rules/flake8_pytest_style/rules/raises.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ruff_linter/src/rules/flake8_pytest_style/rules/raises.rs b/crates/ruff_linter/src/rules/flake8_pytest_style/rules/raises.rs index ea40496c30..96c76a2f8b 100644 --- a/crates/ruff_linter/src/rules/flake8_pytest_style/rules/raises.rs +++ b/crates/ruff_linter/src/rules/flake8_pytest_style/rules/raises.rs @@ -26,8 +26,8 @@ use super::helpers::is_empty_or_null_string; /// /// def test_foo(): /// with pytest.raises(MyError): -/// setup() # may raise `MyError` -/// func_to_test() +/// setup() +/// func_to_test() # not executed if `setup()` raises `MyError` /// assert foo() # not executed /// ``` /// @@ -38,7 +38,7 @@ use super::helpers::is_empty_or_null_string; /// /// def test_foo(): /// setup() -/// with pytest.raises(MyException): +/// with pytest.raises(MyError): /// func_to_test() /// assert foo() /// ```