Skip to content

Commit

Permalink
Fixed mypy type error on env, mcp fork type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rusiaaman committed Feb 5, 2025
1 parent 094c473 commit 3010495
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/mcp_wcgw_fork
8 changes: 4 additions & 4 deletions src/wcgw/client/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,16 @@ def get_tmpdir() -> str:
return ""


def start_shell(is_restricted_mode: bool, initial_dir: str) -> pexpect.spawn: # type: ignore
def start_shell(is_restricted_mode: bool, initial_dir: str) -> pexpect.spawn: # type: ignore[type-arg]
cmd = "/bin/bash"
if is_restricted_mode:
cmd += " -r"

overrideenv = {**os.environ, "PS1": PROMPT_CONST, "TMPDIR": get_tmpdir()} # type: ignore[arg-type]
overrideenv = {**os.environ, "PS1": PROMPT_CONST, "TMPDIR": get_tmpdir()}
try:
shell = pexpect.spawn(
cmd,
env=overrideenv,
env=overrideenv, # type: ignore[arg-type]
echo=False,
encoding="utf-8",
timeout=TIMEOUT,
Expand All @@ -183,7 +183,7 @@ def start_shell(is_restricted_mode: bool, initial_dir: str) -> pexpect.spawn: #

shell = pexpect.spawn(
"/bin/bash --noprofile --norc",
env=overrideenv,
env=overrideenv, # type: ignore[arg-type]
echo=False,
encoding="utf-8",
timeout=TIMEOUT,
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3010495

Please sign in to comment.