|
1 | 1 | import json |
2 | 2 | import re |
3 | | -from typing import Optional, Set, Tuple, Union |
| 3 | +from typing import Optional, Tuple, Union |
4 | 4 |
|
5 | 5 | import numcodecs |
6 | 6 | import orjson |
|
10 | 10 | from starlette.status import HTTP_400_BAD_REQUEST, HTTP_500_INTERNAL_SERVER_ERROR |
11 | 11 |
|
12 | 12 | from ..structures.core import StructureFamily |
13 | | -from ..type_aliases import Scopes |
| 13 | +from ..type_aliases import AccessTags, Scopes |
14 | 14 | from ..utils import ensure_awaitable |
15 | 15 | from .authentication import ( |
16 | 16 | get_current_access_tags, |
@@ -56,7 +56,7 @@ async def get_zarr_attrs( |
56 | 56 | request: Request, |
57 | 57 | path: str, |
58 | 58 | principal: Union[Principal] = Depends(get_current_principal), |
59 | | - authn_access_tags: Optional[Set[str]] = Depends(get_current_access_tags), |
| 59 | + authn_access_tags: Optional[AccessTags] = Depends(get_current_access_tags), |
60 | 60 | authn_scopes: Scopes = Depends(get_current_scopes), |
61 | 61 | root_tree: pydantic_settings.BaseSettings = Depends(get_root_tree), |
62 | 62 | session_state: dict = Depends(get_session_state), |
@@ -92,7 +92,7 @@ async def get_zarr_group_metadata( |
92 | 92 | request: Request, |
93 | 93 | path: str, |
94 | 94 | principal: Union[Principal] = Depends(get_current_principal), |
95 | | - authn_access_tags: Optional[Set[str]] = Depends(get_current_access_tags), |
| 95 | + authn_access_tags: Optional[AccessTags] = Depends(get_current_access_tags), |
96 | 96 | authn_scopes: Scopes = Depends(get_current_scopes), |
97 | 97 | root_tree: pydantic_settings.BaseSettings = Depends(get_root_tree), |
98 | 98 | session_state: dict = Depends(get_session_state), |
@@ -120,7 +120,7 @@ async def get_zarr_array_metadata( |
120 | 120 | request: Request, |
121 | 121 | path: str, |
122 | 122 | principal: Union[Principal] = Depends(get_current_principal), |
123 | | - authn_access_tags: Optional[Set[str]] = Depends(get_current_access_tags), |
| 123 | + authn_access_tags: Optional[AccessTags] = Depends(get_current_access_tags), |
124 | 124 | authn_scopes: Scopes = Depends(get_current_scopes), |
125 | 125 | root_tree: pydantic_settings.BaseSettings = Depends(get_root_tree), |
126 | 126 | session_state: dict = Depends(get_session_state), |
@@ -164,7 +164,7 @@ async def get_zarr_array( |
164 | 164 | request: Request, |
165 | 165 | path: str, |
166 | 166 | principal: Union[Principal] = Depends(get_current_principal), |
167 | | - authn_access_tags: Optional[Set[str]] = Depends(get_current_access_tags), |
| 167 | + authn_access_tags: Optional[AccessTags] = Depends(get_current_access_tags), |
168 | 168 | authn_scopes: Scopes = Depends(get_current_scopes), |
169 | 169 | root_tree: pydantic_settings.BaseSettings = Depends(get_root_tree), |
170 | 170 | session_state: dict = Depends(get_session_state), |
@@ -283,7 +283,7 @@ async def get_zarr_metadata( |
283 | 283 | request: Request, |
284 | 284 | path: str, |
285 | 285 | principal: Union[Principal] = Depends(get_current_principal), |
286 | | - authn_access_tags: Optional[Set[str]] = Depends(get_current_access_tags), |
| 286 | + authn_access_tags: Optional[AccessTags] = Depends(get_current_access_tags), |
287 | 287 | authn_scopes: Scopes = Depends(get_current_scopes), |
288 | 288 | root_tree: pydantic_settings.BaseSettings = Depends(get_root_tree), |
289 | 289 | session_state: dict = Depends(get_session_state), |
@@ -375,7 +375,7 @@ async def get_zarr_array( |
375 | 375 | path: str, |
376 | 376 | block: str, |
377 | 377 | principal: Union[Principal] = Depends(get_current_principal), |
378 | | - authn_access_tags: Optional[Set[str]] = Depends(get_current_access_tags), |
| 378 | + authn_access_tags: Optional[AccessTags] = Depends(get_current_access_tags), |
379 | 379 | authn_scopes: Scopes = Depends(get_current_scopes), |
380 | 380 | root_tree: pydantic_settings.BaseSettings = Depends(get_root_tree), |
381 | 381 | session_state: dict = Depends(get_session_state), |
@@ -456,7 +456,7 @@ async def get_zarr_group( |
456 | 456 | request: Request, |
457 | 457 | path: str, |
458 | 458 | principal: Union[Principal] = Depends(get_current_principal), |
459 | | - authn_access_tags: Optional[Set[str]] = Depends(get_current_access_tags), |
| 459 | + authn_access_tags: Optional[AccessTags] = Depends(get_current_access_tags), |
460 | 460 | authn_scopes: Scopes = Depends(get_current_scopes), |
461 | 461 | root_tree: pydantic_settings.BaseSettings = Depends(get_root_tree), |
462 | 462 | session_state: dict = Depends(get_session_state), |
|
0 commit comments