File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
738736def compile_unevaluated_page (
You can’t perform that action at this time.
0 commit comments