@@ -2255,7 +2255,7 @@ def complete( # type: ignore[override]
2255
2255
ansi .style_aware_write (sys .stdout , '\n ' + err_str + '\n ' )
2256
2256
rl_force_redisplay ()
2257
2257
return None
2258
- except Exception as ex :
2258
+ except Exception as ex : # noqa: BLE001
2259
2259
# Insert a newline so the exception doesn't print in the middle of the command line being tab completed
2260
2260
self .perror ()
2261
2261
self .pexcept (ex )
@@ -2562,7 +2562,7 @@ def onecmd_plus_hooks(
2562
2562
stop = True
2563
2563
except PassThroughException as ex :
2564
2564
raise ex .wrapped_ex
2565
- except Exception as ex :
2565
+ except Exception as ex : # noqa: BLE001
2566
2566
self .pexcept (ex )
2567
2567
finally :
2568
2568
try :
@@ -2576,7 +2576,7 @@ def onecmd_plus_hooks(
2576
2576
stop = True
2577
2577
except PassThroughException as ex :
2578
2578
raise ex .wrapped_ex
2579
- except Exception as ex :
2579
+ except Exception as ex : # noqa: BLE001
2580
2580
self .pexcept (ex )
2581
2581
2582
2582
return stop
@@ -4131,7 +4131,7 @@ def do_set(self, args: argparse.Namespace) -> None:
4131
4131
try :
4132
4132
orig_value = settable .get_value ()
4133
4133
settable .set_value (utils .strip_quotes (args .value ))
4134
- except Exception as ex :
4134
+ except ValueError as ex :
4135
4135
self .perror (f"Error setting { args .param } : { ex } " )
4136
4136
else :
4137
4137
self .poutput (f"{ args .param } - was: { orig_value !r} \n now: { settable .get_value ()!r} " )
@@ -4425,7 +4425,7 @@ def py_quit() -> None:
4425
4425
if py_code_to_run :
4426
4426
try :
4427
4427
interp .runcode (py_code_to_run ) # type: ignore[arg-type]
4428
- except BaseException :
4428
+ except BaseException : # noqa: BLE001
4429
4429
# We don't care about any exception that happened in the Python code
4430
4430
pass
4431
4431
@@ -4448,7 +4448,7 @@ def py_quit() -> None:
4448
4448
# Since quit() or exit() raise an EmbeddedConsoleExit, interact() exits before printing
4449
4449
# the exitmsg. Therefore, we will not provide it one and print it manually later.
4450
4450
interp .interact (banner = banner , exitmsg = '' )
4451
- except BaseException :
4451
+ except BaseException : # noqa: BLE001
4452
4452
# We don't care about any exception that happened in the interactive console
4453
4453
pass
4454
4454
finally :
0 commit comments