More not allowing org id to be None in some cases (mypy only) (#2620)

This commit is contained in:
Asher Foa
2025-06-09 12:09:19 -04:00
committed by GitHub
parent 311e641908
commit fc1e7ae37e
7 changed files with 17 additions and 9 deletions

View File

@@ -87,14 +87,15 @@ class ArtifactManager:
async def create_log_artifact(
self,
*,
log_entity_type: LogEntityType,
log_entity_id: str,
artifact_type: ArtifactType,
organization_id: str,
step_id: str | None = None,
task_id: str | None = None,
workflow_run_id: str | None = None,
workflow_run_block_id: str | None = None,
organization_id: str | None = None,
data: bytes | None = None,
path: str | None = None,
) -> str:

View File

@@ -77,7 +77,7 @@ class Artifact(BaseModel):
observer_thought_id: str | None = None
ai_suggestion_id: str | None = None
signed_url: str | None = None
organization_id: str | None = None
organization_id: str
def __getitem__(self, key: str) -> Any:
return getattr(self, key)

View File

@@ -77,7 +77,7 @@ class S3Storage(BaseStorage):
)
await self.async_client.upload_file(artifact.uri, data, storage_class=sc)
async def _get_storage_class_for_org(self, organization_id: str | None) -> S3StorageClass:
async def _get_storage_class_for_org(self, organization_id: str) -> S3StorageClass:
return S3StorageClass.STANDARD
async def retrieve_artifact(self, artifact: Artifact) -> bytes | None: