models: add docstring to constructor function

This commit is contained in:
bronsen 2026-02-14 18:49:24 +01:00
parent 814d5eade7
commit b068bd1e2a

View file

@ -25,6 +25,15 @@ class Teilchen(TeilchenCreate, table=True):
async def make_teilchen_input(text: str) -> TeilchenCreate | None: async def make_teilchen_input(text: str) -> TeilchenCreate | None:
"""Constructor to create new Teilchen from user input.
Args:
text: The whole input string as provided by the user.
Returns:
Returns new Teilchen instance if enough parts could be extracted.
Returns `None` otherwise.
"""
import re import re
from natsort import natsorted from natsort import natsorted