diff --git a/pyproject.toml b/pyproject.toml index 92c6f5b8..ca10422c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ Homepage = "https://github.com/testing-cabal/testtools" [project.optional-dependencies] test = ["testscenarios", "testresources"] twisted = ["Twisted", "fixtures"] -dev = ["ruff==0.12.11"] +dev = ["ruff==0.13.0"] [tool.hatch.version] source = "vcs" diff --git a/testtools/tests/test_assert_that.py b/testtools/tests/test_assert_that.py index 84fae077..7f0ab8b3 100644 --- a/testtools/tests/test_assert_that.py +++ b/testtools/tests/test_assert_that.py @@ -115,7 +115,7 @@ def get_error_string(self, e): break error = "".join(lines[i:]) # We aren't interested in how the exception type is formatted. - exc_class, error = error.split(": ", 1) + _exc_class, error = error.split(": ", 1) return error def test_assertThat_verbose_unicode(self): diff --git a/testtools/tests/test_content.py b/testtools/tests/test_content.py index d30bf5eb..620c90f2 100644 --- a/testtools/tests/test_content.py +++ b/testtools/tests/test_content.py @@ -246,7 +246,7 @@ def test_postfix_content(self): self.assertEqual(expected, actual) def test___init___sets_content_type(self): - stack_lines, expected = self._get_stack_line_and_expected_output() + stack_lines, _expected = self._get_stack_line_and_expected_output() content = StackLinesContent(stack_lines) expected_content_type = ContentType( "text", "x-traceback", {"language": "python", "charset": "utf8"} diff --git a/testtools/tests/test_testcase.py b/testtools/tests/test_testcase.py index b4d41e59..946a12d3 100644 --- a/testtools/tests/test_testcase.py +++ b/testtools/tests/test_testcase.py @@ -802,7 +802,7 @@ def get_error_string(self, e): break error = "".join(lines[i:]) # We aren't interested in how the exception type is formatted. - exc_class, error = error.split(": ", 1) + _exc_class, error = error.split(": ", 1) return error def test_assertThat_verbose_unicode(self): diff --git a/testtools/tests/test_testresult.py b/testtools/tests/test_testresult.py index d464e674..366d7ef6 100644 --- a/testtools/tests/test_testresult.py +++ b/testtools/tests/test_testresult.py @@ -2574,7 +2574,7 @@ def check_outcome_details_to_exec_info(self, outcome, expected=None): # of the text types in the details dict. if not expected: expected = outcome - details, err_str = self.get_details_and_string() + details, _err_str = self.get_details_and_string() getattr(self.converter, outcome)(self, details=details) err = self.converter._details_to_exc_info(details) self.assertEqual([(expected, self, err)], self.result._events) @@ -3079,7 +3079,7 @@ def test_syntax_error_malformed(self): def test_syntax_error_line_iso_8859_1(self): """Syntax error on a latin-1 line shows the line decoded""" - text, raw = self._get_sample_text("iso-8859-1") + text, _raw = self._get_sample_text("iso-8859-1") textoutput = self._setup_external_case("import bad") self._write_module( "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): def test_syntax_error_line_iso_8859_5(self): """Syntax error on a iso-8859-5 line shows the line decoded""" - text, raw = self._get_sample_text("iso-8859-5") + text, _raw = self._get_sample_text("iso-8859-5") textoutput = self._setup_external_case("import bad") self._write_module( "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): def test_syntax_error_line_euc_jp(self): """Syntax error on a euc_jp line shows the line decoded""" - text, raw = self._get_sample_text("euc_jp") + text, _raw = self._get_sample_text("euc_jp") textoutput = self._setup_external_case("import bad") self._write_module("bad", "euc_jp", f"# coding: euc_jp\n$ = 0 # {text}\n") textoutput = self._run_external_case() @@ -3139,7 +3139,7 @@ def test_syntax_error_line_euc_jp(self): def test_syntax_error_line_utf_8(self): """Syntax error on a utf-8 line shows the line decoded""" - text, raw = self._get_sample_text("utf-8") + text, _raw = self._get_sample_text("utf-8") textoutput = self._setup_external_case("import bad") self._write_module("bad", "utf-8", f"\ufeff^ = 0 # {text}\n") textoutput = self._run_external_case() diff --git a/testtools/tests/twistedsupport/test_runtest.py b/testtools/tests/twistedsupport/test_runtest.py index 222b057a..9a4e4a4f 100644 --- a/testtools/tests/twistedsupport/test_runtest.py +++ b/testtools/tests/twistedsupport/test_runtest.py @@ -817,7 +817,7 @@ def test_something(self): def test_restore_observers(self): # We restore the original observers. - publisher, observers = _get_global_publisher_and_observers() + _publisher, observers = _get_global_publisher_and_observers() class LogSomething(TestCase): def test_something(self): @@ -831,7 +831,7 @@ def test_something(self): def test_restore_observers_after_timeout(self): # We restore the original observers even if the test times out. - publisher, observers = _get_global_publisher_and_observers() + _publisher, observers = _get_global_publisher_and_observers() class LogSomething(TestCase): def test_something(self):