The Dropbox journey to static type checking with Python

Type Annotation is a feature that allows Python to maintain it’s dynamic typing and enable option static typing in the same code base. With the arrival of Python 3.5, the language implemented PEP 484, that describes a syntax to annotate code with type hints. Dropbox took a journey to leverage this option on 4 million lines of code for better quality. Here are their experiences.

Combined count of type annotated lines of code.
Type annotation

Dropbox is a big user of Python. It’s our most widely used language both for backend services and the desktop client app (we are also heavy users of Go, TypeScript, and Rust).

Source: Our journey to type checking 4 million lines of Python | Dropbox Tech Blog


Posted

in

by