Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help getting the plugin to work (mypy) #523

Closed
karb94 opened this issue Jan 27, 2024 · 5 comments
Closed

Help getting the plugin to work (mypy) #523

karb94 opened this issue Jan 27, 2024 · 5 comments

Comments

@karb94
Copy link

karb94 commented Jan 27, 2024

Hi, I've been trying for an hour to get the plugin to lint using mypy. I can see that a mypy process spawns in my process monitor but there is nothing showing up in Neovim.

My config:

require('lint').linters_by_ft.python = { 'mypy', }

Then in Neovim I run manually :lua require("lint").try_lint() and nothing shows up. If I run :lua = vim.diagnostic.get() I get an empty table.

if I run mypy in my terminal with the same default flags:

mypy --show-column-numbers --hide-error-codes --hide-error-context --no-color-output --no-error-summary --no-pretty myfile.py

I get mypy output with the errors in my file.

Are there any logs of the ouput somewhere I can check?

@replicaJunction
Copy link
Contributor

Are you on Windows? #480 affects mypy on Windows, and it would be fixed by #513.

@karb94
Copy link
Author

karb94 commented Feb 4, 2024

I'm on Linux (NixOS)

@BSiddharth
Copy link

BSiddharth commented Mar 9, 2024

@karb94 Were you able to fix this? I am having the same problem (I am on windows tho)

Edit: It does not work on my linux system either

@verbosemode
Copy link

verbosemode commented Jul 15, 2024

I ran into a problem with the same symptoms, due to an outdated mypy in my poetry lockfile. Upgrading mypy from 0.971 to the recent 1.10.1 fixed the issue in my case.

The older version didn't support the --show-error-end parameter, which is used by nvim-lint in its mypy configuration. This parameter reports the error locations in a file.

@karb94
Copy link
Author

karb94 commented Aug 10, 2024

This appears to be working for me now. As @verbosemode mentioned, this was likely a mypy version issue.

@karb94 karb94 closed this as completed Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants