Skip to content

Commit

Permalink
Apply ruff/Pyflakes preview rule F841
Browse files Browse the repository at this point in the history
F841 Local variable is assigned to but never used
  • Loading branch information
DimitriPapadopoulos committed Oct 2, 2024
1 parent e44ea69 commit fb126f3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions codespell_lib/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fb126f3

Please sign in to comment.