Skip to content

Commit efd625f

Browse files
committed
merge with main
1 parent 1a3fba1 commit efd625f

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

reflex/compiler/compiler.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -684,9 +684,8 @@ def into_component(component: Component | ComponentCallable) -> Component:
684684
if (converted := _into_component_once(component)) is not None:
685685
return converted
686686
if not callable(component):
687-
raise TypeError(
688-
f"Expected a Component or callable, got {component!r} of type {type(component)}"
689-
)
687+
msg = f"Expected a Component or callable, got {component!r} of type {type(component)}"
688+
raise TypeError(msg)
690689

691690
try:
692691
component_called = component()
@@ -730,9 +729,8 @@ def into_component(component: Component | ComponentCallable) -> Component:
730729
if (converted := _into_component_once(component_called)) is not None:
731730
return converted
732731

733-
raise TypeError(
734-
f"Expected a Component, got {component_called!r} of type {type(component_called)}"
735-
)
732+
msg = f"Expected a Component, got {component_called!r} of type {type(component_called)}"
733+
raise TypeError(msg)
736734

737735

738736
def compile_unevaluated_page(

0 commit comments

Comments
 (0)