Enables the import-error pylint check on //testing. Most errors are
fixed by updating the PYTHONPATH used by pylint to include the necessary
directories, although some import errors are simply suppressed (most
commonly for vpython-provided modules).
Also takes this opportunity to add comments about where each block of
non-standard imports comes from. This was already present in a number of
places, but not everywhere.
Bug: 353942917
Change-Id: I506d35e5a6ae56471618e6b4af57dd2ecb64dd7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092016
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Paul Semel <paulsemel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1396194}
Some subdirs have their own .style.yapf files (like
//testing/pytype_common/), but most do not. This has lead to a lot of
python code in //testing/ naturally being developed with no
consistent styling. This can make things a little hard to read when
put in the context of other py code throughout the repo that's much
more consistent.
So this:
- adds a basic //testing/.style.yapf file
- adds another testing/trigger_scripts/.style.yapf file that's similar
but sets indent to 4, since the code in that dir currently uses
4 indents
- reformats everything
- adds a presubmit checkout to //testing/PRESUBMIT.py to enforce that
things stay formatted
Bug: 340623285
Change-Id: I2a6707ba2f6f784454d348a19280dca2ca90804b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5540460
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301583}