infra: rm unused # noqa violations (#22049)

Updating #21137
This commit is contained in:
Bagatur
2024-05-22 15:21:08 -07:00
committed by GitHub
parent 45ed5f3f51
commit 50186da0a1
149 changed files with 212 additions and 214 deletions

View File

@@ -88,7 +88,7 @@ class BashProcess:
Args:
Prompt(str): the bash command to execute
""" # noqa: E501
"""
pexpect = self._lazy_import_pexpect()
process = pexpect.spawn(
"env", ["-i", "bash", "--norc", "--noprofile"], encoding="utf-8"
@@ -107,7 +107,7 @@ class BashProcess:
Args:
commands(List[str]): a list of commands to
execute in the session
""" # noqa: E501
"""
if isinstance(commands, str):
commands = [commands]
commands = ";".join(commands)
@@ -125,7 +125,7 @@ class BashProcess:
Args:
command: The command to run
""" # noqa: E501
"""
try:
output = subprocess.run(
command,
@@ -149,7 +149,7 @@ class BashProcess:
Args:
output: a process' output string
command: the executed command
""" # noqa: E501
"""
pattern = re.escape(command) + r"\s*\n"
output = re.sub(pattern, "", output, count=1)
return output.strip()
@@ -161,7 +161,7 @@ class BashProcess:
Args:
command: the command to execute
""" # noqa: E501
"""
pexpect = self._lazy_import_pexpect()
if self.process is None:
raise ValueError("Process not initialized")