Skip to content

Commit 1427d2b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8f6ba0b commit 1427d2b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/swerex/runtime/local.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
__all__ = ["LocalRuntime", "BashSession"]
5656

5757

58-
def _split_bash_command(inpt: str) -> list[str]:
58+
def _split_bash_command(input: str) -> list[str]:
5959
r"""Split a bash command with linebreaks, escaped newlines, and heredocs into a list of
6060
individual commands.
6161
6262
Args:
63-
inpt: The input string to split into commands.
63+
input: The input string to split into commands.
6464
Returns:
6565
A list of commands as strings.
6666
@@ -70,11 +70,11 @@ def _split_bash_command(inpt: str) -> list[str]:
7070
"cmd1\\\n asdf" is one command (because the linebreak is escaped)
7171
"cmd1<<EOF\na\nb\nEOF" is one command (because of the heredoc)
7272
"""
73-
inpt = inpt.strip()
74-
if not inpt or all(l.strip().startswith("#") for l in inpt.splitlines()):
73+
input = input.strip()
74+
if not input or all(l.strip().startswith("#") for l in input.splitlines()):
7575
# bashlex can't deal with empty strings or the like :/
7676
return []
77-
parsed = bashlex.parse(inpt)
77+
parsed = bashlex.parse(input)
7878
cmd_strings = []
7979

8080
def find_range(cmd: bashlex.ast.node) -> tuple[int, int]:
@@ -88,7 +88,7 @@ def find_range(cmd: bashlex.ast.node) -> tuple[int, int]:
8888

8989
for cmd in parsed:
9090
start, end = find_range(cmd)
91-
cmd_strings.append(inpt[start:end])
91+
cmd_strings.append(input[start:end])
9292
return cmd_strings
9393

9494

0 commit comments

Comments
 (0)