3 ms·
> That's how. There are so many Python linters out there. Ah, okay. I've been using pychecker, pyflakes and pylint for quite some time, was just hoping there w
by npsimons 6y ago
> That's how. There are so many Python linters out there.
Ah, okay. I've been using pychecker, pyflakes and pylint for quite some time, was just hoping there was something more that would help do stricter type checking. I'm aware of python-contract as an orthogonal way to enforce things, but was a little disappointed it's not included with standard python (at work I don't always have the option of installing external packages).
- tech2 6y agoIs using mypy for gradual typing not an option open to you? http://mypy-lang.org/ http://mypy-lang.org/
- npsimons 6y agoIt is at home! Thanks for the pointer!
- jmholla 6y agoThere's mypy[0] which does actual type checking with effort on your end. It is an external dependency, but you've already printed to a few external dependencies you're leveraging. [0]: http://mypy-lang.org/ http://mypy-lang.org/
- npsimons 6y ago"External" is relative; at home, I can install whatever I please, although I do prefer to stick to what is included with Debian stable, which is pretty comprehensive (it includes pychecker, pyflakes, pylint and python-contract). And indeed, mypy is there to! Thanks for the pointer! At work, we are limited (for the most part) to what is included in RHEL repositories, and even more by the fact we are still on 6.9 on some projects. Hence why I mentioned python-contract, as it's not in RHEL repos (that I could find). Thankfully pyflakes/checker/lint are. I will have to check for mypy.