Skip to content

Commit e073073

Browse files
committed
fix mypy issues
1 parent 7250f6f commit e073073

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
./**/tmp
22
./screencasts/.temp.tape
3+
/venv

requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
mypy==1.18.1
2+
mypy_extensions==1.1.0
3+
pathspec==0.12.1
4+
pexpect==4.9.0
5+
ptyprocess==0.7.0
6+
types-pexpect==4.9.0.20250809
7+
typing_extensions==4.15.0

shellspec.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -750,11 +750,17 @@ def _run_pexpect_command(
750750
self,
751751
command: Command,
752752
cmd_line: list[str],
753-
env: dict,
753+
env: dict[str, str],
754754
) -> ExecutionResult:
755755
"""Execute shell command with pexpect interactions and return ExecutionResult"""
756756
# Spawn the process with pexpect
757-
proc = pexpect.spawn(cmd_line[0], cmd_line[1:], timeout=SHELL_TIMEOUT, env=env)
757+
758+
proc = pexpect.spawn(
759+
cmd_line[0],
760+
cmd_line[1:],
761+
timeout=SHELL_TIMEOUT, #
762+
env=env, # type: ignore
763+
)
758764
exception = None
759765

760766
try:
@@ -790,7 +796,7 @@ def _run_pexpect_command(
790796

791797
return ExecutionResult(
792798
exit_code=exit_code,
793-
stdout=proc.before.decode("utf-8") if proc.before else "",
799+
stdout=proc.before.decode("utf-8") if proc.before else "", # type: ignore
794800
stderr="", # pexpect doesn't separate stderr
795801
execution_type="pexpect",
796802
)

0 commit comments

Comments
 (0)