Skip to content
Myr

Some more small cleanup for metaclasses

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent fb4352d · Browse files · 4 files+2 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+2 added−5 removed

  • other:+2 added−5 removed

4 files+2 added−5 removed

modified:jinja2/compiler.py+2 added-1 removed
8 unmodified lines
9 :license: BSD, see LICENSE for more details.10"""11from itertools import chain12from copy import deepcopy13from keyword import iskeyword as is_python_keyword14from jinja2 import nodes15from jinja2.nodes import EvalContext16from jinja2.visitor import NodeVisitor17from jinja2.exceptions import TemplateAssertionError17from jinja2.utils import Markup, concat, escape, is_python_keyword18from jinja2.utils import Markup, concat, escape19from jinja2._compat import range_type, next, text_type, string_types, \20 iteritems, NativeStringIO, imap2122
1625 unmodified lines
modified:jinja2/ext.py-1 removed
54 unmodified lines
55 they choose for configuration are not too generic. ``prefix`` for example56 is a terrible name, ``fragment_cache_prefix`` on the other hand is a good57 name as includes the name of the extension (fragment cache).58 """59 __metaclass__ = ExtensionRegistry5960 #: if this extension parses this is the list of tags it's listening to.61 tags = set()62
574 unmodified lines
modified:jinja2/nodes.py-1 removed
118 unmodified lines
119 two attributes: `lineno` (the line number of the node) and `environment`.120 The `environment` attribute is set at the end of the parsing process for121 all nodes automatically.122 """123 __metaclass__ = NodeType123 fields = ()124 attributes = ('lineno', 'environment')125 abstract = True126
785 unmodified lines
modified:jinja2/utils.py-2 removed
62 unmodified lines
63 assert filename is None or isinstance(filename, str), \64 'filenames must be strings'65 return filename6667from keyword import iskeyword as is_python_keyword676968def contextfunction(f):69 """This decorator can be used to mark a function or method context callable.70 A context callable is passed the active :class:`Context` as first argument when71 called from the template. This is useful if a function wants to get access
477 unmodified lines