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 committed Sep 17, 2023
1 parent b65cd9a commit c99b936
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mypy/errors.py
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 c99b936

Please sign in to comment.