On Fri, May 11, 2018 at 11:57 PM, Barry Warsaw <barry@python.org> wrote:
On May 11, 2018, at 12:23, Guido van Rossum <guido@python.org> wrote:
> Indeed, we have an implementation of this specific to mypy.

Is there anything in mypy’s implementation that can be generalized into a library?

Not sure, here's the code:
(also dmypy_util.py there)

--Guido van Rossum (python.org/~guido)