3 ms·
I've found that religiously applying type annotations in Python helps, and using a mypy LSP plugin[1] allows for type checking as I'm writing Python code. [1]
by heavyset_go 6y ago
I've found that religiously applying type annotations in Python helps, and using a mypy LSP plugin[1] allows for type checking as I'm writing Python code.
[1] https://github.com/tomv564/pyls-mypy https://github.com/tomv564/pyls-mypy
- simias 6y agoI've given it a try but I found it really half-baked. For one thing I don't really believe you can successfully tack a type system as an afterthought onto a dynamic language but beyond that the fact that the default Python implementation effectively completely ignores these annotations make them borderline useless for me. If at the very least I could generate a runtime error on type mismatch that'd be worth it. As they stand I thought that they took a lot of effort to write and maintain for very little practical value.