Skip to content

Commit 440f5eb

Browse files
committed
Fix lint errors
1 parent 85e4716 commit 440f5eb

File tree

22 files changed

+51
-50
lines changed

22 files changed

+51
-50
lines changed

tensorboard/BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Description:
22
# TensorBoard, a dashboard for investigating TensorFlow
33

4-
load("//tensorboard/defs:py_repl.bzl", "py_repl")
5-
load("//tensorboard/defs:web.bzl", "tf_web_library")
6-
load("//tensorboard/defs:zipper.bzl", "tensorboard_zip_file")
74
load("@rules_python//python:py_binary.bzl", "py_binary")
85
load("@rules_python//python:py_library.bzl", "py_library")
96
load("@rules_python//python:py_test.bzl", "py_test")
7+
load("//tensorboard/defs:py_repl.bzl", "py_repl")
8+
load("//tensorboard/defs:web.bzl", "tf_web_library")
9+
load("//tensorboard/defs:zipper.bzl", "tensorboard_zip_file")
1010

1111
package(default_visibility = [":internal"])
1212

tensorboard/backend/event_processing/data_provider.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ def read_last_scalars(
156156
for tag, metadata in tags_for_run.items():
157157
events = self._multiplexer.Tensors(run, tag)
158158
if events:
159-
run_tag_to_last_scalar_datum[run][tag] = (
160-
_convert_scalar_event(events[-1])
161-
)
159+
run_tag_to_last_scalar_datum[run][
160+
tag
161+
] = _convert_scalar_event(events[-1])
162162

163163
return run_tag_to_last_scalar_datum
164164

tensorboard/data/grpc_provider.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ def read_last_scalars(
178178
# There should be no more than one datum in
179179
# `tag_entry.data` since downsample was set to 1.
180180
for step, wt, value in zip(d.step, d.wall_time, d.value):
181-
result[run_name][tag_entry.tag_name] = (
182-
provider.ScalarDatum(
183-
step=step,
184-
wall_time=wt,
185-
value=value,
186-
)
181+
result[run_name][
182+
tag_entry.tag_name
183+
] = provider.ScalarDatum(
184+
step=step,
185+
wall_time=wt,
186+
value=value,
187187
)
188188
return result
189189

tensorboard/defs/BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
2-
load("@rules_python//python:py_binary.bzl", "py_binary")
3-
load("@rules_python//python:py_test.bzl", "py_test")
41
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
52
load("@npm//@bazel/concatjs:index.bzl", "ts_library")
3+
load("@rules_python//python:py_binary.bzl", "py_binary")
4+
load("@rules_python//python:py_test.bzl", "py_test")
5+
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
66

77
package(default_visibility = ["//tensorboard:internal"])
88

tensorboard/plugins/custom_scalar/custom_scalars_plugin_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ def createPlugin(self, logdir):
177177
custom_scalars_plugin_instance,
178178
]
179179
for plugin_instance in plugin_instances:
180-
plugin_name_to_instance[plugin_instance.plugin_name] = (
181-
plugin_instance
182-
)
180+
plugin_name_to_instance[
181+
plugin_instance.plugin_name
182+
] = plugin_instance
183183
return custom_scalars_plugin_instance
184184

185185
def test_download_url_json(self):

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
load("//tensorboard/defs:defs.bzl", "tf_ng_module", "tf_ng_web_test_suite", "tf_sass_binary", "tf_ts_library")
21
load("@rules_python//python:py_binary.bzl", "py_binary")
2+
load("//tensorboard/defs:defs.bzl", "tf_ng_module", "tf_ng_web_test_suite", "tf_sass_binary", "tf_ts_library")
33

44
package(default_visibility = ["//tensorboard:internal"])
55

tensorboard/plugins/graph/keras_util_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424

2525
class KerasUtilTest(tf.test.TestCase):
26-
2726
def setUp(self):
2827
super(KerasUtilTest, self).setUp()
2928
# Resets all generated states before each test.

tensorboard/plugins/histogram/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Description:
22
# TensorBoard plugin for histograms
33

4-
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
54
load("@rules_python//python:py_binary.bzl", "py_binary")
65
load("@rules_python//python:py_library.bzl", "py_library")
76
load("@rules_python//python:py_test.bzl", "py_test")
7+
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
88

99
package(default_visibility = ["//tensorboard:internal"])
1010

tensorboard/plugins/hparams/BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Description:
22
# TensorBoard plugin for hparams
33

4-
load("//tensorboard/defs:defs.bzl", "tf_ts_library")
5-
load("//tensorboard/defs:web.bzl", "tf_web_library")
6-
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
74
load("@rules_python//python:py_binary.bzl", "py_binary")
85
load("@rules_python//python:py_library.bzl", "py_library")
96
load("@rules_python//python:py_test.bzl", "py_test")
7+
load("//tensorboard/defs:defs.bzl", "tf_ts_library")
8+
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
9+
load("//tensorboard/defs:web.bzl", "tf_web_library")
1010

1111
package(default_visibility = ["//tensorboard:internal"])
1212

tensorboard/plugins/image/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Description:
22
# TensorBoard plugin for images
33

4-
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
54
load("@rules_python//python:py_binary.bzl", "py_binary")
65
load("@rules_python//python:py_library.bzl", "py_library")
76
load("@rules_python//python:py_test.bzl", "py_test")
7+
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
88

99
package(default_visibility = ["//tensorboard:internal"])
1010

tensorboard/plugins/mesh/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
21
load("@rules_python//python:py_binary.bzl", "py_binary")
32
load("@rules_python//python:py_library.bzl", "py_library")
43
load("@rules_python//python:py_test.bzl", "py_test")
4+
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
55

66
package(default_visibility = ["//tensorboard:internal"])
77

tensorboard/plugins/pr_curve/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Description:
22
# TensorBoard plugin for precision-recall curves.
33

4-
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
54
load("@rules_python//python:py_binary.bzl", "py_binary")
65
load("@rules_python//python:py_library.bzl", "py_library")
76
load("@rules_python//python:py_test.bzl", "py_test")
7+
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
88

99
package(default_visibility = ["//tensorboard:internal"])
1010

tensorboard/plugins/projector/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Embedding Projector plugin.
22

3-
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
43
load("@rules_python//python:py_binary.bzl", "py_binary")
54
load("@rules_python//python:py_library.bzl", "py_library")
65
load("@rules_python//python:py_test.bzl", "py_test")
6+
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
77

88
package(default_visibility = ["//tensorboard:internal"])
99

tensorboard/plugins/scalar/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Description:
22
# TensorBoard plugin for scalars
33

4-
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
54
load("@rules_python//python:py_binary.bzl", "py_binary")
65
load("@rules_python//python:py_library.bzl", "py_library")
76
load("@rules_python//python:py_test.bzl", "py_test")
7+
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
88

99
package(default_visibility = ["//tensorboard:internal"])
1010

tensorboard/plugins/text/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Description:
22
# TensorBoard plugin for the Text
33

4-
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
54
load("@rules_python//python:py_binary.bzl", "py_binary")
65
load("@rules_python//python:py_library.bzl", "py_library")
76
load("@rules_python//python:py_test.bzl", "py_test")
7+
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
88

99
package(default_visibility = ["//tensorboard:internal"])
1010

tensorboard/summary/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Description:
22
# Summary API for TensorBoard.
33

4-
load("//tensorboard/defs:py_repl.bzl", "py_repl")
54
load("@rules_python//python:py_library.bzl", "py_library")
65
load("@rules_python//python:py_test.bzl", "py_test")
6+
load("//tensorboard/defs:py_repl.bzl", "py_repl")
77

88
package(default_visibility = ["//tensorboard:internal"])
99

tensorboard/util/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
21
load("@rules_python//python:py_library.bzl", "py_library")
32
load("@rules_python//python:py_test.bzl", "py_test")
3+
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
44

55
package(default_visibility = ["//tensorboard:internal"])
66

tensorboard/util/grpc_util.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ def _compute_backoff_seconds(num_attempts):
189189
jitter_factor = random.uniform(
190190
_GRPC_RETRY_JITTER_FACTOR_MIN, _GRPC_RETRY_JITTER_FACTOR_MAX
191191
)
192-
backoff_secs = (_GRPC_RETRY_EXPONENTIAL_BASE**num_attempts) * jitter_factor
192+
backoff_secs = (
193+
_GRPC_RETRY_EXPONENTIAL_BASE**num_attempts
194+
) * jitter_factor
193195
return backoff_secs
194196

195197

tensorboard/webapp/metrics/views/main_view/card_groups_container.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ export class CardGroupsContainer {
3737
@Input() cardObserver!: CardObserver;
3838

3939
constructor(private readonly store: Store<State>) {
40-
this.cardGroups$ = this.store
41-
.select(getSortedRenderableCardIdsWithMetadata)
42-
.pipe(
43-
combineLatestWith(this.store.select(getMetricsFilteredPluginTypes)),
44-
map(([cardList, filteredPlugins]) => {
45-
if (!filteredPlugins.size) return cardList;
46-
return cardList.filter((card) => {
47-
return filteredPlugins.has(card.plugin);
48-
});
49-
}),
50-
map((cardList) => groupCardIdWithMetdata(cardList))
51-
);
40+
this.cardGroups$ = this.store
41+
.select(getSortedRenderableCardIdsWithMetadata)
42+
.pipe(
43+
combineLatestWith(this.store.select(getMetricsFilteredPluginTypes)),
44+
map(([cardList, filteredPlugins]) => {
45+
if (!filteredPlugins.size) return cardList;
46+
return cardList.filter((card) => {
47+
return filteredPlugins.has(card.plugin);
48+
});
49+
}),
50+
map((cardList) => groupCardIdWithMetdata(cardList))
51+
);
5252
}
5353

5454
readonly cardGroups$: Observable<CardGroup[]>;

tensorboard/webapp/metrics/views/main_view/empty_tag_match_message_container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class EmptyTagMatchMessageContainer {
4444
.pipe(
4545
map((cardList) => {
4646
return new Set(cardList.map(({tag}) => tag)).size;
47-
}),
47+
})
4848
);
4949
}
5050

tensorboard/webapp/metrics/views/main_view/main_view_container.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ export class MainViewContainer {
6565
loadState.state === DataLoadState.LOADING &&
6666
loadState.lastLoadedTimeInMs === null
6767
);
68-
}),
68+
})
6969
);
7070
this.showFilteredView$ = this.store.select(getMetricsTagFilter).pipe(
7171
map((filter) => {
7272
return filter.length > 0;
73-
}),
73+
})
7474
);
7575
this.filteredPluginTypes$ = this.store.select(
76-
getMetricsFilteredPluginTypes,
76+
getMetricsFilteredPluginTypes
7777
);
7878
this.isSlideoutMenuOpen$ = this.store.select(isMetricsSlideoutMenuOpen);
7979
}

third_party/workspace.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ load("@bazel_tools//tools/build_defs/repo:java.bzl", "java_import_external")
2020
load("@io_bazel_rules_webtesting//web:web.bzl", "platform_archive")
2121
load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.3.bzl", "browser_repositories")
2222
load("//third_party:fonts.bzl", "tensorboard_fonts_workspace")
23-
load("//third_party:python.bzl", "tensorboard_python_workspace")
2423
load("//third_party:js.bzl", "tensorboard_js_workspace")
24+
load("//third_party:python.bzl", "tensorboard_python_workspace")
2525
load("//third_party:rust.bzl", "tensorboard_rust_workspace")
2626

2727
def tensorboard_workspace(name = ""):

0 commit comments

Comments
 (0)