From 045449ab12de8dbd009dddaeb50bc39f61bd70fa Mon Sep 17 00:00:00 2001 From: trag1c Date: Wed, 10 May 2023 04:27:44 +0200 Subject: [PATCH] Improved E713 & E714 code examples (#4336) --- crates/ruff/src/rules/pycodestyle/rules/not_tests.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ruff/src/rules/pycodestyle/rules/not_tests.rs b/crates/ruff/src/rules/pycodestyle/rules/not_tests.rs index dbb0fba5a4..e13dfbc112 100644 --- a/crates/ruff/src/rules/pycodestyle/rules/not_tests.rs +++ b/crates/ruff/src/rules/pycodestyle/rules/not_tests.rs @@ -22,9 +22,9 @@ use crate::rules::pycodestyle::helpers::compare; /// /// Use instead: /// ```python -/// if x not in y: +/// Z = X not in Y +/// if X.B not in Y: /// pass -/// assert X in Y or X is Z /// ``` #[violation] pub struct NotInTest; @@ -55,9 +55,9 @@ impl AlwaysAutofixableViolation for NotInTest { /// /// Use instead: /// ```python -/// if not (X in Y): +/// if X is not Y: /// pass -/// zz = x is not y +/// Z = X.B is not Y /// ``` #[violation] pub struct NotIsTest;