Skip to content

Commit 5f23ebd

Browse files
committed
assert not None instead of Display
1 parent 5386e82 commit 5f23ebd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_displayio_layout/widgets/icon_animated.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def zoom_animation(self, touch_point: Tuple[int, int, Optional[int]]) -> None:
211211
animation_palette = self.__class__.palette_buffer
212212

213213
# For mypy, if class is configured correctly this must be true
214-
assert isinstance(self.__class__.display, Display)
214+
assert self.__class__.display is not None
215215

216216
# store the current display refresh setting
217217
refresh_status = self.__class__.display.auto_refresh
@@ -291,7 +291,7 @@ def zoom_out_animation(self, touch_point: Tuple[int, int, Optional[int]]) -> Non
291291
animation_palette = self.__class__.palette_buffer
292292

293293
# For mypy, if class is configured correctly this must be true
294-
assert isinstance(self.__class__.display, Display)
294+
assert self.__class__.display is not None
295295

296296
# store the current display refresh setting
297297
refresh_status = self.__class__.display.auto_refresh

0 commit comments

Comments
 (0)