mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(python): use standard dict/list type annotation
Since Python 3.9 list/dict can be used as type hint.
This commit is contained in:
parent
28970ccc91
commit
a509e40474
31 changed files with 175 additions and 195 deletions
|
@ -1,4 +1,4 @@
|
|||
from typing import Any, Callable, Dict, List, Optional
|
||||
from typing import Any, Callable, Optional
|
||||
|
||||
from prometheus_client import Counter
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
|
@ -19,7 +19,7 @@ def instrumentator():
|
|||
# Their license is included in LICENSES/starlette_exporter.
|
||||
# The code has been modified to remove child route checks
|
||||
# (since we don't have any) and to stay within an 80-width limit.
|
||||
def get_matching_route_path(scope: Dict[Any, Any], routes: List[Route],
|
||||
def get_matching_route_path(scope: dict[Any, Any], routes: list[Route],
|
||||
route_name: Optional[str] = None) -> str:
|
||||
"""
|
||||
Find a matching route and return its original path string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue