models: add docstring to constructor function
This commit is contained in:
parent
814d5eade7
commit
b068bd1e2a
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue