Read the original article on my blog
In this fourth installment of the Hypermodern Python series, I’m going to discuss how to add type annotations and type checking to your project.¹ Previously, we discussed how to add linting, static analysis, and code formatting. (If you start reading here, you can also download the code for the previous chapter.)
Here are the topics covered in this chapter on Typing in Python:
- Type annotations and type checkers
- Static type checking with mypy
- Static type checking with pytype
- Adding type annotations to the package
- Data validation using Desert and Marshmallow
- Runtime type checking with Typeguard
- Increasing type coverage with flake8-annotations
- Adding type annotations to Nox sessions
- Adding type annotations to the test suite
Here is a full list of the articles in this series: