From 2216616195cd225d7a7cad126771d49e2d96fde3 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 22 May 2017 10:47:51 -0700 Subject: [PATCH] Add explanation on how to use typeshed with mypy etc. (#1284) --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index e3c0f98e3..78cc4871a 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,32 @@ it before submitting pull requests.** Typeshed supports Python versions 2.7 and 3.3 and up. +## Using + +If you're just using mypy (or pytype or PyCharm), as opposed to +developing it, you don't need to interact with the typeshed repo at +all: a copy of typeshed is bundled with mypy. + +When you use a checked-out clone of the mypy repo, a copy of typeshed +should be included as a submodule, using + + $ git clone --recurse-submodules https://github.com/python/mypy.git + +or + + $ git clone https://github.com/python/mypy.git + $ cd mypy + $ git submodule init + $ git submodule update + +and occasionally you will have to repeat the final command (`git +submodule update`) to pull in changes made in the upstream typeshed +repo. + +PyCharm and pytype similarly include a copy of typeshed. The one in +pytype can be updated in the same way if you are working with the +pytype repo. + ## Format Each Python module is represented by a `.pyi` "stub". This is a normal Python