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.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Mypy comes bundled with typeshed by default, so you shouldn't need to do anything -- simply doing
pip install mypy
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.
Since version 0.4.6
mypy
has the option--custom-typeshed
:See command line reference for the documentation and Issue 2323 for the gory details.