remove List imports

This commit is contained in:
Michael Poluektov
2024-08-14 13:46:31 +01:00
parent 038fc48ac0
commit 29f904db45
38 changed files with 124 additions and 124 deletions

View File

@@ -1,5 +1,5 @@
from pydantic import BaseModel, ConfigDict
from typing import List, Union, Optional
from typing import Union, Optional
import time
import logging
@@ -125,7 +125,7 @@ class FunctionsTable:
except Exception:
return None
def get_functions(self, active_only=False) -> List[FunctionModel]:
def get_functions(self, active_only=False) -> list[FunctionModel]:
with get_db() as db:
if active_only:
@@ -141,7 +141,7 @@ class FunctionsTable:
def get_functions_by_type(
self, type: str, active_only=False
) -> List[FunctionModel]:
) -> list[FunctionModel]:
with get_db() as db:
if active_only:
@@ -157,7 +157,7 @@ class FunctionsTable:
for function in db.query(Function).filter_by(type=type).all()
]
def get_global_filter_functions(self) -> List[FunctionModel]:
def get_global_filter_functions(self) -> list[FunctionModel]:
with get_db() as db:
return [
@@ -167,7 +167,7 @@ class FunctionsTable:
.all()
]
def get_global_action_functions(self) -> List[FunctionModel]:
def get_global_action_functions(self) -> list[FunctionModel]:
with get_db() as db:
return [
FunctionModel.model_validate(function)