mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-31 12:20:26 +08:00
Fix default value in docs for objects (#1900)
This commit is contained in:
parent
5ee2122834
commit
3ef4d4da4c
@ -82,6 +82,8 @@ def document_fn(fn):
|
||||
default = param.default
|
||||
if type(default) == str:
|
||||
default = '"' + default + '"'
|
||||
if default.__class__.__module__ != "builtins":
|
||||
default = f"{default.__class__.__name__}()"
|
||||
parameter_doc["default"] = default
|
||||
elif parameter_doc["doc"] is not None and "kwargs" in parameter_doc["doc"]:
|
||||
parameter_doc["kwargs"] = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user