Skip to content

Commit a2f85f8

Browse files
Python: Fix Hyperlight mount typing for CI
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 242d2a4 commit a2f85f8

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

python/packages/hyperlight/agent_framework_hyperlight/_execute_code_tool.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def _is_file_mount_pair(value: Any) -> TypeGuard[FileMount | tuple[FileMountHost
156156
if not isinstance(value, tuple):
157157
return False
158158

159-
value_tuple = cast(tuple[Any, ...], value)
159+
value_tuple = cast(tuple[object, ...], value)
160160
if len(value_tuple) != 2:
161161
return False
162162

@@ -165,10 +165,14 @@ def _is_file_mount_pair(value: Any) -> TypeGuard[FileMount | tuple[FileMountHost
165165

166166

167167
def _normalize_file_mount_input(file_mount: FileMountInput) -> _StoredFileMount:
168+
host_path: FileMountHostPath
169+
mount_path: str
168170
if isinstance(file_mount, str):
169-
host_path, mount_path = file_mount, file_mount
171+
host_path = file_mount
172+
mount_path = file_mount
170173
else:
171-
host_path, mount_path = file_mount
174+
host_path = file_mount[0]
175+
mount_path = file_mount[1]
172176

173177
return _StoredFileMount(
174178
host_path=_resolve_existing_path(host_path),

0 commit comments

Comments
 (0)