3 ms·
PyCharm is good for this too. I've recently started using Type Hints by default. At the very least, it makes your code more readable. Nothing bad comes from th
by shanebellone 4y ago
PyCharm is good for this too.
I've recently started using Type Hints by default. At the very least, it makes your code more readable. Nothing bad comes from that.
- type-r 4y agoI started enforcing type hinting in my personal projects. 99% of the time it's easy and useful to add. When I can't figure out how to make a mypy error go away within 30 seconds, I just disable it for that line. I feel this makes for very good 80-20 value/effort tradeoff. I will say that more than one bug has been found after I disabled the single line hint though! Always surprising to me how powerful types can be.