flake8 + change ModuleNotFoundError to ImportError (support py 2.7/3.5)

This commit is contained in:
allegroai
2020-07-30 15:07:25 +03:00
parent a8d6380696
commit 23394a265d
16 changed files with 47 additions and 37 deletions

View File

@@ -147,7 +147,8 @@ def create_2d_scatter_series(np_row_wise, title="Scatter", series_name="Series",
:param layout_config: optional dictionary for layout configuration, passed directly to plotly
:return: Plotly chart dict.
"""
plotly_obj = _plotly_scatter_layout_dict(title=title, xaxis_title=xtitle, yaxis_title=ytitle, comment=comment) # noqa: F841
plotly_obj = _plotly_scatter_layout_dict( # noqa: F841
title=title, xaxis_title=xtitle, yaxis_title=ytitle, comment=comment)
assert np_row_wise.ndim == 2, "Expected a 2D numpy array"
assert np_row_wise.shape[1] == 2, "Expected two columns X/Y e.g. [(x0,y0), (x1,y1) ...]"
@@ -481,7 +482,8 @@ def create_plotly_table(table_plot, title, series, layout_config=None):
"""
if not pd:
raise UsageError(
"pandas is required in order to support reporting tables using CSV or a URL, please install the pandas python package"
"pandas is required in order to support reporting tables using CSV or a URL, "
"please install the pandas python package"
)
index_added = not isinstance(table_plot.index, pd.RangeIndex)
headers_values = list([col] for col in table_plot.columns)