This repository was archived by the owner on Aug 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 761
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
Copy link
Copy link
Open
Description
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.
null-ls.nvim/lua/null-ls/builtins/diagnostics/mypy.lua
Lines 26 to 41 in db09b6c
| 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?
PenaflorPhi and xunoaib
Metadata
Metadata
Assignees
Labels
No labels