Skip to content

Commit

Permalink
Work around pylint bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dseomn committed Oct 25, 2024
1 parent b0cf620 commit d83b386
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rock_paper_sand/media_filter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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())
Expand Down

0 comments on commit d83b386

Please sign in to comment.