3 ms·
I'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
by valinsky 5y ago
I'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