chore: drop unnecessary | None on LLMError and Mail.send (#36147)

Co-authored-by: Brian Wang <20699847+BrianWang1990@users.noreply.github.com>
This commit is contained in:
BrianWang1990 2026-05-14 11:22:00 +08:00 committed by GitHub
parent 12d33652b6
commit b9e3130388
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -1,9 +1,9 @@
class LLMError(ValueError):
"""Base class for all LLM exceptions."""
description: str | None = None
description: str = ""
def __init__(self, description: str | None = None):
def __init__(self, description: str = ""):
self.description = description

View File

@ -67,7 +67,7 @@ class Mail:
case _:
raise ValueError(f"Unsupported mail type {mail_type}")
def send(self, to: str, subject: str, html: str, from_: str | None = None):
def send(self, to: str, subject: str, html: str, from_: str = ""):
if not self._client:
raise ValueError("Mail client is not initialized")