Skip to content

Commit 2d90ac1

Browse files
committed
Pacify the angry linter
1 parent d13f242 commit 2d90ac1

File tree

4 files changed

+18
-24
lines changed

4 files changed

+18
-24
lines changed

tensorboard/plugins/pr_curve/BUILD

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ py_test(
6767
srcs = ["summary_test.py"],
6868
srcs_version = "PY2AND3",
6969
deps = [
70-
":protos_all_py_pb2",
7170
":pr_curve_demo",
7271
"//tensorboard:expect_numpy_installed",
7372
"//tensorboard:expect_tensorflow_installed",

tensorboard/plugins/pr_curve/pr_curves_plugin.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def tags_impl(self):
122122

123123
mapping = self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME)
124124
for (run, tag_to_content) in six.iteritems(mapping):
125-
for (tag, content) in six.iteritems(tag_to_content):
125+
for (tag, _) in six.iteritems(tag_to_content):
126126
summary_metadata = self._multiplexer.SummaryMetadata(run, tag)
127127
result[run][tag] = {'displayName': summary_metadata.display_name,
128128
'description': plugin_util.markdown_to_safe_html(
@@ -170,13 +170,13 @@ def available_time_entries_impl(self):
170170

171171
def _create_time_entry(self, tensor_event):
172172
"""Creates a time entry given a tensor event.
173-
173+
174174
Arguments:
175175
tensor_event: The tensor event for the time entry.
176176
"""
177177
return {
178-
'step': tensor_event.step,
179-
'wall_time': tensor_event.wall_time,
178+
'step': tensor_event.step,
179+
'wall_time': tensor_event.wall_time,
180180
}
181181

182182
def get_plugin_apps(self):

tensorboard/plugins/pr_curve/pr_curves_plugin_test.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -116,28 +116,28 @@ def testTagsProvided(self):
116116

117117
# Verify the data for each run-tag combination.
118118
self.assertDictEqual({
119-
'displayName': 'classifying red',
120-
'description': self.computeCorrectDescription(168),
119+
'displayName': 'classifying red',
120+
'description': self.computeCorrectDescription(168),
121121
}, tags_response['colors']['red/pr_curves'])
122122
self.assertDictEqual({
123-
'displayName': 'classifying green',
124-
'description': self.computeCorrectDescription(210),
123+
'displayName': 'classifying green',
124+
'description': self.computeCorrectDescription(210),
125125
}, tags_response['colors']['green/pr_curves'])
126126
self.assertDictEqual({
127-
'displayName': 'classifying blue',
128-
'description': self.computeCorrectDescription(252),
127+
'displayName': 'classifying blue',
128+
'description': self.computeCorrectDescription(252),
129129
}, tags_response['colors']['blue/pr_curves'])
130130
self.assertDictEqual({
131-
'displayName': 'classifying red',
132-
'description': self.computeCorrectDescription(168),
131+
'displayName': 'classifying red',
132+
'description': self.computeCorrectDescription(168),
133133
}, tags_response['mask_every_other_prediction']['red/pr_curves'])
134134
self.assertDictEqual({
135-
'displayName': 'classifying green',
136-
'description': self.computeCorrectDescription(210),
135+
'displayName': 'classifying green',
136+
'description': self.computeCorrectDescription(210),
137137
}, tags_response['mask_every_other_prediction']['green/pr_curves'])
138138
self.assertDictEqual({
139-
'displayName': 'classifying blue',
140-
'description': self.computeCorrectDescription(252),
139+
'displayName': 'classifying blue',
140+
'description': self.computeCorrectDescription(252),
141141
}, tags_response['mask_every_other_prediction']['blue/pr_curves'])
142142

143143
def testAvailableSteps(self):

tensorboard/plugins/pr_curve/summary_test.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,18 @@
1919
from __future__ import division
2020
from __future__ import print_function
2121

22-
import json
23-
import os
24-
2522
import numpy as np
2623
import tensorflow as tf
2724

2825
from tensorboard.backend.event_processing import plugin_event_multiplexer as event_multiplexer # pylint: disable=line-too-long
2926
from tensorboard.plugins.pr_curve import metadata
30-
from tensorboard.plugins.pr_curve import plugin_data_pb2
3127
from tensorboard.plugins.pr_curve import pr_curve_demo
32-
from tensorboard.plugins.pr_curve import summary
3328

3429

3530
class PrCurveTest(tf.test.TestCase):
3631

37-
def setUp(self, *args, **kwargs):
38-
super(PrCurveTest, self).setUp(*args, **kwargs)
32+
def setUp(self):
33+
super(PrCurvesPluginTest, self).setUp()
3934
self.logdir = self.get_temp_dir()
4035
tf.reset_default_graph()
4136

0 commit comments

Comments
 (0)