chromite: Split long strings on lines > 80 chars.
Black will only split strings at spaces.
We can tweak its `SPLIT_SAFE_CHARS` to split elsewhere -
https://github.com/psf/black/blob/main/src/black/trans.py#L76
Allowing splits at "-","/", and "." lets it deal with a few more
long strings in chromite automatically, so there will be fewer
suppressions when the line-too-long lint is introduced.
BUG=b:233893248
TEST=cros lint + CQ
Change-Id: Ic092be1d0a80a4c13fac30d19756db715b42b8dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4535497
Commit-Queue: Trent Apted <tapted@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Trent Apted <tapted@chromium.org>
diff --git a/scripts/sysmon/proc_metrics_unittest.py b/scripts/sysmon/proc_metrics_unittest.py
index 9563e81..5785e32 100644
--- a/scripts/sysmon/proc_metrics_unittest.py
+++ b/scripts/sysmon/proc_metrics_unittest.py
@@ -60,7 +60,8 @@
def setUp(self):
patcher = mock.patch(
- "chromite.third_party.infra_libs.ts_mon.common.interface.state.store",
+ "chromite.third_party.infra_libs.ts_mon.common.interface.state."
+ "store",
autospec=True,
)
self.store = patcher.start()
@@ -128,9 +129,9 @@
name="python",
cmdline=[
(
- "/usr/local/google/home/chromeos-test/.cache/cros_venv"
- "/venv-2.7.6-5addca6cf590166d7b70e22a95bea4a0"
- "/bin/python"
+ "/usr/local/google/home/chromeos-test/.cache/"
+ "cros_venv/venv-2.7.6-"
+ "5addca6cf590166d7b70e22a95bea4a0/bin/python"
),
"-m",
"chromite.scripts.sysmon",
@@ -178,8 +179,10 @@
name="python3.8",
cmdline=[
"/usr/bin/python3.8",
- "/home/chromeos-test/skylab_bots/"
- "c6-r16-r17-h13.2757785382/swarming_bot.1.zip",
+ (
+ "/home/chromeos-test/skylab_bots/"
+ "c6-r16-r17-h13.2757785382/swarming_bot.1.zip"
+ ),
"start_bot",
],
),
@@ -191,8 +194,10 @@
name="python",
cmdline=[
"python",
- "/tmp/chromeos-cache/common/gsutil_4.57.tar.gz/"
- "gsutil/gsutil",
+ (
+ "/tmp/chromeos-cache/common/gsutil_4.57.tar.gz/"
+ "gsutil/gsutil"
+ ),
"-o",
"Boto:num_retries=10",
"cat",