Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d3a0d2b

Browse filesBrowse files
committed
Indent code. Do not use len to determine if a sequence is empty (len-as-condition).
1 parent 1289748 commit d3a0d2b
Copy full SHA for d3a0d2b

File tree

Expand file treeCollapse file tree

2 files changed

+15
-15
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+15
-15
lines changed

‎plotly/figure_factory/_annotated_heatmap.py

Copy file name to clipboardExpand all lines: plotly/figure_factory/_annotated_heatmap.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ def get_text_color(self):
180180
max_col = map(int,
181181
self.colorscale[-1][1].strip('rgb()').split(','))
182182
elif '#' in self.colorscale[0][1]:
183-
min_col = utils.hex_to_rgb(self.colorscale[0][1])
184-
max_col = utils.hex_to_rgb(self.colorscale[-1][1])
183+
min_col = utils.hex_to_rgb(self.colorscale[0][1])
184+
max_col = utils.hex_to_rgb(self.colorscale[-1][1])
185185
else:
186186
min_col = [255, 255, 255]
187187
max_col = [255, 255, 255]

‎plotly/figure_factory/_dendrogram.py

Copy file name to clipboardExpand all lines: plotly/figure_factory/_dendrogram.py
+13-13Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ def __init__(self, X, orientation='bottom', labels=None, colorscale=None,
124124
distfun = scs.distance.pdist
125125

126126
(dd_traces, xvals, yvals,
127-
ordered_labels, leaves) = self.get_dendrogram_traces(X, colorscale,
128-
distfun,
129-
linkagefun,
130-
hovertext)
127+
ordered_labels, leaves) = self.get_dendrogram_traces(X, colorscale,
128+
distfun,
129+
linkagefun,
130+
hovertext)
131131

132132
self.labels = ordered_labels
133133
self.leaves = leaves
@@ -193,17 +193,17 @@ def set_axis_layout(self, axis_key):
193193
194194
"""
195195
axis_defaults = {
196-
'type': 'linear',
197-
'ticks': 'outside',
198-
'mirror': 'allticks',
199-
'rangemode': 'tozero',
200-
'showticklabels': True,
201-
'zeroline': False,
202-
'showgrid': False,
203-
'showline': True,
196+
'type': 'linear',
197+
'ticks': 'outside',
198+
'mirror': 'allticks',
199+
'rangemode': 'tozero',
200+
'showticklabels': True,
201+
'zeroline': False,
202+
'showgrid': False,
203+
'showline': True,
204204
}
205205

206-
if len(self.labels) != 0:
206+
if self.labels:
207207
axis_key_labels = self.xaxis
208208
if self.orientation in ['left', 'right']:
209209
axis_key_labels = self.yaxis

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.