PyCharm 2017.1 Help

Using Python Stubs and Typeshed

Typeshed is a set of files with type annotations for the standard Python library and various packages. Typeshed stubs provide definitions for Python classes, functions, and modules defined with type hints. PyCharm uses this information for better code completion, inspections, and other code insight features.

PyCharm is switching to Typeshed, the common repository for Python stubs. The Typeshed stubs bundled with PyCharm are shown in the project view under the node External Libraries | <Python interpreter> | Typeshed Stubs. Note that PyCharm currently uses only a few of the bundled stubs (i.e. builtins.pyi, typing.pyi, and several others).

To override the bundled Typeshed repository with your own version, follow these steps:

  1. Copy some or all the stubs into a directory in your project.
  2. Mark a directory as a source root by choosing Mark Directory as | Sources Root from the context menu of the directory.

The Python skeletons repository https://github.com/JetBrains/python-skeletons is now deprecated.

See Also

External Links:

Last modified: 26 July 2017