Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2140,6 +2140,7 @@ def parse_file(self, *, temporary: bool = False) -> None:
# other systems, but os.strerror(ioerr.errno) does not, so we use that.
# (We want the error messages to be platform-independent so that the
# tests have predictable output.)
assert ioerr.errno is not None
raise CompileError(
[
"mypy: can't read file '{}': {}".format(
Expand Down
1 change: 1 addition & 0 deletions mypy/modulefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@ def get_search_dirs(python_executable: str | None) -> tuple[list[str], list[str]
print(err.stdout)
raise
except OSError as err:
assert err.errno is not None
reason = os.strerror(err.errno)
raise CompileError(
[f"mypy: Invalid python executable '{python_executable}': {reason}"]
Expand Down
Loading