summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2013-05-20 02:05:48 +0100
committerArmin Ronacher <armin.ronacher@active-4.com>2013-05-20 02:05:48 +0100
commit41746b9246e7e17044a3ed8e6e240ada9699ea74 (patch)
treeb04c0703453ca0ce4893995284489a199e480b82
parentfb4352de509891991d5d6340afc9a608c7e23d61 (diff)
downloadjinja2-41746b9246e7e17044a3ed8e6e240ada9699ea74.tar.gz
Some more small cleanup for metaclasses
-rw-r--r--jinja2/compiler.py3
-rw-r--r--jinja2/ext.py1
-rw-r--r--jinja2/nodes.py1
-rw-r--r--jinja2/utils.py2
4 files changed, 2 insertions, 5 deletions
diff --git a/jinja2/compiler.py b/jinja2/compiler.py
index 4c7a52d..7a42c6d 100644
--- a/jinja2/compiler.py
+++ b/jinja2/compiler.py
@@ -10,11 +10,12 @@
"""
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
diff --git a/jinja2/ext.py b/jinja2/ext.py
index a88c088..c2df12d 100644
--- a/jinja2/ext.py
+++ b/jinja2/ext.py
@@ -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()
diff --git a/jinja2/nodes.py b/jinja2/nodes.py
index 26ba348..81fafb8 100644
--- a/jinja2/nodes.py
+++ b/jinja2/nodes.py
@@ -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
diff --git a/jinja2/utils.py b/jinja2/utils.py
index ba78148..b2e2df5 100644
--- a/jinja2/utils.py
+++ b/jinja2/utils.py
@@ -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.