3 ms·
Shout out to the amazing Pyright, the fast and feature-complete python LSP that you can use with any editor that supports the LSP protocol!
by davidatbu 5y ago
Shout out to the amazing Pyright, the fast and feature-complete python LSP that you can use with any editor that supports the LSP protocol!
- valinsky 5y agoI'm using VSCode with different Python specific extensions, like Pylance which uses Pyright, but it didn't warn me about the mutable function parameter. RIP
- EdwardDiego 5y agoHuh, that sucks. I use Intellij Ultimate for pretty much everything, and it (and the Python focused Pycharm) will definitely warn on this particular Python quirk.
- davidatbu 5y agoYou're right, I checked, and pyright only warns about function calls in default arguments, not mutable containers. I started a discussion in Pyright's repo here[0]. [0] https://github.com/microsoft/pyright/discussions/2306 https://github.com/microsoft/pyright/discussions/2306
- davidatbu 5y agoThanks to the maintainer's great responsiveness, Pyright will implement such a warning soon: https://github.com/microsoft/pyright/issues/2308 https://github.com/microsoft/pyright/issues/2308