Skip to content

Commit

Permalink
refactor: move toestand from solara.lab to solara
Browse files Browse the repository at this point in the history
Reactive variables are not experimental anymore and this causes
circular imports for components in solara.lab that use reactive
for typing.
  • Loading branch information
maartenbreddels committed Sep 27, 2023
1 parent 348ab5a commit faae3b9
Show file tree
Hide file tree
Showing 5 changed files with 570 additions and 556 deletions.
8 changes: 7 additions & 1 deletion solara/lab/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# isort: skip_file
from .components import * # noqa: F401, F403
from .toestand import Reactive, Ref, State # noqa: F401


def __getattr__(name):
Expand All @@ -11,6 +10,7 @@ def __getattr__(name):
CrossFilterSelect,
CrossFilterSlider,
)
from solara.toestand import Reactive, Ref, State # noqa: F401

if name == "CrossFilterDataFrame":
return CrossFilterDataFrame
Expand All @@ -20,5 +20,11 @@ def __getattr__(name):
return CrossFilterSelect
elif name == "CrossFilterSlider":
return CrossFilterSlider
elif name == "Reactive":
return Reactive
elif name == "Ref":
return Ref
elif name == "State":
return State
else:
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
Loading

0 comments on commit faae3b9

Please sign in to comment.