From 7eb7e909da25926002d2784d48092a3a564d73f0 Mon Sep 17 00:00:00 2001 From: Maximilian Schulz Date: Mon, 30 Oct 2023 12:40:18 +0100 Subject: [PATCH] Linting issue --- vizro-core/src/vizro/tables/dash_table.py | 4 ++-- .../vizro/models/_components/test_table.py | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/vizro-core/src/vizro/tables/dash_table.py b/vizro-core/src/vizro/tables/dash_table.py index 0ee68440c..bc0c5d7ae 100644 --- a/vizro-core/src/vizro/tables/dash_table.py +++ b/vizro-core/src/vizro/tables/dash_table.py @@ -1,7 +1,7 @@ """Module containing the standard implementation of `dash_table.DataTable`.""" from collections import defaultdict from collections.abc import Mapping -from typing import Any +from typing import Any, Dict import pandas as pd from dash import dash_table @@ -9,7 +9,7 @@ from vizro.models.types import capture -def _set_defaults_nested(supplied: Mapping[str, Any], defaults: Mapping[str, Any]) -> dict[str, Any]: +def _set_defaults_nested(supplied: Mapping[str, Any], defaults: Mapping[str, Any]) -> Dict[str, Any]: supplied = defaultdict(dict, supplied) for default_key, default_value in defaults.items(): if isinstance(default_value, Mapping): diff --git a/vizro-core/tests/unit/vizro/models/_components/test_table.py b/vizro-core/tests/unit/vizro/models/_components/test_table.py index c5466b2f6..5ef3d9a83 100644 --- a/vizro-core/tests/unit/vizro/models/_components/test_table.py +++ b/vizro-core/tests/unit/vizro/models/_components/test_table.py @@ -3,7 +3,7 @@ import plotly import pytest -from dash import dash_table, html +from dash import dash_table, dcc, html from pydantic import ValidationError import vizro.models as vm @@ -25,13 +25,15 @@ def dash_table_with_str_dataframe(): @pytest.fixture def expected_table(): - return html.Div( - [ - None, - html.Div(dash_table.DataTable(), id="text_table"), - ], - className="table-container", - id="text_table_outer", + return dcc.Loading( + html.Div( + [ + None, + html.Div(dash_table.DataTable(), id="text_table"), + ], + className="table-container", + id="text_table_outer", + ) )