提交 e3a05bba authored 作者: Ben Mares's avatar Ben Mares 提交者: Michael Osthege

Clean up a few types

Convert lines when `parse=False` from generator to list. The result when `parse=False` is only used in a warning message, and I don't think the generator would even print properly.
上级 bbeb7588
...@@ -2120,10 +2120,10 @@ class GCC_compiler(Compiler): ...@@ -2120,10 +2120,10 @@ class GCC_compiler(Compiler):
if p.returncode != 0: if p.returncode != 0:
return None return None
lines = BytesIO(stdout + stderr).readlines() lines_bytes = BytesIO(stdout + stderr).readlines()
lines = (l.decode() for l in lines) lines = [l.decode() for l in lines_bytes]
if parse: if parse:
selected_lines = [] selected_lines: list[str] = []
for line in lines: for line in lines:
if ( if (
"COLLECT_GCC_OPTIONS=" in line "COLLECT_GCC_OPTIONS=" in line
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论