Don't allow None for org id (partial mypy only change) more to come (#2613)

This commit is contained in:
Asher Foa
2025-06-05 19:00:20 -04:00
committed by GitHub
parent 990b1c921f
commit e258c6332d
5 changed files with 5 additions and 5 deletions

View File

@@ -210,7 +210,7 @@ class ForgeAgent:
)
return task, step
async def create_task(self, task_request: TaskRequest, organization_id: str | None = None) -> Task:
async def create_task(self, task_request: TaskRequest, organization_id: str) -> Task:
webhook_callback_url = str(task_request.webhook_callback_url) if task_request.webhook_callback_url else None
totp_verification_url = str(task_request.totp_verification_url) if task_request.totp_verification_url else None
task = await app.DATABASE.create_task(

View File

@@ -463,7 +463,7 @@ class AgentFunction:
return
async def validate_task_execution(
self, organization_id: str | None = None, task_id: str | None = None, task_version: str | None = None
self, organization_id: str, task_id: str | None = None, task_version: str | None = None
) -> None:
return

View File

@@ -312,7 +312,7 @@ class AgentDB:
LOG.error("UnexpectedError", exc_info=True)
raise
async def get_task_steps(self, task_id: str, organization_id: str | None = None) -> list[Step]:
async def get_task_steps(self, task_id: str, organization_id: str) -> list[Step]:
try:
async with self.Session() as session:
if steps := (

View File

@@ -49,7 +49,7 @@ class Step(BaseModel):
order: int
is_last: bool
retry_index: int = 0
organization_id: str | None = None
organization_id: str
input_token_count: int = 0
output_token_count: int = 0
reasoning_token_count: int | None = None

View File

@@ -231,7 +231,7 @@ class Task(TaskBase):
None,
description="The reason for the task failure.",
)
organization_id: str | None = None
organization_id: str
workflow_run_id: str | None = None
workflow_permanent_id: str | None = None
order: int | None = None