@@ -2255,7 +2255,7 @@ def complete( # type: ignore[override]
22552255 ansi .style_aware_write (sys .stdout , '\n ' + err_str + '\n ' )
22562256 rl_force_redisplay ()
22572257 return None
2258- except Exception as ex :
2258+ except Exception as ex : # noqa: BLE001
22592259 # Insert a newline so the exception doesn't print in the middle of the command line being tab completed
22602260 self .perror ()
22612261 self .pexcept (ex )
@@ -2562,7 +2562,7 @@ def onecmd_plus_hooks(
25622562 stop = True
25632563 except PassThroughException as ex :
25642564 raise ex .wrapped_ex
2565- except Exception as ex :
2565+ except Exception as ex : # noqa: BLE001
25662566 self .pexcept (ex )
25672567 finally :
25682568 try :
@@ -2576,7 +2576,7 @@ def onecmd_plus_hooks(
25762576 stop = True
25772577 except PassThroughException as ex :
25782578 raise ex .wrapped_ex
2579- except Exception as ex :
2579+ except Exception as ex : # noqa: BLE001
25802580 self .pexcept (ex )
25812581
25822582 return stop
@@ -4131,7 +4131,7 @@ def do_set(self, args: argparse.Namespace) -> None:
41314131 try :
41324132 orig_value = settable .get_value ()
41334133 settable .set_value (utils .strip_quotes (args .value ))
4134- except Exception as ex :
4134+ except ValueError as ex :
41354135 self .perror (f"Error setting { args .param } : { ex } " )
41364136 else :
41374137 self .poutput (f"{ args .param } - was: { orig_value !r} \n now: { settable .get_value ()!r} " )
@@ -4425,7 +4425,7 @@ def py_quit() -> None:
44254425 if py_code_to_run :
44264426 try :
44274427 interp .runcode (py_code_to_run ) # type: ignore[arg-type]
4428- except BaseException :
4428+ except BaseException : # noqa: BLE001
44294429 # We don't care about any exception that happened in the Python code
44304430 pass
44314431
@@ -4448,7 +4448,7 @@ def py_quit() -> None:
44484448 # Since quit() or exit() raise an EmbeddedConsoleExit, interact() exits before printing
44494449 # the exitmsg. Therefore, we will not provide it one and print it manually later.
44504450 interp .interact (banner = banner , exitmsg = '' )
4451- except BaseException :
4451+ except BaseException : # noqa: BLE001
44524452 # We don't care about any exception that happened in the interactive console
44534453 pass
44544454 finally :
0 commit comments