@@ -1327,7 +1327,7 @@ def ppaged(self, msg: Any, *, end: str = '\n', chop: bool = False) -> None:
1327
1327
with self .sigint_protection :
1328
1328
import subprocess
1329
1329
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
1331
1331
pipe_proc .communicate (final_msg .encode ('utf-8' , 'replace' ))
1332
1332
except BrokenPipeError :
1333
1333
# 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])
2589
2589
# caused by certain binary characters having been printed to it.
2590
2590
import subprocess
2591
2591
2592
- proc = subprocess .Popen (['stty' , 'sane' ])
2592
+ proc = subprocess .Popen (['stty' , 'sane' ]) # noqa: S603, S607
2593
2593
proc .communicate ()
2594
2594
2595
2595
data = plugin .CommandFinalizationData (stop , statement )
@@ -2862,7 +2862,7 @@ def _redirect_output(self, statement: Statement) -> utils.RedirectionSavedState:
2862
2862
kwargs ['executable' ] = shell
2863
2863
2864
2864
# 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
2866
2866
statement .pipe_to ,
2867
2867
stdin = subproc_stdin ,
2868
2868
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:
4212
4212
# still receive the SIGINT since it is in the same process group as us.
4213
4213
with self .sigint_protection :
4214
4214
# 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
4216
4216
expanded_command ,
4217
4217
stdout = subprocess .PIPE if isinstance (self .stdout , utils .StdSim ) else self .stdout , # type: ignore[unreachable]
4218
4218
stderr = subprocess .PIPE if isinstance (sys .stderr , utils .StdSim ) else sys .stderr , # type: ignore[unreachable]
@@ -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 : # noqa: BLE001
4428
+ except BaseException : # noqa: BLE001, S110
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 : # noqa: BLE001
4451
+ except BaseException : # noqa: BLE001, S110
4452
4452
# We don't care about any exception that happened in the interactive console
4453
4453
pass
4454
4454
finally :
0 commit comments