]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Some more small cleanup for metaclasses
authorArmin Ronacher <armin.ronacher@active-4.com>
Mon, 20 May 2013 01:05:48 +0000 (02:05 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Mon, 20 May 2013 01:05:48 +0000 (02:05 +0100)
jinja2/compiler.py
jinja2/ext.py
jinja2/nodes.py
jinja2/utils.py

index 4c7a52df5d2e7ace7aa545a4ea8bf8026a6b1346..7a42c6d4503a5be60bd3f4d2a76b9a1056c62a7e 100644 (file)
 """
 from itertools import chain
 from copy import deepcopy
+from keyword import iskeyword as is_python_keyword
 from jinja2 import nodes
 from jinja2.nodes import EvalContext
 from jinja2.visitor import NodeVisitor
 from jinja2.exceptions import TemplateAssertionError
-from jinja2.utils import Markup, concat, escape, is_python_keyword
+from jinja2.utils import Markup, concat, escape
 from jinja2._compat import range_type, next, text_type, string_types, \
      iteritems, NativeStringIO, imap
 
index a88c088dba3c241887e85f785b7bc83553939d0b..c2df12d5592c4275135beffdb2194b22877c4654 100644 (file)
@@ -56,7 +56,6 @@ class Extension(with_metaclass(ExtensionRegistry, object)):
     is a terrible name, ``fragment_cache_prefix`` on the other hand is a good
     name as includes the name of the extension (fragment cache).
     """
-    __metaclass__ = ExtensionRegistry
 
     #: if this extension parses this is the list of tags it's listening to.
     tags = set()
index 26ba34830739998bd2fd280b89b56a5cd3322e0a..81fafb8b8d0a7f9efafc4d582cc3ef0139bd7dbb 100644 (file)
@@ -120,7 +120,6 @@ class Node(with_metaclass(NodeType, object)):
     The `environment` attribute is set at the end of the parsing process for
     all nodes automatically.
     """
-    __metaclass__ = NodeType
     fields = ()
     attributes = ('lineno', 'environment')
     abstract = True
index ba78148073b8ae7b3821975c70b4be051ff77e32..b2e2df5fe64a71150cecd704f5da503bc3687816 100644 (file)
@@ -64,8 +64,6 @@ else:
             'filenames must be strings'
         return filename
 
-from keyword import iskeyword as is_python_keyword
-
 
 def contextfunction(f):
     """This decorator can be used to mark a function or method context callable.