Home > python > MonkeyType: generate static type annotations automatically

MonkeyType: generate static type annotations automatically

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: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: