format: auto-format code [skip ci]

This commit is contained in:
github-actions[bot]
2026-04-20 20:08:33 +00:00
parent 7162db1ab9
commit 55358e7b5a
2 changed files with 11 additions and 8 deletions
+7 -5
View File
@@ -790,9 +790,7 @@ def generate( # noqa: PLR0915
output: Annotated[Path | None, typer.Option("-o", "--output", help="Save path (default: current dir)")] = None, output: Annotated[Path | None, typer.Option("-o", "--output", help="Save path (default: current dir)")] = None,
remote: Annotated[str | None, typer.Option("-r", "--remote", help="Remote server name or URL")] = None, remote: Annotated[str | None, typer.Option("-r", "--remote", help="Remote server name or URL")] = None,
json_output: Annotated[bool, typer.Option("--json", "-j", help="Output as JSON")] = False, json_output: Annotated[bool, typer.Option("--json", "-j", help="Output as JSON")] = False,
json_input: Annotated[ json_input: Annotated[str | None, typer.Option("--input", "-I", help="JSON params (keys match CLI options)")] = None,
str | None, typer.Option("--input", "-I", help="JSON params (keys match CLI options)")
] = None,
) -> None: ) -> None:
"""Generate an image using text-to-image. """Generate an image using text-to-image.
@@ -838,11 +836,15 @@ def generate( # noqa: PLR0915
# Determine which CLI params the user explicitly set # Determine which CLI params the user explicitly set
click_ctx = ctx._context if hasattr(ctx, "_context") else ctx click_ctx = ctx._context if hasattr(ctx, "_context") else ctx
explicit = { explicit = (
{
p.name p.name
for p in click_ctx.command.params for p in click_ctx.command.params
if click_ctx.get_parameter_source(p.name) == click.core.ParameterSource.COMMANDLINE if click_ctx.get_parameter_source(p.name) == click.core.ParameterSource.COMMANDLINE
} if hasattr(click_ctx, "get_parameter_source") else set() }
if hasattr(click_ctx, "get_parameter_source")
else set()
)
# Apply JSON values for anything not explicitly set on CLI # Apply JSON values for anything not explicitly set on CLI
if "prompt" in mapped and ("prompt" not in explicit and prompt is None): if "prompt" in mapped and ("prompt" not in explicit and prompt is None):
+1
View File
@@ -709,6 +709,7 @@ DEFAULT_WORKFLOW_TEMPLATE: dict[str, Any] = {
}, },
} }
def _build_workflow( def _build_workflow(
prompt: str, prompt: str,
negative_prompt: str = "", negative_prompt: str = "",