Get the index of the tab, not the line itself

This commit is contained in:
Matt Martz 2015-11-18 16:18:21 -08:00 committed by John Barker
parent e3dbe85f25
commit 2218e763f8

View file

@ -177,7 +177,7 @@ class ModuleValidator(Validator):
indent = INDENT_REGEX.search(line)
for i in indent.groups():
if '\t' in i:
index = line.index(i)
index = line.index('\t')
self.errors.append('indentation contains tabs. line %d '
'column %d' % (line_no + 1, index))