Skip to content

Commit 0ef6aa1

Browse files
committed
Restore abstract method and add type hint
1 parent ff56b37 commit 0ef6aa1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/astro_image_display_api/interface_definition.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,14 @@ def offset_by(self, dx: float | Quantity, dy: float | Quantity) -> None:
269269
"""
270270
raise NotImplementedError
271271

272-
def zoom(self, val) -> None:
272+
@abstractmethod
273+
def zoom(self, val: float) -> None:
273274
"""
274275
Zoom in or out by the given factor.
275276
276277
Parameters
277278
----------
278-
val : int
279+
val : float
279280
The zoom level to zoom the image.
280281
See `zoom_level`.
281282
"""

tests/test_astro_image_display_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ def test_api_test_class_completeness():
2424

2525

2626
assert all(attr_present), (
27-
"ImageWidgetAPITest is does not access these attributes/methods:\n "
27+
"ImageWidgetAPITest does not access these attributes/methods:\n "
2828
f"{"\n".join(attr for attr, present in zip(required_attributes, attr_present) if not present)}. "
2929
)

0 commit comments

Comments
 (0)