chore: enforce ruff lint and format standards across backend

This commit is contained in:
Jonas Miederer 2026-09-14 08:10:14 +02:00
parent a8e312a4f8
commit a6cc585dd0
39 changed files with 459 additions and 559 deletions

View file

@ -15,12 +15,12 @@ derives a JSON Schema + uiSchema from the node's template
from lfx.io import DropdownInput
DropdownInput(
name="room", # JSON-Schema property key
display_name="Room", # form label (title)
name="room", # JSON-Schema property key
display_name="Room", # form label (title)
info="Where should it take place", # help text (description)
options=["Chapel", "Hall"], # dropdown choices (enum)
value="Chapel", # prefill (default)
required=True, # marks the field required
value="Chapel", # prefill (default)
required=True, # marks the field required
)
```
Supported input types → widgets: `StrInput`/`MessageTextInput` → text,

View file

@ -18,6 +18,7 @@ upload comes later.
from __future__ import annotations
import json
from typing import ClassVar
from lfx.custom import Component
from lfx.field_typing.range_spec import RangeSpec
@ -51,7 +52,7 @@ class CustomInputForm(Component):
description = "Collects structured form values into a single JSON message."
icon = "ClipboardList"
inputs = [
inputs: ClassVar[list] = [
# Plumbing, not a form field: the API posts submitted web-form
# values as the run envelope (same {"payload": {...}} shape the
# other kirche components use); they arrive here through a ChatInput
@ -129,7 +130,7 @@ class CustomInputForm(Component):
file_types=["pdf", "png", "jpg"],
),
]
outputs = [
outputs: ClassVar[list] = [
Output(display_name="Form Data", name="form_data", method="collect"),
]
@ -150,7 +151,7 @@ class CustomInputForm(Component):
# Accepts the raw dict or the run envelope {"payload": {...}}.
try:
override = json.loads(_text(self.form_values) or "{}")
except Exception:
except json.JSONDecodeError:
override = {}
if isinstance(override, dict):
if isinstance(override.get("payload"), dict):