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 Dec 3, 2024
1 parent 906a448 commit ee6722e
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion vizro-core/examples/dev/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Example app to show all features of Vizro."""

from time import sleep
from typing import Literal, Optional
from typing import Optional

import dash_bootstrap_components as dbc
import pandas as pd
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/models/_components/_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from vizro.models import VizroBaseModel
from vizro.models._components.form import Checklist, Dropdown, RadioItems, RangeSlider, Slider
from vizro.models._layout import set_layout
from vizro.models._models_utils import _log_call, check_captured_callable, validate_min_length
from vizro.models._models_utils import _log_call, check_captured_callable
from vizro.models.types import _FormComponentType

if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/models/_components/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# from pydantic import Field, validator
from vizro.models import VizroBaseModel
from vizro.models._layout import set_layout
from vizro.models._models_utils import _log_call, check_captured_callable, validate_min_length
from vizro.models._models_utils import _log_call, check_captured_callable
from vizro.models.types import ComponentType

if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/models/_components/form/_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import dash_bootstrap_components as dbc
from dash import html
from pydantic import Field

# try:
# from pydantic.v1 import Field
# except ImportError: # pragma: no cov
# from pydantic import Field

from vizro.models import Action, VizroBaseModel
from vizro.models._models_utils import _log_call

Expand Down
5 changes: 2 additions & 3 deletions vizro-core/src/vizro/models/_components/form/slider.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from typing import Literal, Optional

from dash import ClientsideFunction, Input, Output, State, clientside_callback, dcc, html
from pydantic import Field, PrivateAttr, validator
# try:
# from pydantic.v1 import Field, PrivateAttr, validator
# except ImportError: # pragma: no cov
# from pydantic import Field, PrivateAttr, validator

import dash_bootstrap_components as dbc
from dash import ClientsideFunction, Input, Output, State, clientside_callback, dcc, html
from pydantic import Field, PrivateAttr, validator

from vizro.models import Action, VizroBaseModel
from vizro.models._action._actions_chain import _action_validator_factory
Expand Down
4 changes: 2 additions & 2 deletions vizro-core/src/vizro/models/_components/tabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
from typing import TYPE_CHECKING, Literal

import dash_bootstrap_components as dbc
from pydantic import conlist, validator
from pydantic import conlist

# try:
# from pydantic.v1 import validator
# except ImportError: # pragma: no cov
# from pydantic import validator
from vizro.models import VizroBaseModel
from vizro.models._models_utils import _log_call, validate_min_length
from vizro.models._models_utils import _log_call

if TYPE_CHECKING:
from vizro.models._components import Container
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/models/_controls/parameter.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections.abc import Iterable
from typing import Annotated, Literal, cast

from pydantic import AfterValidator, Field, field_validator
from pydantic import AfterValidator, Field

# try:
# from pydantic.v1 import Field, validator
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/models/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from vizro.models import Action, Filter, Layout, VizroBaseModel
from vizro.models._action._actions_chain import ActionsChain, Trigger
from vizro.models._layout import set_layout
from vizro.models._models_utils import _log_call, check_captured_callable, validate_min_length
from vizro.models._models_utils import _log_call, check_captured_callable

from .types import ComponentType, ControlType

Expand Down
3 changes: 1 addition & 2 deletions vizro-core/src/vizro/models/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@

import plotly.io as pio
import pydantic_core as cs
from pydantic import Field, StrictBool, ValidationInfo, field_validator
from pydantic import Field, StrictBool, ValidationInfo
from pydantic.fields import FieldInfo
from pydantic.json_schema import GetJsonSchemaHandler, JsonSchemaValue
from typing_extensions import TypedDict

from vizro.charts._charts_utils import _DashboardReadyFigure
Expand Down
2 changes: 0 additions & 2 deletions vizro-core/tests/unit/vizro/models/_components/test_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
import pytest
from asserts import assert_component_equal
from dash import dcc, html

from pydantic import ValidationError

# try:
# from pydantic.v1 import ValidationError
# except ImportError: # pragma: no cov
# from pydantic import ValidationError

import vizro.models as vm
from vizro.figures import kpi_card
from vizro.managers import data_manager
Expand Down
2 changes: 0 additions & 2 deletions vizro-core/tests/unit/vizro/models/_components/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
from asserts import assert_component_equal
from dash import dcc, html
from dash.exceptions import MissingCallbackContextException

from pydantic import ValidationError

# try:
# from pydantic.v1 import ValidationError
# except ImportError: # pragma: no cov
# from pydantic import ValidationError

import vizro.models as vm
import vizro.plotly.express as px
from vizro.managers import data_manager
Expand Down

0 comments on commit ee6722e

Please sign in to comment.