Commit 72a9a47f authored by Tomas Krizek's avatar Tomas Krizek

pylint: fix C0200 consider-using-enumerate

parent 786177f9
...@@ -840,15 +840,15 @@ def get_next(file_in, skip_empty=True): ...@@ -840,15 +840,15 @@ def get_next(file_in, skip_empty=True):
if not line: if not line:
return False return False
quoted, escaped = False, False quoted, escaped = False, False
for i in range(len(line)): for i, char in enumerate(line):
if line[i] == '\\': if char == '\\':
escaped = not escaped escaped = not escaped
if not escaped and line[i] == '"': if not escaped and char == '"':
quoted = not quoted quoted = not quoted
if line[i] in ';' and not quoted: if char == ';' and not quoted:
line = line[0:i] line = line[0:i]
break break
if line[i] != '\\': if char != '\\':
escaped = False escaped = False
tokens = ' '.join(line.strip().split()).split() tokens = ' '.join(line.strip().split()).split()
if not tokens: if not tokens:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment