Skip to content

Commit 0871ee8

Browse files
committed
typing
1 parent 92ecf9c commit 0871ee8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tools/cases_generator/lexer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,15 @@ def to_text(tkns: list[Token], dedent: int = 0) -> str:
345345
if dedent < 0:
346346
text = text.replace("\n", "\n" + " " * -dedent)
347347
elif dedent > 0:
348-
ret = []
348+
temp: list[str] = []
349349
for line in text.split("\n"):
350-
leading_space = len(line) - len(line.lstrip())
350+
leading_space: int = len(line) - len(line.lstrip())
351351
if leading_space > dedent:
352352
line = re.sub(r'(?m)^[ \t]{' + str(dedent) + r'}', '', line)
353353
else:
354354
line = re.sub(r'(?m)^[ \t]{' + str(leading_space) + r'}', '', line)
355-
ret.append(line)
356-
text = "\n".join(ret)
355+
temp.append(line)
356+
text = "\n".join(temp)
357357
res.append(text)
358358
line, col = tkn.end
359359
return "".join(res)

0 commit comments

Comments
 (0)