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

Mypy fails when buffer is not yet saved #1618

@relaxdiego

Description

@relaxdiego

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions