File tree 11 files changed +273
-3
lines changed
11 files changed +273
-3
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,12 @@ Static Typing with Python
6
6
:maxdepth: 2
7
7
:caption: Contents:
8
8
9
- typing Module Documentation <https://docs.python.org/3/library/typing.html >
10
- source/libraries
11
- source/stubs
9
+ source/introduction
10
+
11
+ .. toctree ::
12
+ :maxdepth: 3
13
+
14
+ source/reference
12
15
13
16
14
17
Indices and tables
Original file line number Diff line number Diff line change
1
+ ****************
2
+ Type Annotations
3
+ ****************
4
+
5
+ Functions
6
+ =========
7
+
8
+ Parameters
9
+ ----------
10
+
11
+ Asynchronous Functions
12
+ ----------------------
13
+
14
+ Generators
15
+ ----------
16
+
17
+ Lambdas
18
+ -------
19
+
20
+
21
+ Classes
22
+ =======
23
+
24
+ Overloads and Overrides
25
+ -----------------------
26
+
27
+ Instance vs. Class Attributes
28
+ -----------------------------
29
+
30
+ Final attributes
31
+ ----------------
32
+
33
+ Abstract base classes
34
+ ---------------------
35
+
36
+
37
+ Globals
38
+ =======
39
+
40
+
41
+ Attributes
42
+ ==========
43
+
44
+
45
+ Locals
46
+ ======
47
+
48
+ Empty Containers
49
+ ----------------
50
+
51
+
52
+ Runtime Considerations
53
+ ======================
54
+
55
+ Comment vs. Inline Support
56
+ --------------------------
57
+
58
+ Forward References
59
+ ------------------
60
+
61
+ Generic types that don't implement `__getitem__ `
62
+ ------------------------------------------------
63
+
64
+ Conditioning on static type checking
65
+ ------------------------------------
66
+
67
+ from `__future__ ` import annotations
68
+ ------------------------------------
Original file line number Diff line number Diff line change
1
+ **********
2
+ The Basics
3
+ **********
Original file line number Diff line number Diff line change
1
+ **************************
2
+ Libraries and Dependencies
3
+ **************************
4
+
5
+ :doc: `libraries `
6
+
7
+ Typeshed
8
+ ========
9
+
10
+
11
+ Placeholder Stubs
12
+ =================
Original file line number Diff line number Diff line change
1
+ **************************
2
+ Frequently Asked Questions
3
+ **************************
4
+
5
+
6
+ Why Types?
7
+ ==========
8
+
9
+
10
+ Unsupported Python Features
11
+ ===========================
12
+
13
+
14
+ Common Errors
15
+ =============
16
+
17
+
18
+ Typing PEPs
19
+ ===========
20
+
21
+
22
+ Relevant Talks and Resources
23
+ ============================
Original file line number Diff line number Diff line change
1
+ **************
2
+ Type Inference
3
+ **************
4
+
5
+ Rules for local inference
6
+ =========================
7
+
8
+ Explicit vs. Implicit Local Types
9
+ ---------------------------------
10
+
11
+ Changing Types
12
+ ==============
13
+
14
+ Asserts
15
+ -------
16
+
17
+ Casts
18
+ -----
19
+
20
+ Type Guards
21
+ -----------
22
+
23
+
24
+ Protocols and Duck Typing
25
+ =========================
26
+
27
+ Callback Protocols
28
+ ------------------
Original file line number Diff line number Diff line change
1
+ *******************************
2
+ Introduction to Types in Python
3
+ *******************************
4
+
5
+
6
+ Background
7
+ ==========
8
+
9
+ How to read type annotations
10
+ ----------------------------
11
+
12
+ When and why types are useful
13
+ -----------------------------
14
+
15
+
16
+ Gradual Typing: Static Types in a Dynamic Language
17
+ ==================================================
18
+
19
+ Opt-in type checking
20
+ --------------------
21
+
22
+ Type stubs
23
+ ----------
24
+
25
+ :doc: `stubs `
26
+
27
+ Strategies for increasing coverage
28
+ ----------------------------------
29
+
30
+
31
+ Getting Started
32
+ ===============
33
+
34
+ Python type checkers
35
+ --------------------
36
+
37
+ How to annotate an existing codebase
38
+ ------------------------------------
39
+
40
+ Typeshed
41
+ --------
Original file line number Diff line number Diff line change
1
+ .. _libraries :
2
+
1
3
***********************
2
4
Typing Python Libraries
3
5
***********************
Original file line number Diff line number Diff line change
1
+ *********************
2
+ Type System Reference
3
+ *********************
4
+
5
+ .. toctree ::
6
+ :maxdepth: 2
7
+ :caption: Contents:
8
+
9
+ basics
10
+ type_system
11
+ annotations
12
+ inference
13
+ type_compatibility
14
+ dependencies
15
+ faq
Original file line number Diff line number Diff line change
1
+ ******************
2
+ Type Compatibility
3
+ ******************
4
+
5
+
6
+ The Class Hierarchy
7
+ ===================
8
+
9
+ Mutable Containers
10
+ ------------------
11
+
12
+ Comparing Callables: Covariance and Contravariance
13
+ --------------------------------------------------
14
+
15
+
16
+ Metaclasses
17
+ ===========
Original file line number Diff line number Diff line change
1
+ ***************
2
+ The Type System
3
+ ***************
4
+
5
+ Built-in Types
6
+ ==============
7
+
8
+ `typing Module Documentation <https://docs.python.org/3/library/typing.html >`__
9
+
10
+ Built-in Primitives
11
+ -------------------
12
+
13
+ Built-in operators
14
+ ------------------
15
+
16
+ Advanced Types
17
+ --------------
18
+
19
+
20
+ Simple User-Defined Types
21
+ =========================
22
+
23
+
24
+ Type Aliases
25
+ ============
26
+
27
+ Recursive Aliases
28
+ -----------------
29
+
30
+
31
+ Data Structures
32
+ ===============
33
+
34
+ Typed Dictionary
35
+ ----------------
36
+
37
+ Dataclass
38
+ ---------
39
+
40
+
41
+ Generic Types
42
+ =============
43
+
44
+
45
+ Type Variables
46
+ ==============
47
+
48
+ TypeVar
49
+ -------
50
+
51
+ Variadics
52
+ ---------
53
+
54
+ ParamSpec
55
+ ^^^^^^^^^
56
+
57
+ TypeVarTuple
58
+ ^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments