Skip to content

Commit a322f6e

Browse files
fix: constant
1 parent 692fec7 commit a322f6e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api/specs/web-server/_storage.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# pylint: disable=too-many-arguments
55

66

7-
from typing import Annotated, Any, TypeAlias
7+
from typing import Annotated, Any, Final, TypeAlias
88

99
from fastapi import APIRouter, Depends, Query, status
1010
from models_library.api_schemas_long_running_tasks.tasks import TaskGet
@@ -219,7 +219,7 @@ async def is_completed_upload_file(
219219
"""Returns state of upload completion"""
220220

221221

222-
_responses: dict[int | str, dict[str, Any]] = {
222+
_RESPONSES: Final[dict[int | str, dict[str, Any]]] = {
223223
i.status_code: {"model": EnvelopedError} for i in _TO_HTTP_ERROR_MAP.values()
224224
}
225225

@@ -230,7 +230,7 @@ async def is_completed_upload_file(
230230
response_model=Envelope[TaskGet],
231231
name="export_data",
232232
description="Export data",
233-
responses=_responses,
233+
responses=_RESPONSES,
234234
)
235235
async def export_data(export_data: DataExportPost, location_id: LocationID):
236236
"""Trigger data export. Returns async job id for getting status and results"""
@@ -242,7 +242,7 @@ async def export_data(export_data: DataExportPost, location_id: LocationID):
242242
response_model=Envelope[TaskGet],
243243
name="search",
244244
description="Starts a files/folders search",
245-
responses=_responses,
245+
responses=_RESPONSES,
246246
)
247247
async def search(
248248
_path: Annotated[StorageLocationPathParams, Depends()],

0 commit comments

Comments
 (0)