chore: enforce ruff lint and format standards across backend
This commit is contained in:
parent
a8e312a4f8
commit
a6cc585dd0
39 changed files with 459 additions and 559 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue