Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 1609077

Browse files
committed
fix type hints
1 parent 4d1bfb8 commit 1609077

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wwvb/wwvbtk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def main(colors: list[str], size: int, min_size: int | None) -> None: # noqa: P
6666
if min_size is None:
6767
min_size = size
6868

69-
def deadline_ms(deadline: float) -> None:
69+
def deadline_ms(deadline: float) -> int:
7070
"""Compute the number of ms until a deadline"""
7171
now = time.time()
7272
return int(max(0, deadline - now) * 1000)
@@ -131,7 +131,7 @@ def led_off(i: int) -> None:
131131
"""Turn the canvas's virtual LED off"""
132132
canvas.itemconfigure(circle, fill=colors[i])
133133

134-
def controller_func() -> None:
134+
def controller_func() -> Generator[int]:
135135
"""Update the canvas virtual LED, yielding the number of ms until the next change"""
136136
for stamp, code in wwvbsmarttick():
137137
yield deadline_ms(stamp)
@@ -143,7 +143,7 @@ def controller_func() -> None:
143143

144144
controller = controller_func().__next__
145145

146-
def after_func():
146+
def after_func() -> None:
147147
"""Repeatedly run the controller after the desired interval"""
148148
app.after(controller(), after_func)
149149

0 commit comments

Comments
 (0)