1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

update doc format for kwargs_type

This commit is contained in:
yiyixuxu
2025-06-19 02:24:51 +02:00
parent cb6d5fed19
commit 58e9565719

View File

@@ -421,7 +421,9 @@ def format_params(params, header="Args", indent_level=4, max_line_length=115):
for param in params:
# Format parameter name and type
type_str = get_type_str(param.type_hint) if param.type_hint != Any else ""
param_str = f"{param_indent}{param.name} (`{type_str}`"
# YiYi Notes: remove this line if we remove kwargs_type
name = f'**{param.kwargs_type}' if param.name is None and param.kwargs_type is not None else param.name
param_str = f"{param_indent}{name} (`{type_str}`"
# Add optional tag and default value if parameter is an InputParam and optional
if hasattr(param, "required"):