@@ -476,14 +476,14 @@ def test_interpolated_style_attribute():
476476
477477
478478def TemplateComponent (
479- * children : Node , first : str , second : int , third : str , ** attrs : t .Any
479+ * children : Node , first : str , second : int , third_arg : str , ** attrs : t .Any
480480) -> Template :
481481 # Ensure type correctness of props at runtime for testing purposes
482482 assert isinstance (first , str )
483483 assert isinstance (second , int )
484- assert isinstance (third , str )
484+ assert isinstance (third_arg , str )
485485 new_attrs = {
486- "id" : third ,
486+ "id" : third_arg ,
487487 "data" : {"first" : first , "second" : second },
488488 ** attrs ,
489489 }
@@ -492,7 +492,7 @@ def TemplateComponent(
492492
493493def test_interpolated_template_component ():
494494 node = html (
495- t '<{TemplateComponent} first=1 second={99} third="comp1" class="my-comp">Hello, Component!</{TemplateComponent}>'
495+ t '<{TemplateComponent} first=1 second={99} third-arg ="comp1" class="my-comp">Hello, Component!</{TemplateComponent}>'
496496 )
497497 assert node == Element (
498498 "div" ,
@@ -539,13 +539,13 @@ def test_fragment_from_component():
539539
540540
541541def test_component_passed_as_attr_value ():
542- def WrapperComponent (
543- * children : Node , another : ComponentCallable , ** attrs : t .Any
542+ def Wrapper (
543+ * children : Node , sub_component : ComponentCallable , ** attrs : t .Any
544544 ) -> Template :
545- return t "<{another } {attrs}>{children}</{another }>"
545+ return t "<{sub_component } {attrs}>{children}</{sub_component }>"
546546
547547 node = html (
548- t '<{WrapperComponent} another ={TemplateComponent} class="wrapped" first=1 second={99} third="comp1"><p>Inside wrapper</p></{WrapperComponent }>'
548+ t '<{Wrapper} sub-component ={TemplateComponent} class="wrapped" first=1 second={99} third-arg ="comp1"><p>Inside wrapper</p></{Wrapper }>'
549549 )
550550 assert node == Element (
551551 "div" ,
0 commit comments