Skip to content

Commit 493a381

Browse files
9gelppaeps
authored andcommitted
make mypy happy
1 parent 34544e3 commit 493a381

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dsl_buttons/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
unlock_max_time = 3600 # max unlock is 1 hour
1717

1818

19-
def button():
19+
def button() -> None:
2020
keepopen = False
2121
lastopen = 0
2222
while True:
@@ -54,7 +54,7 @@ def button():
5454
r.publish("door_action", "OPEN")
5555

5656

57-
async def doorlight():
57+
async def doorlight() -> None:
5858
lighton = p.value == 1
5959
try:
6060
while True:
@@ -70,16 +70,17 @@ async def doorlight():
7070
print("doorlight done", flush=True)
7171

7272

73-
async def runall():
73+
async def runall() -> None:
7474
t_button = asyncio.create_task(asyncio.to_thread(button))
7575
t_doorlight = asyncio.create_task(doorlight())
7676
await t_button
7777
await t_doorlight
7878

7979

80-
def main():
80+
def main() -> int:
8181
print("dsl_buttons running", flush=True)
8282
asyncio.run(runall())
83+
return 0
8384

8485

8586
if __name__ == "__main__":

0 commit comments

Comments
 (0)