@@ -10,9 +10,10 @@ Typeshed contains external type annotations for the Python standard library
10
10
and Python builtins, as well as third party packages as contributed by
11
11
people external to those projects.
12
12
13
- This data can e.g. be used for static analysis, type checking or type inference.
13
+ This data can e.g. be used for static analysis, type checking, type inference,
14
+ and autocompletion.
14
15
15
- For information on how to use ` typeshed ` , read below. Information for
16
+ For information on how to use typeshed, read below. Information for
16
17
contributors can be found in [ CONTRIBUTING.md] ( CONTRIBUTING.md ) . ** Please read
17
18
it before submitting pull requests; do not report issues with annotations to
18
19
the project the stubs are for, but instead report them here to typeshed.**
@@ -30,15 +31,15 @@ If you're just using a type checker ([mypy](https://github.com/python/mypy/),
30
31
developing it, you don't need to interact with the typeshed repo at
31
32
all: a copy of standard library part of typeshed is bundled with type checkers.
32
33
And type stubs for third party packages and modules you are using can
33
- be installed from PyPI. For example, if you are using ` six ` and ` requests ` ,
34
+ be installed from PyPI. For example, if you are using ` Pillow ` and ` requests ` ,
34
35
you can install the type stubs using
35
36
36
37
``` bash
37
- $ pip install types-six types-requests
38
+ $ pip install types-Pillow types-requests
38
39
```
39
40
40
41
These PyPI packages follow [ PEP 561] ( http://www.python.org/dev/peps/pep-0561/ )
41
- and are automatically released (multiple times a day, when needed ) by
42
+ and are automatically released (up to once a day) by
42
43
[ typeshed internal machinery] ( https://github.com/typeshed-internal/stub_uploader ) .
43
44
44
45
Type checkers should be able to use these stub packages when installed. For more
@@ -49,13 +50,11 @@ details, see the documentation for your type checker.
49
50
Version numbers of third-party stub packages consist of at least four parts.
50
51
All parts of the stub version, except for the last part, correspond to the
51
52
version of the runtime package being stubbed. For example, if the ` types-foo `
52
- package has version ` 1.2.0.7 ` , this guarantees that the ` types-foo ` package
53
+ package has version ` 1.2.0.20240309 ` , this guarantees that the ` types-foo ` package
53
54
contains stubs targeted against ` foo==1.2.* ` and tested against the latest
54
55
version of ` foo ` matching that specifier. In this example, the final element
55
- of the version (7) indicates that this is the eighth revision of the stubs for
56
- ` foo==1.2.* ` . If an update to the stubs were pushed (but the stubs were still
57
- aiming to provide annotations for ` foo==1.2.* ` ), then the version of
58
- ` types-foo ` would increment to ` 1.2.0.8 ` .
56
+ of the version number (20240309) indicates that the stub package was pushed on
57
+ March 9, 2024.
59
58
60
59
At typeshed, we try to keep breaking changes to a minimum. However, due to the
61
60
nature of stubs, any version bump can introduce changes that might make your
@@ -100,7 +99,7 @@ a problem arises that can't easily be fixed.
100
99
### The ` _typeshed ` package
101
100
102
101
typeshed includes a package ` _typeshed ` as part of the standard library.
103
- This package and its submodules contains utility types, but is not
102
+ This package and its submodules contain utility types, but are not
104
103
available at runtime. For more information about how to use this package,
105
104
[ see the ` stdlib/_typeshed ` directory] ( https://github.com/python/typeshed/tree/main/stdlib/_typeshed ) .
106
105
0 commit comments