Can mypy check docstrings?
问题 I have numpydoc-style docstrings: def foobar(filename, copy, dtype, iterable, shape, files): """ foobar is 42. Parameters ---------- filename : str copy : bool dtype : data-type iterable : iterable object shape : int or tuple of int files : list of str Returns ------- foobarfoo : int """ pass Is it possible to check if the docstring-types can possibly be correct? (side question: Can numpy return/print the function signatures it discovered?) For example, I would expect the following to fail: