3 ms·
I've had the hardest time getting mypy to work well in vscode. Trying pyright with neovim now, curious how it goes.
by jshen 2y ago
I've had the hardest time getting mypy to work well in vscode. Trying pyright with neovim now, curious how it goes.
- teaearlgraycold 2y agopyright just requires the Microsoft Python extension. In my experience once you have that it works instantly.
- psychoslave 2y agoI don't know Pyright, but is it still Python? It's probably fair to bring it as Sorbet is mentioned, if course. But you can't use Sorbet using a pure ruby interpreter, if I'm getting it correctly, and I guess it's the same for Pyright. It's that so?
- thenipper 2y agoMypy/pyright aren’t interpreters. They’re basically just linters that you run against Python code to see any typing issues. I don’t mean that dismissively,they’re great tools.
- maleldil 2y agoPyright and mypy are typecheckers, completely orthogonal to the interpreter. They work like linters that statically perform type checking. By default, Python's type hints are ignored at runtime (i.e. you can do `x: str = 2`, and the runtime doesn't care), but there are tools to perform runtime checks (e.g. beartype) and libraries that make use of types as metadata (e.g. dataclasses, Pydantic, FastAPI).
- ReleaseCandidat 2y agoInstead of Pyright use Based Pyright for anything that isn't Code, and in Code (not Codium) you can use Pylance instead. https://github.com/DetachHead/basedpyright https://github.com/DetachHead/basedpyright