Skip to content

Commit 13eecc5

Browse files
committed
Indent code. Do not use len sequence to determine if a sequence is empty (len-as-condition).
1 parent d3a0d2b commit 13eecc5

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

plotly/figure_factory/_facet_grid.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ def _add_shapes_to_fig(fig, annot_rect_color, flipped_rows=False,
149149
for key in fig['layout'].keys():
150150
if 'axis' in key and fig['layout'][key]['domain'] != [0.0, 1.0]:
151151
shape = {
152-
'fillcolor': annot_rect_color,
153-
'layer': 'below',
154-
'line': {'color': annot_rect_color, 'width': 1},
155-
'type': 'rect',
156-
'xref': 'paper',
157-
'yref': 'paper'
152+
'fillcolor': annot_rect_color,
153+
'layer': 'below',
154+
'line': {'color': annot_rect_color, 'width': 1},
155+
'type': 'rect',
156+
'xref': 'paper',
157+
'yref': 'paper'
158158
}
159159

160160
if 'xaxis' in key:
@@ -1052,7 +1052,7 @@ def create_facet_grid(df, x=None, y=None, facet_row=None, facet_col=None,
10521052
min_ranges = []
10531053
max_ranges = []
10541054
for trace in fig['data']:
1055-
if trace[x_y] is not None and len(trace[x_y]) > 0:
1055+
if trace[x_y] is not None and trace[x_y]:
10561056
min_ranges.append(min(trace[x_y]))
10571057
max_ranges.append(max(trace[x_y]))
10581058
while None in min_ranges:

plotly/figure_factory/_scatterplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ def scatterplot(dataframe, headers, diag, size, height, width, title,
206206

207207

208208
def scatterplot_dict(dataframe, headers, diag, size,
209-
height, width, title, index, index_vals,
210-
endpts, colormap, colormap_type, **kwargs):
209+
height, width, title, index, index_vals,
210+
endpts, colormap, colormap_type, **kwargs):
211211
"""
212212
Refer to FigureFactory.create_scatterplotmatrix() for docstring
213213

0 commit comments

Comments
 (0)