aboutsummaryrefslogtreecommitdiffstats
path: root/mako/ext/babelplugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'mako/ext/babelplugin.py')
-rw-r--r--mako/ext/babelplugin.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/mako/ext/babelplugin.py b/mako/ext/babelplugin.py
index ead7081..53d62ba 100644
--- a/mako/ext/babelplugin.py
+++ b/mako/ext/babelplugin.py
@@ -10,14 +10,15 @@ from mako.ext.extract import MessageExtractor
class BabelMakoExtractor(MessageExtractor):
+
def __init__(self, keywords, comment_tags, options):
self.keywords = keywords
self.options = options
self.config = {
- 'comment-tags': u' '.join(comment_tags),
- 'encoding': options.get('input_encoding',
- options.get('encoding', None)),
- }
+ 'comment-tags': u' '.join(comment_tags),
+ 'encoding': options.get('input_encoding',
+ options.get('encoding', None)),
+ }
super(BabelMakoExtractor, self).__init__()
def __call__(self, fileobj):
@@ -27,7 +28,7 @@ class BabelMakoExtractor(MessageExtractor):
comment_tags = self.config['comment-tags']
for lineno, funcname, messages, python_translator_comments \
in extract_python(code,
- self.keywords, comment_tags, self.options):
+ self.keywords, comment_tags, self.options):
yield (code_lineno + (lineno - 1), funcname, messages,
translator_strings + python_translator_comments)