2 ms·
From the FAQ[1]: > Does Coconut support static type checking? > Yes! Coconut compiles the newest, fanciest type annotation syntax into version-independent typ
by ben509 6y ago
From the FAQ[1]:
> Does Coconut support static type checking?
> Yes! Coconut compiles the newest, fanciest type annotation syntax into version-independent type comments which can then by checked using Coconut’s built-in MyPy Integration.
So it uses MyPy. I've never seen documentation on what overall algorithm they use, and the code[2] is not an easy read.
[1]: https://coconut.readthedocs.io/en/master/FAQ.html#does-coconut-support-static-type-checking https://coconut.readthedocs.io/en/master/FAQ.html#does-cocon...
[2]: https://github.com/python/mypy/blob/master/mypy/typeanal.py https://github.com/python/mypy/blob/master/mypy/typeanal.py