Skip Navigation

Scout Archives

Home Projects Publications Archives About Sign Up or Log In


Pytype is a static analysis tool for Python code that performs data type inference and type checking. It is used by "thousands of projects at Google," to weed out errors. It will identify and flag places in the code where there is an execution path that can perform an operation that will fail because the types of the operands are incompatible. It also flags common mistakes, such as misspelled attribute names, calls to non-existent functions, and a long list of other possible errors. Users can also provide type annotations in comments for each function, declaring explicitly what the types of the arguments should be rather than relying on Pytype's inference engine. Pytype can also produce a list of all the data types it infers that can be used to add type annotations. Pytype can be installed via Python's `pip` package manager.
Archived Scout Publication URL
Scout Publication
GEM Subject
Date of Scout Publication
November 19th, 2021
Date Of Record Creation
November 10th, 2021 at 3:15pm
Date Of Record Release
November 12th, 2021 at 3:49pm
Resource URL Clicks
Add Comment


(no comments available yet)