Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
harupy committed Aug 10, 2023
1 parent b658213 commit f46c2a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/ruff/src/rules/flake8_pytest_style/rules/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ use ruff_python_ast::{self as ast, Expr, Parameters, Ranged};
///
/// ## Example
/// def test_foo(mocker):
/// mocker.patch('module.target', lambda x, y: 7)
/// mocker.patch("module.target", lambda x, y: 7)
/// ```
///
/// Use instead:
/// ```python
/// def test_foo(mocker):
/// mocker.patch('module.target', return_value=7)
/// mocker.patch("module.target", return_value=7)
/// # if lambda parameters are used, it's not a violation
/// mocker.patch('module.other_target', lambda x, y: x)
/// mocker.patch("module.other_target", lambda x, y: x)
/// ```
///
/// ## References
Expand Down

0 comments on commit f46c2a1

Please sign in to comment.