From d83b3868b7d504b285ae1c9ae1c1f51d92706d9b Mon Sep 17 00:00:00 2001 From: David Mandelberg Date: Fri, 25 Oct 2024 13:41:20 -0400 Subject: [PATCH] Work around pylint bug --- rock_paper_sand/media_filter_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rock_paper_sand/media_filter_test.py b/rock_paper_sand/media_filter_test.py index 393b559..f7207bc 100644 --- a/rock_paper_sand/media_filter_test.py +++ b/rock_paper_sand/media_filter_test.py @@ -388,7 +388,8 @@ def test_factory_filter(self, name: str) -> None: media_filter.Filter, spec_set=True, instance=True ) factory = mock.Mock(spec_set=(), return_value=mock_filter) - registry = media_filter.Registry(**{f"{name}_factory": factory}) + # TODO(https://github.com/pylint-dev/pylint/issues/9983): Remove disable + registry = media_filter.Registry(**{f"{name}_factory": factory}) # fmt: skip; pylint: disable=unexpected-keyword-arg filter_config = json_format.ParseDict({name: {}}, config_pb2.Filter()) returned_filter = registry.parse(filter_config) @@ -398,7 +399,8 @@ def test_factory_filter(self, name: str) -> None: @parameterized.parameters("wikidata", "justwatch") def test_factory_filter_unsupported(self, name: str) -> None: - registry = media_filter.Registry(**{f"{name}_factory": None}) + # TODO(https://github.com/pylint-dev/pylint/issues/9983): Remove disable + registry = media_filter.Registry(**{f"{name}_factory": None}) # fmt: skip; pylint: disable=unexpected-keyword-arg with self.assertRaisesRegex(ValueError, "no callback"): registry.parse( json_format.ParseDict({name: {}}, config_pb2.Filter())