e-satis e-satis - 1 year ago 112
Python Question

How to use typeshed with mypy?

I cloned typeshed but I can't figure out how to tell mypy to use the type hints it contains, I see no option in mypy --help. The mypy repo does contain reference to the typeshed repo, but pip installing it doesn't not download it.

Answer Source

Mypy comes bundled with typeshed by default, so you shouldn't need to do anything -- simply doing pip install mypy-lang will install it correctly.

Note that typeshed is not a Python module, so it isn't possible to import it or otherwise access it from a Python program unless you literally look at the location in the filesystem the stubs are stored.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download