Pyright and Pylama for neovim Python development
Switching to
pyright
🪨It turned out that
pylsp
wasn't all that I thought it was, and I've switch to Microsoft's LSP,pyright
. It's job is to do, in addition to a limited amount of linting (which I'll probably turn off), the static type-checking that I was usingmypy
for, except even better: finallymatch
statement support! This left me to re-includenull-ls
for formatting withblack
andisort
, and diagnostics withpylama
. But there were a few problems.
If working on a library that has some strict lower Python version, e.g. lower than 3.10, then it is a good idea to require pyright locally, to have a local
poetry.toml
file with the following