Type-checked Python in the real world
summary
Type annotations catch whole classes of bugs, remove guesswork about what functions accept and return, and let tests focus on logic rather than type space. The path shows gradual typing module by module, runtime traces to infer realistic signatures, and generating stub files to describe compiled or dynamic pieces. Examples report annotating a million‑LOC codebase incrementally, measuring error counts, and preventing regressions via CI so annotated modules stay clean.
AI-written summary · about
chapters (16)
- 0:00Intro
- 1:50"Items"?
- 7:18Running Mypy
- 8:07Type Inference
- 9:18Variable Annotation
- 10:28Union
- 11:00Optional
- 12:16Function Overloads
- 13:31Generic Functions
- 15:51Where's my duck?
- 19:33Any
- 20:03cast
- 21:08ignore
- 21:40stub (pyi) files
- 23:43The Plan
- 27:49Using Monkeytype
related talks
28mGradual Typing in Python
32mStatic Typing in Python
12mType Annotations in Python: Terribly Intimidating or Tremendously Informative?
57mWhy You Should Care About Types
16mTyping in Python: Bringing Clarity, Safety, and Speed to Your Code
29mStatic Typing in Python
38mMigrating existing codebases to using type annotations
23mGradual Typing in Python
