Fix/suppress most pylint and gpylint warnings
* Add missing function doc strings. Suppress this warning on trivial functions in *_warn_patterns.py. * Remove unused g-importing-memeber, g-complex-comprehension. * Suppress pylint warning on unrecognized g-* options. * Suppress too-few-public-methods warnings on simple classes. * Suppress too-many-arguments and missing-function-docstring in html_writer.py, which will be refactored later. * Fix bad naming, long lines and line breaks, and bad quotes. Test: compare output for build.log Change-Id: Icdb34f014a10ec1e642c2cfe8003fc3ae245b507
This commit is contained in:
@@ -20,7 +20,8 @@ import multiprocessing
|
||||
import signal
|
||||
import sys
|
||||
|
||||
# pylint:disable=relative-beyond-top-level
|
||||
# pylint:disable=relative-beyond-top-level,no-name-in-module
|
||||
# suppress false positive of no-name-in-module warnings
|
||||
from . import warn_common as common
|
||||
|
||||
|
||||
@@ -50,6 +51,7 @@ def classify_warnings(args):
|
||||
|
||||
def create_and_launch_subprocesses(num_cpu, classify_warnings_fn, arg_groups,
|
||||
group_results):
|
||||
"""Fork num_cpu processes to classify warnings."""
|
||||
pool = multiprocessing.Pool(num_cpu)
|
||||
for cpu in range(num_cpu):
|
||||
proc_result = pool.map(classify_warnings_fn, arg_groups[cpu])
|
||||
@@ -59,6 +61,7 @@ def create_and_launch_subprocesses(num_cpu, classify_warnings_fn, arg_groups,
|
||||
|
||||
|
||||
def main():
|
||||
"""Old main() calls new common_main."""
|
||||
use_google3 = False
|
||||
common.common_main(use_google3, create_and_launch_subprocesses,
|
||||
classify_warnings)
|
||||
|
Reference in New Issue
Block a user