@@ -42,9 +42,10 @@ Making PEP 561 compatible packages
4242
4343PEP 561 notes three main ways to distribute type information. The first is a
4444package that has only inline type annotations in the code itself. The second is
45- a package that ships stub files with type information alongside the runtime
46- code. The third method, also known as a "stub only package" is a package that
47- ships type information for a package separately as stub files.
45+ a package that ships :ref: `stub files <stub-files >` with type information
46+ alongside the runtime code. The third method, also known as a "stub only
47+ package" is a package that ships type information for a package separately as
48+ stub files.
4849
4950If you would like to publish a library package to a package repository (e.g.
5051PyPI) for either internal or external use in type checking, packages that
@@ -105,8 +106,9 @@ the setup.py might look like:
105106 packages = [" package_b" ]
106107 )
107108
108- In this example, both ``lib.py `` and ``lib.pyi `` exist. At runtime, the Python
109- interpreter will use ``lib.py ``, but mypy will use ``lib.pyi `` instead.
109+ In this example, both ``lib.py `` and the ``lib.pyi `` stub file exist. At
110+ runtime, the Python interpreter will use ``lib.py ``, but mypy will use
111+ ``lib.pyi `` instead.
110112
111113If the package is stub-only (not imported at runtime), the package should have
112114a prefix of the runtime package name and a suffix of ``-stubs ``.
0 commit comments