From a077e475c2fdbd8124821b780e696135f119b69d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Lind-Johansen?= <47847084+lindjoha@users.noreply.github.com> Date: Wed, 5 Oct 2022 12:07:33 +0200 Subject: [PATCH] Fix `ConversionError` in `callback_typecheck`. (#1129) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix typecheck error * Updated type hinting and added stretch=True Co-authored-by: Øyvind Lind-Johansen --- webviz_subsurface/plugins/_well_analysis/_plugin.py | 2 +- .../_well_analysis/_views/_well_overview_view/_view.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webviz_subsurface/plugins/_well_analysis/_plugin.py b/webviz_subsurface/plugins/_well_analysis/_plugin.py index d614e1676..8564b320d 100644 --- a/webviz_subsurface/plugins/_well_analysis/_plugin.py +++ b/webviz_subsurface/plugins/_well_analysis/_plugin.py @@ -73,7 +73,7 @@ def __init__( time_index: str = Frequency.YEARLY.value, filter_out_startswith: Optional[str] = None, ) -> None: - super().__init__() + super().__init__(stretch=True) self._ensembles = ensembles self._theme = webviz_settings.theme diff --git a/webviz_subsurface/plugins/_well_analysis/_views/_well_overview_view/_view.py b/webviz_subsurface/plugins/_well_analysis/_views/_well_overview_view/_view.py index b51607ef7..d2dc7b19d 100644 --- a/webviz_subsurface/plugins/_well_analysis/_views/_well_overview_view/_view.py +++ b/webviz_subsurface/plugins/_well_analysis/_views/_well_overview_view/_view.py @@ -1,5 +1,5 @@ import datetime -from typing import Dict, List, Optional, Set, Union +from typing import Any, Dict, List, Optional, Set, Union import plotly.graph_objects as go import webviz_core_components as wcc @@ -313,7 +313,7 @@ def _update_graph( charttype_selected: ChartType, wells_selected: List[str], checklist_ids: List[Dict[str, str]], - current_fig_dict: Optional[Dict], + current_fig_dict: Optional[Dict[str, Any]], ) -> Component: """Updates the well overview graph with selected input (f.ex chart type)""" ctx = callback_context.triggered[0]["prop_id"].split(".")[0]