Mypy

mypy1

Mypy is an open source static type checker for Python. Users can either use it or not, but by using it, Python code can be checked for common type errors without running it. Furthermore it might help a developer to find bugs (i.e. rounded integer errors) in his own code. It can be used on Python 2.7 and 3

Mypy is used by many companies and projects, where one of the largest companies is Dropbox.

In the upcoming blog posts, an in-depth analysis of mypy will be constructed. First the project vision is investigated, including the stakeholders and the roadmap. The second blog post will consist of the architectural overview constructed from the project vision. Thirdly we will look into the code perspective of the project. Lastly one blog post will be a deeper analysis of the project.

Authors

The blogposts will be written by four students from the TU Delft:

  • Michel Wervers
  • Abtin Kerami
  • David Zwart
  • Niels Hoogerwerf
  1. https://github.com/python/mypy 

The vision behind mypy

In our first blogpost, the main focus will lie on identifying what mypy’s properties are and for whom it is created. As a real system architect one could identify this as the vision of the project.

Architecture of mypy

Welcome back all! Today we will dive deeper into the architecture of mypy. As this is our second blogpost, we assume that you have some basic knowledge about what mypy is and what you can do with it. If you have no clue what we are talking about, please check our previous blogpost.

Checking the typechecker mypy

Analyzing a system which is usually doing the type-checking analysis for us, feels like we’re suddenly on the other end of the rope. This time, we’ll cover the code quality aspect of the python library mypy and how quality is guaranteed. Read on, if you’d like to know how we think mypy can be improved on an architectural level!

The configuration of mypy

The last blog post was quite a difficult story, wasn’t it. In this blog post, we will conclude our mypy investigation series after quite a rollercoaster ride. The final topic will be a bit simpler (but don’t underestimate it). This last blogpost will investigate the configurability of mypy and why we would want to configure it.

Contributor Workflow - an optimization analysis

We’re back one extra and final time to explain our experience on working with mypy as an open-source project in hind-sight. Lucky you! Something really interesting happened, while we contributed some functional and documentation-related features to this python typechecking library. We’ve setup our own workflow, we went through the process of understanding not only the library, but also it’s environment and testing system (CI), and now we’ve got something quite interesting to tell you about what we think mypy can improve on!