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 7193796 commit 720df0d
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,5 +1,4 @@
# isort: skip_file
from .toestand import Reactive, Ref, State # noqa: F401
from .components import * # noqa: F401, F403


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 720df0d

Please sign in to comment.