Skip to content

Commit d376633

Browse files
hauntsaninjaJukkaL
authored andcommitted
Fix mypyc regression with pretty (#16124)
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
1 parent 00cba13 commit d376633

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mypy/errors.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -909,8 +909,7 @@ def file_messages(self, path: str) -> list[str]:
909909
return []
910910
self.flushed_files.add(path)
911911
source_lines = None
912-
if self.options.pretty:
913-
assert self.read_source
912+
if self.options.pretty and self.read_source:
914913
source_lines = self.read_source(path)
915914
return self.format_messages(self.error_info_map[path], source_lines)
916915

0 commit comments

Comments
 (0)