refactor: add type hints to function signatures across multiple files

This commit is contained in:
grillazz
2026-07-13 14:25:49 +02:00
parent 51f0cebabe
commit eb8acd7b7c
10 changed files with 27 additions and 15 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ async def verify_jwt(request: Request, token: str) -> bool:
class AuthBearer(HTTPBearer):
def __init__(self, auto_error: bool = True):
def __init__(self, auto_error: bool = True) -> None:
super().__init__(auto_error=auto_error)
async def __call__(self, request: Request):
+1 -1
View File
@@ -5,7 +5,7 @@ import orjson
class StreamLLMService:
def __init__(self, base_url: str = "http://localhost:11434/v1"):
def __init__(self, base_url: str = "http://localhost:11434/v1") -> None:
self.base_url = base_url
self.model = "llama3.2"
+3 -3
View File
@@ -45,7 +45,7 @@ class SMTPEmailService(metaclass=SingletonMetaNoArgs):
)
server: smtplib.SMTP = field(init=False) # Deferred initialization in post-init
def __attrs_post_init__(self):
def __attrs_post_init__(self) -> None:
"""
Initializes the SMTP server connection after the object is created.
@@ -98,7 +98,7 @@ class SMTPEmailService(metaclass=SingletonMetaNoArgs):
subject: str,
body_text: str = "",
body_html: str = None,
):
) -> None:
"""
Sends an email to the specified recipients.
@@ -130,7 +130,7 @@ class SMTPEmailService(metaclass=SingletonMetaNoArgs):
template: str,
context: dict,
sender: EmailStr,
):
) -> None:
"""
Sends an email using a Jinja2 template.