diff --git a/tooldantic/builder.py b/tooldantic/builder.py index 7854818..7d077d6 100644 --- a/tooldantic/builder.py +++ b/tooldantic/builder.py @@ -100,10 +100,8 @@ def model_from_function( raise ToolError(message) if param.default is not _Empty: default = param.default - elif ( - docstring_default := docstring.get(name, {}).get("default") is not None - ): - default = docstring_default + elif docstring.get(name, {}).get("default") is not None: + default = docstring.get(name, {}).get("default") else: default = _Empty processed_field = self._process_field(