From 1e1089dcc4aa3c8964dcb5f6a871d15960cff1c0 Mon Sep 17 00:00:00 2001 From: kiblik <5609770+kiblik@users.noreply.github.com> Date: Tue, 5 Nov 2024 09:29:16 +0100 Subject: [PATCH] Ruff: Add and "fix" S106 --- ruff.toml | 2 +- unittests/test_user_validators.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruff.toml b/ruff.toml index 3a360f4989..8f00844a94 100644 --- a/ruff.toml +++ b/ruff.toml @@ -41,7 +41,7 @@ select = [ "UP", "YTT", "ASYNC", - "S2", "S5", "S7", "S101", "S104", "S105", "S112", "S311", + "S2", "S5", "S7", "S101", "S104", "S105", "S106", "S112", "S311", "FBT001", "FBT003", "A003", "A004", "A006", "COM", diff --git a/unittests/test_user_validators.py b/unittests/test_user_validators.py index 2fd8afbbd7..8044202c07 100644 --- a/unittests/test_user_validators.py +++ b/unittests/test_user_validators.py @@ -142,7 +142,7 @@ def test_validator_non_common_password_required(self): def test_form_invalid_current_pass(self): self.set_policy() - form = self.form_test("x", current_password="not current password") + form = self.form_test("x", current_password="not current password") # noqa: S106 self.assertFalse(form.is_valid()) self.assertEqual( form.errors["__all__"][0], @@ -158,6 +158,6 @@ def test_form_same_pass_as_before(self): def test_form_diff_confirm_password(self): self.set_policy() - form = self.form_test(password="x", confirm_password="y") + form = self.form_test(password="x", confirm_password="y") # noqa: S106 self.assertFalse(form.is_valid()) self.assertEqual(form.errors["__all__"][0], "Passwords do not match.")