Archive

Posts Tagged ‘monkeytype’

MonkeyType: generate static type annotations automatically

July 25, 2018 Leave a comment

In my previous post I wrote about mypy that can check type annotations.

MonkeyType (from Instagram) is a project that generates static type annotations by collecting runtime types. It can be a great help if you don’t want to do it manually.

I tried it and it works surprisingly well! However, the idea is to generate type annotations with MonkeyType and review the hints. “MonkeyType’s annotations are an informative first draft, to be checked and corrected by a developer.

Read the README of the project for an example.

Advertisements
Categories: python Tags: , , ,