Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,30 @@ python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true

# The backend modules import optional 3rd-party sandbox SDKs (`e2b_code_interpreter`,
# `daytona`, `boxlite`) that don't ship type stubs. Without overrides, mypy types
# those imports as `object` and then flags every attribute access on the SDK
# clients. Each backend is exercised by its own integration tests against the
# real SDK; suppress the missing-stub noise so static checks don't block CI.
[[tool.mypy.overrides]]
module = [
"e2b_code_interpreter",
"e2b.sandbox.commands.command_handle",
"daytona",
"boxlite",
"boxlite.sync_api",
]
ignore_missing_imports = true

# The backend modules consume the SDKs above as untyped Any. disallow_untyped_defs
# + warn_return_any cascade into noise. Disable strict checks for these files only.
[[tool.mypy.overrides]]
module = [
"sandrun.backends.e2b",
"sandrun.backends.daytona",
"sandrun.backends.boxlite",
]
disallow_untyped_defs = false
warn_return_any = false
disable_error_code = ["attr-defined", "no-any-return"]
1 change: 1 addition & 0 deletions src/sandrun/_micromamba.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def resolve_micromamba() -> tuple[str | None, bool]:
explicit = os.environ.get("SANDRUN_MICROMAMBA_PATH") or os.environ.get(
"METAFLOW_SANDBOX_MICROMAMBA_PATH"
)
path: str | None
if explicit:
path = explicit
compatible = is_compatible_linux_micromamba(path)
Expand Down
3 changes: 2 additions & 1 deletion src/sandrun/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ def get_backend(name: str) -> SandboxBackend:

module = importlib.import_module(module_path, package=__name__)
cls = getattr(module, class_name)
return cls()
instance: SandboxBackend = cls()
return instance
4 changes: 4 additions & 0 deletions src/sandrun/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ class UvDepInstaller(DepInstaller):

_MANIFEST_NAME = "sandrun-uv-manifest.txt"

# Set by _from_pep723_path() when the installer is built from an inline-
# metadata PEP 723 script. None for the regular requirements-list flow.
_script_path: str | None = None

def __init__(self, staging_dir: str | None = None) -> None:
if staging_dir is None:
self._staging_dir = tempfile.mkdtemp(prefix="sandrun-uv-deps-")
Expand Down
Loading