Skip to content

Commit 544e106

Browse files
author
hauntsaninja
committed
fix ensuing type errors
1 parent 8bb7bd8 commit 544e106

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mypy/report.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ def _write_out_report(self,
243243
f.write(separator + '\n')
244244
for row_values in rows:
245245
r = ("{:>{}}" * len(widths)).format(*itertools.chain(*zip(row_values, widths)))
246-
f.writelines(r + '\n')
246+
f.write(r + '\n')
247247
f.write(separator + '\n')
248248
footer_str = ("{:>{}}" * len(widths)).format(*itertools.chain(*zip(footer, widths)))
249-
f.writelines(footer_str + '\n')
249+
f.write(footer_str + '\n')
250250

251251
def _report_any_exprs(self) -> None:
252252
total_any = sum(num_any for num_any, _ in self.counts.values())

mypyc/build.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ def write_file(path: str, contents: str) -> None:
301301
old_contents = None
302302
if old_contents != encoded_contents:
303303
os.makedirs(os.path.dirname(path), exist_ok=True)
304-
with open(path, 'wb') as f:
305-
f.write(encoded_contents)
304+
with open(path, 'wb') as g:
305+
g.write(encoded_contents)
306306

307307
# Fudge the mtime forward because otherwise when two builds happen close
308308
# together (like in a test) setuptools might not realize the source is newer

0 commit comments

Comments
 (0)