@@ -237,7 +237,7 @@ def is_pybricks_usb(dev):
237237 "Recompile and Run" ,
238238 "Recompile and Download" ,
239239 "Exit" ,
240- ]
240+ ]
241241 while True :
242242 try :
243243 response = await hub .race_user_program_start (
@@ -250,8 +250,8 @@ def is_pybricks_usb(dev):
250250
251251 async def reconnect_hub ():
252252 if await questionary .confirm (
253- "\n The hub has been disconnected. Would you like to re-connect?"
254- ).ask_async ():
253+ "\n The hub has been disconnected. Would you like to re-connect?"
254+ ).ask_async ():
255255 if args .conntype == "ble" :
256256 print (
257257 f"Searching for { args .name or 'any hub with Pybricks service' } ..."
@@ -273,15 +273,17 @@ async def reconnect_hub():
273273 else :
274274 exit ()
275275
276- if (hub .status_observable .value
276+ if (
277+ hub .status_observable .value
277278 & StatusFlag .POWER_BUTTON_PRESSED
278279 ):
279280 try :
280281 await hub ._wait_for_user_program_stop (2.1 )
281282 continue
282283
283284 except RuntimeError as e :
284- if (hub .connection_state_observable .value
285+ if (
286+ hub .connection_state_observable .value
285287 == ConnectionState .DISCONNECTED
286288 ):
287289 hub = await reconnect_hub ()
@@ -290,7 +292,8 @@ async def reconnect_hub():
290292 else :
291293 raise e
292294
293- elif (hub .connection_state_observable .value
295+ elif (
296+ hub .connection_state_observable .value
294297 == ConnectionState .DISCONNECTED
295298 ):
296299 # let terminal cool off before making a new prompt
0 commit comments