From 448a9d214f1e416eee9646914ac3b00052848fd3 Mon Sep 17 00:00:00 2001 From: kramstrom Date: Tue, 2 Jul 2024 14:38:54 +0200 Subject: [PATCH] set spect to parent spec in _bind_instance_method --- modal/functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modal/functions.py b/modal/functions.py index 462730f114..9b0a1ff355 100644 --- a/modal/functions.py +++ b/modal/functions.py @@ -290,7 +290,7 @@ class _Function(_Object, type_prefix="fu"): _web_url: Optional[str] _function_name: Optional[str] _is_method: bool - _spec: _FunctionSpec + _spec: _FunctionSpec = None _tag: str _raw_f: Callable[..., Any] _build_args: dict @@ -456,6 +456,7 @@ def _deps(): fun._parent = instance_service_function._parent fun._app = class_bound_method._app fun._all_mounts = class_bound_method._all_mounts # TODO: only used for mount-watching/modal serve + fun._spec = instance_service_function._parent._spec return fun @staticmethod