@@ -1327,7 +1327,7 @@ def ppaged(self, msg: Any, *, end: str = '\n', chop: bool = False) -> None:
13271327 with self .sigint_protection :
13281328 import subprocess
13291329
1330- pipe_proc = subprocess .Popen (pager , shell = True , stdin = subprocess .PIPE , stdout = self .stdout )
1330+ pipe_proc = subprocess .Popen (pager , shell = True , stdin = subprocess .PIPE , stdout = self .stdout ) # noqa: S602
13311331 pipe_proc .communicate (final_msg .encode ('utf-8' , 'replace' ))
13321332 except BrokenPipeError :
13331333 # This occurs if a command's output is being piped to another process and that process closes before the
@@ -2589,7 +2589,7 @@ def _run_cmdfinalization_hooks(self, stop: bool, statement: Optional[Statement])
25892589 # caused by certain binary characters having been printed to it.
25902590 import subprocess
25912591
2592- proc = subprocess .Popen (['stty' , 'sane' ])
2592+ proc = subprocess .Popen (['stty' , 'sane' ]) # noqa: S603, S607
25932593 proc .communicate ()
25942594
25952595 data = plugin .CommandFinalizationData (stop , statement )
@@ -2862,7 +2862,7 @@ def _redirect_output(self, statement: Statement) -> utils.RedirectionSavedState:
28622862 kwargs ['executable' ] = shell
28632863
28642864 # For any stream that is a StdSim, we will use a pipe so we can capture its output
2865- proc = subprocess .Popen ( # type: ignore[call-overload]
2865+ proc = subprocess .Popen ( # type: ignore[call-overload] # noqa: S602
28662866 statement .pipe_to ,
28672867 stdin = subproc_stdin ,
28682868 stdout = subprocess .PIPE if isinstance (self .stdout , utils .StdSim ) else self .stdout , # type: ignore[unreachable]
@@ -4212,7 +4212,7 @@ def do_shell(self, args: argparse.Namespace) -> None:
42124212 # still receive the SIGINT since it is in the same process group as us.
42134213 with self .sigint_protection :
42144214 # For any stream that is a StdSim, we will use a pipe so we can capture its output
4215- proc = subprocess .Popen ( # type: ignore[call-overload]
4215+ proc = subprocess .Popen ( # type: ignore[call-overload] # noqa: S602
42164216 expanded_command ,
42174217 stdout = subprocess .PIPE if isinstance (self .stdout , utils .StdSim ) else self .stdout , # type: ignore[unreachable]
42184218 stderr = subprocess .PIPE if isinstance (sys .stderr , utils .StdSim ) else sys .stderr , # type: ignore[unreachable]
@@ -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 : # noqa: BLE001
4428+ except BaseException : # noqa: BLE001, S110
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 : # noqa: BLE001
4451+ except BaseException : # noqa: BLE001, S110
44524452 # We don't care about any exception that happened in the interactive console
44534453 pass
44544454 finally :
0 commit comments