Fix and reenable useless-object-inheritance.
Initial change generated using:
git ls-tree -r HEAD | awk '$1 != "120000" {print $NF}' | \
grep '\.py$' | grep -v -e ^third_party/ -e '_pb2\.py' | \
xargs sed -i 's/(object)//g'
Required only a handful of manual edits after that, mostly for
unrelated lint fixes.
BUG=None
TEST=run_tests, CQ
Change-Id: I0c57fdcf20124530ecd33ae3118506a2be9fc0ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4637436
Auto-Submit: Alex Klein <saklein@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Alex Klein <saklein@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/scripts/sysmon/git_metrics.py b/scripts/sysmon/git_metrics.py
index 2a5b07d..f8155e1 100644
--- a/scripts/sysmon/git_metrics.py
+++ b/scripts/sysmon/git_metrics.py
@@ -16,7 +16,7 @@
logger = logging.getLogger(__name__)
-class _GitRepo(object):
+class _GitRepo:
"""Helper class for running git commands."""
def __init__(self, gitdir):
@@ -56,7 +56,7 @@
return added_total, deleted_total
-class _GitMetricCollector(object):
+class _GitMetricCollector:
"""Class for collecting metrics about a git repository.
The constructor takes the arguments: `gitdir`, `metric_path`.