catapult-project / catapult

Deprecated Catapult GitHub. Please instead use http://crbug.com "Speed>Benchmarks" component for bugs and https://chromium.googlesource.com/catapult for downloading and editing source code..
https://chromium.googlesource.com/catapult
BSD 3-Clause "New" or "Revised" License
1.93k stars 564 forks source link

PRESUBMIT/Pylint runs are having issues #4365

Open riannucci opened 6 years ago

riannucci commented 6 years ago

Cross-filed at crbug.com/826871.

Essentially, Pylint used to work due to some extra environmental factors (depot_tools used to export all kinds of unpinned system stuff on PYTHONPATH). I started trying to fix some of the errors (https://chromium-review.googlesource.com/c/catapult/+/984721), but there are still more.

The problems w.r.t. distutils are VirtualEnv specific; I think we might want to add pylint ignore directives to these until upstream (depot_tools) is fixed.

eakuefner commented 6 years ago

@riannucci Can you explain how to repro this locally? It looks like builds on the Catapult presubmit bot are still running green. Should I just run using /usr/bin/env vpython? Do I have to use runtest?

For distutils, we already don't have that many usages in Catapult and some are already tagged with # pylint: disable=no-name-in-module. Happy to add more of these, if that's the problem, and TODO against a crbug about rolling pylint.

For the rest of the errors, I can poke at fixing them.

riannucci commented 6 years ago

Just need an up-to-date depot_tools in $PATH (and then some CL which touches a bunch of .py files, I just added whitespace to all PRESUBMIT.py files in the repo).

The no-name-in-module is really an artifact of pylint+virtualenv... they shouldn't really be necessary. Adding more of them is probably fine for now.