• Home
Name Date Size #Lines LOC

..--

.style.yapfD03-May-202429 22

README.mdD03-May-2024936 1713

pytype_runner.pyD03-May-20246.1 KiB179134

README.md

1This directory contains Python code for running pytype (a Python 3 type hinting
2analyzer) on Chromium Python code. pytype can infer types from un-annotated
3code, so it is not necessary to have type hinting added for all analyzed code
4and its dependencies. However, it is still recommended to do so eventually to
5ensure that the type hinting is as accurate as possible and to ensure that
6humans have up-to-date information about what functions take and return.
7
8
9To run pytype, simply import `pytype_runner.py` and call its `run_pytype`
10function with the correct arguments as specified in its docstring.
11
12It is recommended to NOT run this as part of presubmit, as depending on how many
13dependencies your code has, it can end up analyzing many files and taking
14multiple minutes. This time goes down dramatically once pytype has a cache
15built, but there is currently no way to ensure bots have a warm cache, so it
16should not be relied on.
17