Type checking your Django code with django-types and Pyright with Kyle Bebak - DjangoCon US 2022

By now most of us have heard of, or used, Python type hints. Since being added to Python in 3.5, they've spread to every corner of the Python ecosystem.

These days many libraries are built from the ground up with type hints. But type hints don't have to live inline with the code, or even in the same repo. Anyone can write standalone type hints (also called stubs) for a framework like Django, and eventually people did.

In this talk I'll show you how to use a great set of type stubs for Django called https://github.com/sbdchd/django-types">django-types, how to check your type hints with https://github.com/microsoft/pyright">pyright, some of the challenges with adding type hints to Django code, and how to make type hints and type checking a real productivity boost.

This talk was presented at: https://2022.djangocon.us/talks/type-checking-your-django-code-with-and/

LINKS: Follow Kyle Bebak 👇

Follow DjangCon US 👇 https://twitter.com/djangocon

Follow DEFNA 👇 https://twitter.com/defnado https://www.defna.org/

Date Added: September 19, 2024

Watch Video