diff --git a/mypy/build.py b/mypy/build.py index 8d5db0bab8df..119e8967f844 100644 --- a/mypy/build.py +++ b/mypy/build.py @@ -3211,7 +3211,11 @@ def parse_file(self, *, temporary: bool = False, raw_data: FileRawData | None = # The file was already parsed. return - if raw_data is None: + if raw_data is None and not ( + self.options.native_parser + and self.source is None + and self.manager.fscache.exists(self.xpath, real_only=True) + ): source = self.get_source() else: source = ""