From fb126f3fd069160d44ba3930cf13f3c862e1929e Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 2 Oct 2024 14:48:13 +0200 Subject: [PATCH] Apply ruff/Pyflakes preview rule F841 F841 Local variable is assigned to but never used --- codespell_lib/tests/test_basic.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/codespell_lib/tests/test_basic.py b/codespell_lib/tests/test_basic.py index f67964cb92..69aac176f5 100644 --- a/codespell_lib/tests/test_basic.py +++ b/codespell_lib/tests/test_basic.py @@ -217,12 +217,12 @@ def test_permission_error( fname.write_text("abandonned\n") result = cs.main(fname, std=True) assert isinstance(result, tuple) - code, _, stderr = result + _, _, stderr = result assert "WARNING:" not in stderr fname.chmod(0o000) result = cs.main(fname, std=True) assert isinstance(result, tuple) - code, _, stderr = result + _, _, stderr = result assert "WARNING:" in stderr @@ -772,7 +772,7 @@ def _helper_test_case_handling_in_fixes( fname.write_text("early adoptor\n") result = cs.main("-D", dictionary_name, fname, std=True) assert isinstance(result, tuple) - code, stdout, _ = result + _, stdout, _ = result # all suggested fixes must be lowercase too assert "adopter, adaptor" in stdout # the reason, if any, must not be modified @@ -783,7 +783,7 @@ def _helper_test_case_handling_in_fixes( fname.write_text("Early Adoptor\n") result = cs.main("-D", dictionary_name, fname, std=True) assert isinstance(result, tuple) - code, stdout, _ = result + _, stdout, _ = result # all suggested fixes must be capitalized too assert "Adopter, Adaptor" in stdout # the reason, if any, must not be modified @@ -794,7 +794,7 @@ def _helper_test_case_handling_in_fixes( fname.write_text("EARLY ADOPTOR\n") result = cs.main("-D", dictionary_name, fname, std=True) assert isinstance(result, tuple) - code, stdout, _ = result + _, stdout, _ = result # all suggested fixes must be uppercase too assert "ADOPTER, ADAPTOR" in stdout # the reason, if any, must not be modified @@ -805,7 +805,7 @@ def _helper_test_case_handling_in_fixes( fname.write_text("EaRlY AdOpToR\n") result = cs.main("-D", dictionary_name, fname, std=True) assert isinstance(result, tuple) - code, stdout, _ = result + _, stdout, _ = result # all suggested fixes should be lowercase assert "adopter, adaptor" in stdout # the reason, if any, must not be modified