From 0a4a9a85cb6012621b10d2ab6856b727fe91a689 Mon Sep 17 00:00:00 2001 From: Hans Kallekleiv <16436291+HansKallekleiv@users.noreply.github.com> Date: Sun, 12 Sep 2021 10:47:12 +0200 Subject: [PATCH] Bump Dash version to 2.0 --- tests/test_color_scales.py | 5 ++--- tests/test_graph.py | 5 ++--- tests/test_plugin_placeholder.py | 5 ++--- usage.py | 7 +++---- webviz_core_components/wrapped_components/checklist.py | 3 +-- .../wrapped_components/collapsive_header.py | 2 +- webviz_core_components/wrapped_components/dropdown.py | 3 +-- webviz_core_components/wrapped_components/flexbox.py | 4 ++-- webviz_core_components/wrapped_components/flexcolumn.py | 3 ++- webviz_core_components/wrapped_components/frame.py | 2 +- webviz_core_components/wrapped_components/graph.py | 2 +- webviz_core_components/wrapped_components/header.py | 2 +- webviz_core_components/wrapped_components/label.py | 2 +- webviz_core_components/wrapped_components/radioitems.py | 3 +-- webviz_core_components/wrapped_components/range_slider.py | 3 +-- .../wrapped_components/select_with_label.py | 2 +- webviz_core_components/wrapped_components/selectors.py | 2 +- webviz_core_components/wrapped_components/slider.py | 3 +-- webviz_core_components/wrapped_components/tab.py | 2 +- webviz_core_components/wrapped_components/tabs.py | 2 +- 20 files changed, 27 insertions(+), 35 deletions(-) diff --git a/tests/test_color_scales.py b/tests/test_color_scales.py index f9d5840c..3c349146 100644 --- a/tests/test_color_scales.py +++ b/tests/test_color_scales.py @@ -7,14 +7,13 @@ # ################################################################## -import dash -import dash_html_components as html +from dash import html, Dash import webviz_core_components def test_colorscale(dash_duo): - app = dash.Dash(__name__) + app = Dash(__name__) app.layout = html.Div( [ diff --git a/tests/test_graph.py b/tests/test_graph.py index 1b313606..be210c74 100644 --- a/tests/test_graph.py +++ b/tests/test_graph.py @@ -7,14 +7,13 @@ # ################################################################## -import dash -import dash_html_components as html +from dash import html, Dash import webviz_core_components def test_container_placeholder(dash_duo): - app = dash.Dash(__name__) + app = Dash(__name__) app.layout = html.Div( [ diff --git a/tests/test_plugin_placeholder.py b/tests/test_plugin_placeholder.py index c9ea1938..b7d71c01 100644 --- a/tests/test_plugin_placeholder.py +++ b/tests/test_plugin_placeholder.py @@ -7,14 +7,13 @@ # ################################################################## -import dash -import dash_html_components as html +from dash import html, Dash import webviz_core_components def test_plugin_placeholder(dash_duo): - app = dash.Dash(__name__) + app = Dash(__name__) app.layout = html.Div( [ diff --git a/usage.py b/usage.py index 16274ae8..b47fe326 100644 --- a/usage.py +++ b/usage.py @@ -1,9 +1,8 @@ -import dash -from dash.dependencies import Input, Output, State -import dash_html_components as html +from dash import Dash, Input, Output, State, html + import webviz_core_components as wcc -app = dash.Dash(__name__) +app = Dash(__name__) app.layout = html.Div( [ diff --git a/webviz_core_components/wrapped_components/checklist.py b/webviz_core_components/wrapped_components/checklist.py index 3a893809..25cb5269 100644 --- a/webviz_core_components/wrapped_components/checklist.py +++ b/webviz_core_components/wrapped_components/checklist.py @@ -1,7 +1,6 @@ from typing import Any -import dash_html_components as html -import dash_core_components as dcc +from dash import html, dcc class Checklist(html.Div): diff --git a/webviz_core_components/wrapped_components/collapsive_header.py b/webviz_core_components/wrapped_components/collapsive_header.py index 38978ec0..0ea774a6 100644 --- a/webviz_core_components/wrapped_components/collapsive_header.py +++ b/webviz_core_components/wrapped_components/collapsive_header.py @@ -1,6 +1,6 @@ from typing import Any -import dash_html_components as html +from dash import html class CollapsiveHeader(html.Details): diff --git a/webviz_core_components/wrapped_components/dropdown.py b/webviz_core_components/wrapped_components/dropdown.py index 33818b8b..a03e95eb 100644 --- a/webviz_core_components/wrapped_components/dropdown.py +++ b/webviz_core_components/wrapped_components/dropdown.py @@ -1,7 +1,6 @@ from typing import Any -import dash_html_components as html -import dash_core_components as dcc +from dash import html, dcc class Dropdown(html.Div): diff --git a/webviz_core_components/wrapped_components/flexbox.py b/webviz_core_components/wrapped_components/flexbox.py index 63eeaca2..7584e00c 100644 --- a/webviz_core_components/wrapped_components/flexbox.py +++ b/webviz_core_components/wrapped_components/flexbox.py @@ -1,10 +1,10 @@ -import dash_html_components as html +from dash import html from ._argument_modifier import argument_modifier class FlexBox(html.Div): - """Behaves like Div from dash_html_components, but extends that container with + """Behaves like Div from dash.html, but extends that container with flexbox style settings. It also adds min-width CSS style to direct children. """ diff --git a/webviz_core_components/wrapped_components/flexcolumn.py b/webviz_core_components/wrapped_components/flexcolumn.py index 1d81da0a..c831873d 100644 --- a/webviz_core_components/wrapped_components/flexcolumn.py +++ b/webviz_core_components/wrapped_components/flexcolumn.py @@ -1,5 +1,6 @@ from typing import Union, Any -import dash_html_components as html + +from dash import html class FlexColumn(html.Div): diff --git a/webviz_core_components/wrapped_components/frame.py b/webviz_core_components/wrapped_components/frame.py index ac1968d1..095dd25a 100644 --- a/webviz_core_components/wrapped_components/frame.py +++ b/webviz_core_components/wrapped_components/frame.py @@ -1,6 +1,6 @@ from typing import Any -import dash_html_components as html +from dash import html class Frame(html.Div): diff --git a/webviz_core_components/wrapped_components/graph.py b/webviz_core_components/wrapped_components/graph.py index 1923d000..f9dfad57 100644 --- a/webviz_core_components/wrapped_components/graph.py +++ b/webviz_core_components/wrapped_components/graph.py @@ -1,4 +1,4 @@ -import dash_core_components as dcc +from dash import dcc from ._argument_modifier import argument_modifier diff --git a/webviz_core_components/wrapped_components/header.py b/webviz_core_components/wrapped_components/header.py index 75c66ee9..12c053c6 100644 --- a/webviz_core_components/wrapped_components/header.py +++ b/webviz_core_components/wrapped_components/header.py @@ -1,6 +1,6 @@ from typing import Any -import dash_html_components as html +from dash import html class Header(html.Div): diff --git a/webviz_core_components/wrapped_components/label.py b/webviz_core_components/wrapped_components/label.py index d240a961..a60a3528 100644 --- a/webviz_core_components/wrapped_components/label.py +++ b/webviz_core_components/wrapped_components/label.py @@ -1,6 +1,6 @@ from typing import Any -import dash_html_components as html +from dash import html class Label(html.Label): diff --git a/webviz_core_components/wrapped_components/radioitems.py b/webviz_core_components/wrapped_components/radioitems.py index fe73be9b..803dd553 100644 --- a/webviz_core_components/wrapped_components/radioitems.py +++ b/webviz_core_components/wrapped_components/radioitems.py @@ -1,7 +1,6 @@ from typing import Any -import dash_html_components as html -import dash_core_components as dcc +from dash import html, dcc class RadioItems(html.Div): diff --git a/webviz_core_components/wrapped_components/range_slider.py b/webviz_core_components/wrapped_components/range_slider.py index 2ffe1e06..ebbc6656 100644 --- a/webviz_core_components/wrapped_components/range_slider.py +++ b/webviz_core_components/wrapped_components/range_slider.py @@ -1,7 +1,6 @@ from typing import Any -import dash_html_components as html -import dash_core_components as dcc +from dash import html, dcc class RangeSlider(html.Div): diff --git a/webviz_core_components/wrapped_components/select_with_label.py b/webviz_core_components/wrapped_components/select_with_label.py index df30809f..23035b26 100644 --- a/webviz_core_components/wrapped_components/select_with_label.py +++ b/webviz_core_components/wrapped_components/select_with_label.py @@ -1,6 +1,6 @@ from typing import Any -import dash_html_components as html +from dash import html from webviz_core_components import Select as BaseSelect diff --git a/webviz_core_components/wrapped_components/selectors.py b/webviz_core_components/wrapped_components/selectors.py index bfe26535..683380b4 100644 --- a/webviz_core_components/wrapped_components/selectors.py +++ b/webviz_core_components/wrapped_components/selectors.py @@ -1,6 +1,6 @@ from typing import Any -import dash_html_components as html +from dash import html class Selectors(html.Details): diff --git a/webviz_core_components/wrapped_components/slider.py b/webviz_core_components/wrapped_components/slider.py index 47ecb748..5d68559c 100644 --- a/webviz_core_components/wrapped_components/slider.py +++ b/webviz_core_components/wrapped_components/slider.py @@ -1,7 +1,6 @@ from typing import Any -import dash_html_components as html -import dash_core_components as dcc +from dash import html, dcc class Slider(html.Div): diff --git a/webviz_core_components/wrapped_components/tab.py b/webviz_core_components/wrapped_components/tab.py index 5512f933..ce1323b5 100644 --- a/webviz_core_components/wrapped_components/tab.py +++ b/webviz_core_components/wrapped_components/tab.py @@ -1,6 +1,6 @@ from typing import Any -import dash_core_components as dcc +from dash import dcc class Tab(dcc.Tab): diff --git a/webviz_core_components/wrapped_components/tabs.py b/webviz_core_components/wrapped_components/tabs.py index 02d61449..115036c7 100644 --- a/webviz_core_components/wrapped_components/tabs.py +++ b/webviz_core_components/wrapped_components/tabs.py @@ -1,6 +1,6 @@ from typing import Any -import dash_core_components as dcc +from dash import dcc class Tabs(dcc.Tabs):