Skip to content

Commit ea29396

Browse files
committed
Bump ruff to 0.13.0
1 parent 1920388 commit ea29396

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Homepage = "https://github.com/testing-cabal/testtools"
3434
[project.optional-dependencies]
3535
test = ["testscenarios", "testresources"]
3636
twisted = ["Twisted", "fixtures"]
37-
dev = ["ruff==0.12.11"]
37+
dev = ["ruff==0.13.0"]
3838

3939
[tool.hatch.version]
4040
source = "vcs"

testtools/tests/test_assert_that.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def get_error_string(self, e):
115115
break
116116
error = "".join(lines[i:])
117117
# We aren't interested in how the exception type is formatted.
118-
exc_class, error = error.split(": ", 1)
118+
_exc_class, error = error.split(": ", 1)
119119
return error
120120

121121
def test_assertThat_verbose_unicode(self):

testtools/tests/test_content.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def test_postfix_content(self):
246246
self.assertEqual(expected, actual)
247247

248248
def test___init___sets_content_type(self):
249-
stack_lines, expected = self._get_stack_line_and_expected_output()
249+
stack_lines, _expected = self._get_stack_line_and_expected_output()
250250
content = StackLinesContent(stack_lines)
251251
expected_content_type = ContentType(
252252
"text", "x-traceback", {"language": "python", "charset": "utf8"}

testtools/tests/test_testcase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ def get_error_string(self, e):
802802
break
803803
error = "".join(lines[i:])
804804
# We aren't interested in how the exception type is formatted.
805-
exc_class, error = error.split(": ", 1)
805+
_exc_class, error = error.split(": ", 1)
806806
return error
807807

808808
def test_assertThat_verbose_unicode(self):

testtools/tests/test_testresult.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2574,7 +2574,7 @@ def check_outcome_details_to_exec_info(self, outcome, expected=None):
25742574
# of the text types in the details dict.
25752575
if not expected:
25762576
expected = outcome
2577-
details, err_str = self.get_details_and_string()
2577+
details, _err_str = self.get_details_and_string()
25782578
getattr(self.converter, outcome)(self, details=details)
25792579
err = self.converter._details_to_exc_info(details)
25802580
self.assertEqual([(expected, self, err)], self.result._events)
@@ -3079,7 +3079,7 @@ def test_syntax_error_malformed(self):
30793079

30803080
def test_syntax_error_line_iso_8859_1(self):
30813081
"""Syntax error on a latin-1 line shows the line decoded"""
3082-
text, raw = self._get_sample_text("iso-8859-1")
3082+
text, _raw = self._get_sample_text("iso-8859-1")
30833083
textoutput = self._setup_external_case("import bad")
30843084
self._write_module(
30853085
"bad", "iso-8859-1", f"# coding: iso-8859-1\n! = 0 # {text}\n"
@@ -3095,7 +3095,7 @@ def test_syntax_error_line_iso_8859_1(self):
30953095

30963096
def test_syntax_error_line_iso_8859_5(self):
30973097
"""Syntax error on a iso-8859-5 line shows the line decoded"""
3098-
text, raw = self._get_sample_text("iso-8859-5")
3098+
text, _raw = self._get_sample_text("iso-8859-5")
30993099
textoutput = self._setup_external_case("import bad")
31003100
self._write_module(
31013101
"bad", "iso-8859-5", f"# coding: iso-8859-5\n% = 0 # {text}\n"
@@ -3118,7 +3118,7 @@ def test_syntax_error_line_iso_8859_5(self):
31183118

31193119
def test_syntax_error_line_euc_jp(self):
31203120
"""Syntax error on a euc_jp line shows the line decoded"""
3121-
text, raw = self._get_sample_text("euc_jp")
3121+
text, _raw = self._get_sample_text("euc_jp")
31223122
textoutput = self._setup_external_case("import bad")
31233123
self._write_module("bad", "euc_jp", f"# coding: euc_jp\n$ = 0 # {text}\n")
31243124
textoutput = self._run_external_case()
@@ -3139,7 +3139,7 @@ def test_syntax_error_line_euc_jp(self):
31393139

31403140
def test_syntax_error_line_utf_8(self):
31413141
"""Syntax error on a utf-8 line shows the line decoded"""
3142-
text, raw = self._get_sample_text("utf-8")
3142+
text, _raw = self._get_sample_text("utf-8")
31433143
textoutput = self._setup_external_case("import bad")
31443144
self._write_module("bad", "utf-8", f"\ufeff^ = 0 # {text}\n")
31453145
textoutput = self._run_external_case()

testtools/tests/twistedsupport/test_runtest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ def test_something(self):
817817

818818
def test_restore_observers(self):
819819
# We restore the original observers.
820-
publisher, observers = _get_global_publisher_and_observers()
820+
_publisher, observers = _get_global_publisher_and_observers()
821821

822822
class LogSomething(TestCase):
823823
def test_something(self):
@@ -831,7 +831,7 @@ def test_something(self):
831831

832832
def test_restore_observers_after_timeout(self):
833833
# We restore the original observers even if the test times out.
834-
publisher, observers = _get_global_publisher_and_observers()
834+
_publisher, observers = _get_global_publisher_and_observers()
835835

836836
class LogSomething(TestCase):
837837
def test_something(self):

0 commit comments

Comments
 (0)