aboutsummaryrefslogtreecommitdiffstats
path: root/backend/route_manager.py
diff options
context:
space:
mode:
authorGravatar decorator-factory <[email protected]>2020-12-15 08:13:37 +0300
committerGravatar decorator-factory <[email protected]>2020-12-15 08:13:37 +0300
commit947a30f7406b7d025cf2e5754b59389af4213718 (patch)
treec6236edb812db32f583ac0acc9099be33d1a0e2b /backend/route_manager.py
parentAdd ks123 (GH ks129) to CODEOWNERS (diff)
fix various type annotation issues
Diffstat (limited to 'backend/route_manager.py')
-rw-r--r--backend/route_manager.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/route_manager.py b/backend/route_manager.py
index 25529eb..7427298 100644
--- a/backend/route_manager.py
+++ b/backend/route_manager.py
@@ -6,13 +6,13 @@ import importlib
import inspect
from pathlib import Path
-from starlette.routing import Route as StarletteRoute, Mount
+from starlette.routing import Route as StarletteRoute, BaseRoute, Mount
from nested_dict import nested_dict
from backend.route import Route
-def construct_route_map_from_dict(route_dict: dict) -> list:
+def construct_route_map_from_dict(route_dict: dict) -> list[BaseRoute]:
route_map = []
for mount, item in route_dict.items():
if inspect.isclass(item):
@@ -26,7 +26,7 @@ def construct_route_map_from_dict(route_dict: dict) -> list:
return route_map
-def create_route_map() -> list:
+def create_route_map() -> list[BaseRoute]:
routes_directory = Path("backend") / "routes"
route_dict = nested_dict()