Type checking your Django code with django-types and Pyright

Oct 17 5:40 PM PDT :calendar: to 6:30 pm

About This Talk

Among the topics we’ll cover are:

  • A brief history of Django type stubs
  • Which type stubs, and which type checker: django-stubs or django-types, mypy or pyright?
  • Starting a project with type hints, or adding type hints to an existing project
  • Where to focus: adding type hints to Django models and views
  • Workarounds for when the type stubs aren’t quite right
  • Configuring pyright for type checking: running pyright on the host, in a container, on a CI server
  • pyright and LSP clients: turning your text editor (Vim, Emacs, Sublime Text, VS Code, etc) into a full-fledged Python/Django IDE
  • Type hints for documentation, code navigation, and refactoring

There will be live coding in the presentation. All code is open-sourced on GitHub, and links will be provided.

Presenters

    Kyle Bebak

    I’m Kyle, Lead Software Architect at Elementary.

    I like hanging out with my wife, walking my dog, biking, and coding, especially building stuff on the web.