Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 20, 2025
1 parent 81c237b commit e7fa7bf
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion vizro-core/examples/scratch_dev/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
dashboard = vm.Dashboard(pages=[page])

if __name__ == "__main__":
Vizro().build(dashboard).run()
Vizro().build(dashboard).run()
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def build(self):
persistence=True,
persistence_type="session",
type="range" if self.range else "default",
allowSingleDateInRange= True,
allowSingleDateInRange=True,
className="datepicker",
# removes the default red color for weekend days
styles={"day": {"color": "var(--mantine-color-text"}},
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/models/_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def build(self):
return dmc.MantineProvider(
layout,
# Use the `theme` to style all Mantine components with a Vizro theme. For more info see https://www.dash-mantine-components.com/components/mantineprovider
theme = {"primaryColor": "gray"}
theme={"primaryColor": "gray"},
)

def _validate_logos(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import dash_mantine_components as dmc
import pytest
from asserts import assert_component_equal
from dash import dcc, html
from dash import html

try:
from pydantic.v1 import ValidationError
Expand Down Expand Up @@ -132,7 +132,7 @@ def test_datepicker_build(self, range, value):
className="datepicker",
# removes the default red color for weekend days
styles={"day": {"color": "var(--mantine-color-text"}},
)
),
],
)
assert_component_equal(date_picker, expected_datepicker)
33 changes: 18 additions & 15 deletions vizro-core/tests/unit/vizro/models/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,21 +276,24 @@ def test_dashboard_build(self, vizro_app, page_1, page_2):
layout={"title": {"pad_l": 0, "pad_r": 0}, "margin_l": 24, "margin_t": 24, "margin_b": 16}
)

expected_dashboard_container = dmc.MantineProvider(html.Div(
id="dashboard-container",
children=[
html.Div(id="vizro_version", children=vizro.__version__, hidden=True),
dcc.Store(
id="vizro_themes",
data={
"vizro_dark": dashboard_vizro_dark,
"vizro_light": dashboard_vizro_light,
},
),
ActionLoop._create_app_callbacks(),
dash.page_container,
],
), theme = {"primaryColor": "gray"})
expected_dashboard_container = dmc.MantineProvider(
html.Div(
id="dashboard-container",
children=[
html.Div(id="vizro_version", children=vizro.__version__, hidden=True),
dcc.Store(
id="vizro_themes",
data={
"vizro_dark": dashboard_vizro_dark,
"vizro_light": dashboard_vizro_light,
},
),
ActionLoop._create_app_callbacks(),
dash.page_container,
],
),
theme={"primaryColor": "gray"},
)
assert_component_equal(dashboard.build(), expected_dashboard_container)


Expand Down

0 comments on commit e7fa7bf

Please sign in to comment.