if funcname:
message_lineno = lineno
call_stack += 1
+ elif in_def and tok == OP and value == ':':
+ # End of a class definition without parens
+ in_def = False
+ continue
elif call_stack == -1 and tok == COMMENT:
# Strip the comment token from the line
value = value.decode(encoding)[1:].strip()
pass
def ngettext(y='arg 1',z='arg 2',**pageargs):
pass
+class Meta:
+ verbose_name = _('log entry')
""")
messages = list(extract.extract_python(buf,
extract.DEFAULT_KEYWORDS.keys(),
[], {}))
self.assertEqual([(3, '_', u'Page arg 1', []),
- (3, '_', u'Page arg 2', [])],
+ (3, '_', u'Page arg 2', []),
+ (8, '_', u'log entry', [])],
messages)
def test_multiline(self):