@@ -73,13 +73,14 @@ Additional notes on stub files:
73
73
Any identifier not defined in the stub is therefore assumed to be of type
74
74
``Any ``.
75
75
76
- The Typeshed Repo
77
- ^^^^^^^^^^^^^^^^^
78
-
79
- There is a `shared repository <https://github.com/python/typeshed >`_ where useful stubs are being
80
- collected. Policies regarding the stubs collected here are
81
- decided separately and reported in the repo's documentation.
76
+ The Typeshed Project
77
+ ^^^^^^^^^^^^^^^^^^^^
82
78
79
+ The `typeshed project <https://github.com/python/typeshed >`_ contains type
80
+ annotations for the standard library and a selection of third-party libraries
81
+ that don't ship their own type annotations or stubs. Policies regarding the
82
+ stubs collected there are decided separately and reported in the project's
83
+ documentation.
83
84
84
85
Type information in libraries
85
86
-----------------------------
@@ -194,13 +195,13 @@ Partial Stub Packages
194
195
Many stub packages will only have part of the type interface for libraries
195
196
completed, especially initially. For the benefit of type checking and code
196
197
editors, packages can be "partial". This means modules not found in the stub
197
- package SHOULD be searched for in parts four and five of the module resolution
198
- order above , namely inline packages and typeshed .
198
+ package SHOULD be searched for in part four of the module resolution
199
+ order below , namely inline packages.
199
200
200
- Type checkers should merge the stub package and runtime package or typeshed
201
+ Type checkers should merge the stub package and runtime package
201
202
directories. This can be thought of as the functional equivalent of copying the
202
- stub package into the same directory as the corresponding runtime package or
203
- typeshed folder and type checking the combined directory structure. Thus type
203
+ stub package into the same directory as the corresponding runtime package
204
+ and type checking the combined directory structure. Thus type
204
205
checkers MUST maintain the normal resolution order of checking ``*.pyi `` before
205
206
``*.py `` files.
206
207
@@ -216,8 +217,8 @@ are considered complete unless a ``py.typed`` with ``partial\n`` is included.
216
217
217
218
.. _mro :
218
219
219
- Import resolutiong ordering
220
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^
220
+ Import resolution ordering
221
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
221
222
222
223
The following is the order in which type checkers supporting this specification SHOULD
223
224
resolve modules containing type information:
@@ -238,8 +239,7 @@ resolve modules containing type information:
238
239
bundled with the package SHOULD be used (be they in ``.pyi `` type
239
240
stub files or inline in ``.py `` files).
240
241
241
- 5. Typeshed (if used) - Provides the stdlib types and several third party
242
- libraries.
242
+ 5. Typeshed (if used) - Provides the stdlib types.
243
243
244
244
If typecheckers identify a stub-only namespace package without the desired module
245
245
in step 3, they should continue to step 4/5. Typecheckers should identify namespace packages
0 commit comments