move special imports into helper function
This commit is contained in:
parent
e438015ba8
commit
50db5b9192
1 changed files with 3 additions and 2 deletions
|
|
@ -1,8 +1,6 @@
|
||||||
import logging
|
import logging
|
||||||
import re
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from natsort import natsorted
|
|
||||||
from sqlmodel import (
|
from sqlmodel import (
|
||||||
Field, # pyright: ignore[reportUnknownVariableType]
|
Field, # pyright: ignore[reportUnknownVariableType]
|
||||||
SQLModel,
|
SQLModel,
|
||||||
|
|
@ -24,6 +22,9 @@ class Teilchen(TeilchenCreate, table=True):
|
||||||
|
|
||||||
|
|
||||||
def make_teilchen_input(text: str) -> TeilchenCreate | None:
|
def make_teilchen_input(text: str) -> TeilchenCreate | None:
|
||||||
|
import re
|
||||||
|
from natsort import natsorted
|
||||||
|
|
||||||
if not text:
|
if not text:
|
||||||
logger.error("Empty text.")
|
logger.error("Empty text.")
|
||||||
return None
|
return None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue