beautify code

This commit is contained in:
flukx 2024-08-21 20:07:18 +02:00
parent b74912e45d
commit 4abd520d86

View file

@ -68,7 +68,10 @@ def antilen(string: str):
return 1 / len(string) if string else 0
async def find_things(things: list[Thing], search_string: str, max_number: int = 10) -> Iterable[Thing]:
async def find_things(
things: list[Thing],
search_string: str,
max_number: int = 10) -> Iterable[Thing]:
"""Gives things that the user might have searched for.
Args:
@ -402,7 +405,8 @@ def show_thing_changer(ui_element: nicegui.ui.element, thing: Thing) -> None:
input_fields[f"sign.{sign_member}"] = ui.input(
label="sign: " + sign_member,
value=vars(thing.sign).get(sign_member, "")
).props('autogrow dense'
).props(
'autogrow dense'
).on_value_change(
lambda e, m=sign_member: save_sign_value(e, m)
)