From a800f5d1d2562235be772caf207fbdbc8fcea435 Mon Sep 17 00:00:00 2001 From: Li Nguyen <90609403+huong-li-nguyen@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:36:36 +0000 Subject: [PATCH] Lint --- vizro-core/examples/visual-vocabulary/custom_charts.py | 2 +- .../pages/examples/diverging_stacked_bar.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vizro-core/examples/visual-vocabulary/custom_charts.py b/vizro-core/examples/visual-vocabulary/custom_charts.py index 0763748a8..a875b2dfc 100644 --- a/vizro-core/examples/visual-vocabulary/custom_charts.py +++ b/vizro-core/examples/visual-vocabulary/custom_charts.py @@ -259,7 +259,7 @@ def diverging_stacked_bar( ordered from least to most positive. category_neg (List[str]): List of column names in the DataFrame representing negative values. Columns should be ordered from least to most negative. - color_discrete_map: Optional[Dict[str, str]]: A dictionary mapping category names to color strings. + color_discrete_map: Optional[dict[str, str]]: A dictionary mapping category names to color strings. Returns: go.Figure: A Plotly Figure object representing the horizontal diverging stacked bar chart. diff --git a/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py b/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py index 2ecf70b9f..363aecb45 100644 --- a/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py +++ b/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py @@ -1,4 +1,4 @@ -from typing import Dict, List, Optional +from typing import Optional import pandas as pd import plotly.graph_objects as go @@ -37,7 +37,7 @@ def diverging_stacked_bar( y: str, category_pos: List[str], category_neg: List[str], - color_discrete_map: Optional[Dict[str, str]] = None, + color_discrete_map: Optional[dict[str, str]] = None, ) -> go.Figure: """Creates a horizontal diverging stacked bar chart (with positive and negative values only) using Plotly's go.Bar. @@ -55,7 +55,7 @@ def diverging_stacked_bar( ordered from least to most positive. category_neg (List[str]): List of column names in the DataFrame representing negative values. Columns should be ordered from least to most negative. - color_discrete_map: Optional[Dict[str, str]]: A dictionary mapping category names to color strings. + color_discrete_map: Optional[dict[str, str]]: A dictionary mapping category names to color strings. Returns: go.Figure: A Plotly Figure object representing the horizontal diverging stacked bar chart.