commit | e9fd8af09224316c5919d6e1da8b17506bf71bab | [log] [tgz] |
---|---|---|
author | Bruce Dawson <brucedawson@chromium.org> | Mon Jun 20 23:59:57 2022 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jun 20 23:59:57 2022 |
tree | cca2fe8109e210cef40fe971dbc4c2796ea664b4 | |
parent | 1ceb137b6fbd29d5e27afbc743bd0655cdee1aad [diff] |
Suppress new Pylint warnings in mb_unittest.py mb_unittest.py has been clean under Pylint for a while, but recently started showing these errors: 99:22: W0613: Unused argument 'env' (unused-argument) 99:32: W0613: Unused argument 'buffer_output' (unused-argument) 99:52: W0613: Unused argument 'stdin' (unused-argument) 119:21: W0613: Unused argument 'mode' (unused-argument) 793:4: W0201: Attribute 'ToSrcRelPath' defined outside __init__ (attribute-defined-outside-init) 800:4: W0201: Attribute 'ToSrcRelPath' defined outside __init__ (attribute-defined-outside-init) 833:4: W0201: Attribute 'ToSrcRelPath' defined outside __init__ (attribute-defined-outside-init) 842:4: W0201: Attribute 'ToSrcRelPath' defined outside __init__ (attribute-defined-outside-init) A bit of bisecting showed that the cause is a depot_tools change - crrev.com/c/3711282 - that reduces the number of parallel jobs in Pylint to avoid hangs and long startup times. For this particular Pylint task the job-count calculation worked out to just using one job and apparently more checks are done in that case! It was quite unexpected that adjusting the job count would trigger more warnings. Testing with presubmit --all configured to do serial Pylint checks everywhere didn't find any other errors. The unused-argument warnings were suppressed with 'del', the attribute-defined-outside-init warnings were suppressed by turning off that warning for this Pylint task, and while I was in PRESUBMIT.py some previously suppressed warnings were turned back on and fixed because they are trivial or no longer firing. This change was tested with this command: git cl presubmit --force --files tools/mb/mb_unittest.py In addition to the unused-argument and attribute-defined-outside-int warnings appearing when the checking became serial, testing of this change revealed that the spurious "Module 'PRESUBMIT' has no 'CheckFreeze'" warning only shows up when the checking is parallel. Bug: 1309977, 1336854 Change-Id: I3326cbadee330a587d97710c11ffcbbc01ad3df9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3712154 Reviewed-by: Gabriel Charette <gab@chromium.org> Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Cr-Commit-Position: refs/heads/main@{#1016013}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.