ran pre-commit and fixed issues

This commit is contained in:
Yannic Kilcher
2022-12-13 12:38:59 +01:00
parent ceda5481b9
commit d3d657e636
43 changed files with 213 additions and 154 deletions
+4 -1
View File
@@ -1,3 +1,6 @@
from .service_client import ServiceClient
# -*- coding: utf-8 -*-
from .labeler import Labeler
from .prompt import Prompt
from .service_client import ServiceClient
__all__ = ["Labeler", "Prompt", "ServiceClient"]
+7 -2
View File
@@ -1,7 +1,9 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from typing import Optional
import sqlalchemy as sa
from sqlmodel import Field, SQLModel
from typing import Optional
class Labeler(SQLModel, table=True):
@@ -9,6 +11,9 @@ class Labeler(SQLModel, table=True):
id: Optional[int] = Field(default=None, primary_key=True)
display_name: str
discord_username: str
created_date: Optional[datetime] = Field(sa_column=sa.Column(sa.DateTime(), nullable=False, server_default=sa.func.current_timestamp()), nullable=False)
created_date: Optional[datetime] = Field(
sa_column=sa.Column(sa.DateTime(), nullable=False, server_default=sa.func.current_timestamp()),
nullable=False,
)
is_enabled: bool
notes: str
+7 -3
View File
@@ -1,7 +1,9 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from typing import Optional
import sqlalchemy as sa
from sqlmodel import Field, SQLModel
from typing import Optional
class Prompt(SQLModel, table=True):
@@ -11,5 +13,7 @@ class Prompt(SQLModel, table=True):
prompt: str
response: Optional[str]
lang: Optional[str]
created_date: Optional[datetime] = Field(sa_column=sa.Column(sa.DateTime(), nullable=False, server_default=sa.func.current_timestamp()), nullable=False)
created_date: Optional[datetime] = Field(
sa_column=sa.Column(sa.DateTime(), nullable=False, server_default=sa.func.current_timestamp()),
nullable=False,
)
+3 -1
View File
@@ -1,6 +1,8 @@
from sqlmodel import Field, SQLModel
# -*- coding: utf-8 -*-
from typing import Optional
from sqlmodel import Field, SQLModel
class ServiceClient(SQLModel, table=True):
__tablename__ = "service_client"