File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1616unlock_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
8586if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments