Skip to content

Commit

Permalink
fix: typing for modules in autorouting
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Mar 8, 2024
1 parent 091a01c commit 6e376a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solara/autorouting.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import warnings
from pathlib import Path
from types import ModuleType
from typing import Any, Callable, List, Optional, cast
from typing import Any, Callable, Dict, List, Optional, cast

import ipywidgets
import reacton
Expand Down Expand Up @@ -126,7 +126,7 @@ def RenderPage(main_name: str = "Page"):
level_start = solara.use_route_level()
router = solara.use_context(solara.routing.router_context)
# we use these to cache script runs that use regular ipywidgets
modules = solara.use_memo(dict, dependencies=[])
modules = cast(Dict[str, ModuleType], solara.use_memo(dict, dependencies=[]))
modules_modified_times = solara.use_memo(dict, dependencies=[])

if len(router.path_routes) <= level_start:
Expand Down

0 comments on commit 6e376a3

Please sign in to comment.