mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-07 19:49:23 +01:00
Use expandtabs instead of expanding by hand.
This commit is contained in:
parent
4a086e67e4
commit
d94b3f799e
@ -53,7 +53,7 @@ class Reader(object):
|
|||||||
if not line.strip():
|
if not line.strip():
|
||||||
continue
|
continue
|
||||||
line = line.rstrip('\r\n')
|
line = line.rstrip('\r\n')
|
||||||
line = line.replace('\t', ' '*8)
|
line = line.expandtabs()
|
||||||
s = line.lstrip(' ')
|
s = line.lstrip(' ')
|
||||||
indent = len(line) - len(s)
|
indent = len(line) - len(s)
|
||||||
if indent != self.indent:
|
if indent != self.indent:
|
||||||
@ -63,7 +63,6 @@ class Reader(object):
|
|||||||
self.creator = self.Creator(*self.args, **self.kwargs)
|
self.creator = self.Creator(*self.args, **self.kwargs)
|
||||||
self.modifiedCreator = False
|
self.modifiedCreator = False
|
||||||
self.indent = indent
|
self.indent = indent
|
||||||
(command, rest) = s.split(None, 1)
|
|
||||||
command = self.normalizeCommand(command)
|
command = self.normalizeCommand(command)
|
||||||
self.modifiedCreator = True
|
self.modifiedCreator = True
|
||||||
if hasattr(self.creator, command):
|
if hasattr(self.creator, command):
|
||||||
|
Loading…
Reference in New Issue
Block a user