@@ -20,7 +20,7 @@ def safe_string(x: str) -> SafeString:
2020
2121
2222class Tag :
23- __slots__ = (' tag_start' , ' rendered' , "closing_tag" , "no_children_close" )
23+ __slots__ = (" tag_start" , " rendered" , "closing_tag" , "no_children_close" )
2424
2525 def __init__ (self , name : str , self_closing : bool = False ) -> None :
2626 self .tag_start = f"<{ name } "
@@ -33,18 +33,18 @@ def __init__(self, name: str, self_closing: bool = False) -> None:
3333 self .rendered = f"{ self .tag_start } { self .no_children_close } "
3434
3535 def __call__ (
36- self , attributes : Dict [str , Optional [str ]], * children : Node
36+ self , attributes : Dict [str , Optional [str ]], * children : Node
3737 ) -> Union [TagTuple , SafeString ]:
3838 if attributes :
3939 # in this case this is faster than attrs = "".join([...])
4040 attrs = ""
4141 for key , val in attributes .items ():
42- attrs += ( " " + key if val is None else f' { key } ="{ val } "' )
42+ attrs += " " + key if val is None else f' { key } ="{ val } "'
4343
4444 if children :
4545 return f"{ self .tag_start } { attrs } >" , children , self .closing_tag
4646 else :
47- return f"{ self .tag_start } { attrs } { self .no_children_close } " ,
47+ return ( f"{ self .tag_start } { attrs } { self .no_children_close } " ,)
4848 return f"{ self .tag_start } >" , children , self .closing_tag
4949
5050
0 commit comments