Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Mypy fails when buffer is not yet saved #1618

Open
relaxdiego opened this issue Jul 8, 2023 · 0 comments
Open

Mypy fails when buffer is not yet saved #1618

relaxdiego opened this issue Jul 8, 2023 · 0 comments

Comments

@relaxdiego
Copy link

When creating a new file via the command nvim /path/to/nonexistent.py, mypy fails with the following error:

mypy: can't read file '/path/to/nonexistent.py': No such file or directory

Looking at the code, it looks like it's due to the following arguments, specifically the params.bufname parts.

args = function(params)
return {
"--hide-error-codes",
"--hide-error-context",
"--no-color-output",
"--show-absolute-path",
"--show-column-numbers",
"--show-error-codes",
"--no-error-summary",
"--no-pretty",
"--shadow-file",
params.bufname,
params.temp_path,
params.bufname,
}
end,

Should the the builtin first try to save the buffer to a temporary file if it finds that the file doesn't yet exist?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant