44# pylint: disable=too-many-arguments
55
66
7- from typing import Annotated , Any , TypeAlias
7+ from typing import Annotated , Any , Final , TypeAlias
88
99from fastapi import APIRouter , Depends , Query , status
1010from 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)
235235async 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)
247247async def search (
248248 _path : Annotated [StorageLocationPathParams , Depends ()],
0 commit comments