Skip to content

Commit

Permalink
Fix mypyc regression with pretty (#16124)
Browse files Browse the repository at this point in the history
Fixes #15877

Regression was introduced by #15070. Previously Errors objects created
in mypyc build would just use all the default values, now they use the
actual options object involved
  • Loading branch information
hauntsaninja authored and JukkaL committed Oct 10, 2023
1 parent 00cba13 commit d376633
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mypy/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,7 @@ def file_messages(self, path: str) -> list[str]:
return []
self.flushed_files.add(path)
source_lines = None
if self.options.pretty:
assert self.read_source
if self.options.pretty and self.read_source:
source_lines = self.read_source(path)
return self.format_messages(self.error_info_map[path], source_lines)

Expand Down

0 comments on commit d376633

Please sign in to comment.