test(images): type the monkeypatch fixture on the backported edit tests

This commit is contained in:
mateo-berri 2026-09-17 16:34:29 -07:00
parent 0e03b62ab8
commit 24d44530d4

View file

@ -134,7 +134,7 @@ def _image_edit_client(monkeypatch, captured: Dict[str, Any]) -> TestClient:
return TestClient(app)
def test_image_edit_image_array_alias_is_not_forwarded(monkeypatch):
def test_image_edit_image_array_alias_is_not_forwarded(monkeypatch: pytest.MonkeyPatch):
"""The documented `image[]` alias must reach the provider only as `image`."""
captured: Dict[str, Any] = {}
@ -150,7 +150,7 @@ def test_image_edit_image_array_alias_is_not_forwarded(monkeypatch):
assert [buffer.name for buffer in captured["image"]] == ["tree.png"]
def test_image_edit_mask_array_alias_is_not_forwarded(monkeypatch):
def test_image_edit_mask_array_alias_is_not_forwarded(monkeypatch: pytest.MonkeyPatch):
"""`mask[]` has the same shape as `image[]` and must be dropped the same way."""
captured: Dict[str, Any] = {}
@ -169,7 +169,7 @@ def test_image_edit_mask_array_alias_is_not_forwarded(monkeypatch):
assert [buffer.getvalue() for buffer in captured["image"]] == [b"\x89PNG\r\n\x1a\ntree"]
def test_image_edit_canonical_file_fields_still_reach_the_provider(monkeypatch):
def test_image_edit_canonical_file_fields_still_reach_the_provider(monkeypatch: pytest.MonkeyPatch):
"""Dropping the bracketed aliases must not touch the canonical fields."""
captured: Dict[str, Any] = {}