@@ -50,7 +50,7 @@ class TemplateNode(Node):
5050 """a 'container' node that stores the overall collection of nodes."""
5151
5252 def __init__ (self , filename ):
53- super (TemplateNode , self ).__init__ ("" , 0 , 0 , filename )
53+ super ().__init__ ("" , 0 , 0 , filename )
5454 self .nodes = []
5555 self .page_attributes = {}
5656
@@ -79,7 +79,7 @@ class ControlLine(Node):
7979 has_loop_context = False
8080
8181 def __init__ (self , keyword , isend , text , ** kwargs ):
82- super (ControlLine , self ).__init__ (** kwargs )
82+ super ().__init__ (** kwargs )
8383 self .text = text
8484 self .keyword = keyword
8585 self .isend = isend
@@ -127,7 +127,7 @@ class Text(Node):
127127 """defines plain text in the template."""
128128
129129 def __init__ (self , content , ** kwargs ):
130- super (Text , self ).__init__ (** kwargs )
130+ super ().__init__ (** kwargs )
131131 self .content = content
132132
133133 def __repr__ (self ):
@@ -152,7 +152,7 @@ class Code(Node):
152152 """
153153
154154 def __init__ (self , text , ismodule , ** kwargs ):
155- super (Code , self ).__init__ (** kwargs )
155+ super ().__init__ (** kwargs )
156156 self .text = text
157157 self .ismodule = ismodule
158158 self .code = ast .PythonCode (text , ** self .exception_kwargs )
@@ -179,7 +179,7 @@ class Comment(Node):
179179 """
180180
181181 def __init__ (self , text , ** kwargs ):
182- super (Comment , self ).__init__ (** kwargs )
182+ super ().__init__ (** kwargs )
183183 self .text = text
184184
185185 def __repr__ (self ):
@@ -194,7 +194,7 @@ class Expression(Node):
194194 """
195195
196196 def __init__ (self , text , escapes , ** kwargs ):
197- super (Expression , self ).__init__ (** kwargs )
197+ super ().__init__ (** kwargs )
198198 self .text = text
199199 self .escapes = escapes
200200 self .escapes_code = ast .ArgumentList (escapes , ** self .exception_kwargs )
@@ -228,7 +228,7 @@ class _TagMeta(type):
228228 def __init__ (cls , clsname , bases , dict_ ):
229229 if getattr (cls , "__keyword__" , None ) is not None :
230230 cls ._classmap [cls .__keyword__ ] = cls
231- super (_TagMeta , cls ).__init__ (clsname , bases , dict_ )
231+ super ().__init__ (clsname , bases , dict_ )
232232
233233 def __call__ (cls , keyword , attributes , ** kwargs ):
234234 if ":" in keyword :
@@ -293,7 +293,7 @@ def __init__(
293293 other arguments passed to the Node superclass (lineno, pos)
294294
295295 """
296- super (Tag , self ).__init__ (** kwargs )
296+ super ().__init__ (** kwargs )
297297 self .keyword = keyword
298298 self .attributes = attributes
299299 self ._parse_attributes (expressions , nonexpressions )
@@ -377,7 +377,7 @@ class IncludeTag(Tag):
377377 __keyword__ = "include"
378378
379379 def __init__ (self , keyword , attributes , ** kwargs ):
380- super (IncludeTag , self ).__init__ (
380+ super ().__init__ (
381381 keyword ,
382382 attributes ,
383383 ("file" , "import" , "args" ),
@@ -396,16 +396,14 @@ def undeclared_identifiers(self):
396396 identifiers = self .page_args .undeclared_identifiers .difference (
397397 {"__DUMMY" }
398398 ).difference (self .page_args .declared_identifiers )
399- return identifiers .union (
400- super (IncludeTag , self ).undeclared_identifiers ()
401- )
399+ return identifiers .union (super ().undeclared_identifiers ())
402400
403401
404402class NamespaceTag (Tag ):
405403 __keyword__ = "namespace"
406404
407405 def __init__ (self , keyword , attributes , ** kwargs ):
408- super (NamespaceTag , self ).__init__ (
406+ super ().__init__ (
409407 keyword ,
410408 attributes ,
411409 ("file" ,),
@@ -435,9 +433,7 @@ class TextTag(Tag):
435433 __keyword__ = "text"
436434
437435 def __init__ (self , keyword , attributes , ** kwargs ):
438- super (TextTag , self ).__init__ (
439- keyword , attributes , (), ("filter" ), (), ** kwargs
440- )
436+ super ().__init__ (keyword , attributes , (), ("filter" ), (), ** kwargs )
441437 self .filter_args = ast .ArgumentList (
442438 attributes .get ("filter" , "" ), ** self .exception_kwargs
443439 )
@@ -456,7 +452,7 @@ def __init__(self, keyword, attributes, **kwargs):
456452 c for c in attributes if c .startswith ("cache_" )
457453 ]
458454
459- super (DefTag , self ).__init__ (
455+ super ().__init__ (
460456 keyword ,
461457 attributes ,
462458 expressions ,
@@ -519,7 +515,7 @@ def __init__(self, keyword, attributes, **kwargs):
519515 c for c in attributes if c .startswith ("cache_" )
520516 ]
521517
522- super (BlockTag , self ).__init__ (
518+ super ().__init__ (
523519 keyword ,
524520 attributes ,
525521 expressions ,
@@ -575,7 +571,7 @@ class CallTag(Tag):
575571 __keyword__ = "call"
576572
577573 def __init__ (self , keyword , attributes , ** kwargs ):
578- super (CallTag , self ).__init__ (
574+ super ().__init__ (
579575 keyword , attributes , ("args" ), ("expr" ,), ("expr" ,), ** kwargs
580576 )
581577 self .expression = attributes ["expr" ]
@@ -595,7 +591,7 @@ def undeclared_identifiers(self):
595591
596592class CallNamespaceTag (Tag ):
597593 def __init__ (self , namespace , defname , attributes , ** kwargs ):
598- super (CallNamespaceTag , self ).__init__ (
594+ super ().__init__ (
599595 namespace + ":" + defname ,
600596 attributes ,
601597 tuple (attributes .keys ()) + ("args" ,),
@@ -632,7 +628,7 @@ class InheritTag(Tag):
632628 __keyword__ = "inherit"
633629
634630 def __init__ (self , keyword , attributes , ** kwargs ):
635- super (InheritTag , self ).__init__ (
631+ super ().__init__ (
636632 keyword , attributes , ("file" ,), (), ("file" ,), ** kwargs
637633 )
638634
@@ -648,9 +644,7 @@ def __init__(self, keyword, attributes, **kwargs):
648644 "enable_loop" ,
649645 ] + [c for c in attributes if c .startswith ("cache_" )]
650646
651- super (PageTag , self ).__init__ (
652- keyword , attributes , expressions , (), (), ** kwargs
653- )
647+ super ().__init__ (keyword , attributes , expressions , (), (), ** kwargs )
654648 self .body_decl = ast .FunctionArgs (
655649 attributes .get ("args" , "" ), ** self .exception_kwargs
656650 )
0 commit comments