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 Nov 28, 2024
1 parent 3b77712 commit f07b84e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import dash

from vizro.managers import model_manager
from vizro.managers._model_manager import ModelID

if TYPE_CHECKING:
from vizro.models import Action, Page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from vizro.actions import _parameter, filter_interaction
from vizro.managers import model_manager
from vizro.managers._model_manager import ModelID
from vizro.models import Action, Page, Graph, AgGrid, Table, Figure, VizroBaseModel
from vizro.models import Action, AgGrid, Figure, Graph, Page, Table, VizroBaseModel
from vizro.models._action._actions_chain import ActionsChain
from vizro.models._controls import Filter, Parameter
from vizro.models.types import ControlType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from vizro.actions._filter_action import _filter
from vizro.actions._on_page_load_action import _on_page_load
from vizro.actions._parameter_action import _parameter
from vizro.managers import model_manager
from vizro.managers._model_manager import ModelID
from vizro.models import Action


Expand Down
8 changes: 4 additions & 4 deletions vizro-core/src/vizro/managers/_model_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
import random
import uuid
from collections.abc import Generator
from typing import TYPE_CHECKING, NewType, Optional, TypeVar, cast, Union
from typing import TYPE_CHECKING, NewType, Optional, TypeVar

from vizro.managers._managers_utils import _state_modifier

if TYPE_CHECKING:
from vizro.models import VizroBaseModel, Page
from vizro.models._action._actions_chain import ActionsChain
from vizro.models import Page, VizroBaseModel


# As done for Dash components in dash.development.base_component, fixing the random seed is required to make sure that
Expand Down Expand Up @@ -57,7 +56,8 @@ def __iter__(self) -> Generator[ModelID, None, None]:

def _get_models(self, model_type: type[Model] = None, page: Optional[Model] = None) -> Generator[Model, None, None]:
"""Iterates through all models of type `model_type` (including subclasses). If `page_id` specified then only
give models from that page."""
give models from that page.
"""
models = self._get_model_children(page) if page is not None else self.__models.values()

for model in models:
Expand Down
1 change: 0 additions & 1 deletion vizro-core/src/vizro/models/_action/_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
except ImportError: # pragma: no cov
from pydantic import Field, validator

from vizro.managers._model_manager import ModelID
from vizro.models import VizroBaseModel
from vizro.models._models_utils import _log_call
from vizro.models.types import CapturedCallable
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/models/_controls/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from vizro.actions import _filter
from vizro.managers import data_manager, model_manager
from vizro.managers._model_manager import ModelID
from vizro.models import Action, VizroBaseModel, Graph, AgGrid, Table, Figure
from vizro.models import Action, AgGrid, Figure, Graph, Table, VizroBaseModel
from vizro.models._components.form import (
Checklist,
DatePicker,
Expand Down
4 changes: 2 additions & 2 deletions vizro-core/src/vizro/models/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from vizro._constants import ON_PAGE_LOAD_ACTION_PREFIX
from vizro.actions import _on_page_load
from vizro.managers import model_manager
from vizro.managers._model_manager import DuplicateIDError, ModelID
from vizro.models import Action, Layout, VizroBaseModel, Graph, AgGrid, Table, Figure
from vizro.managers._model_manager import DuplicateIDError
from vizro.models import Action, AgGrid, Figure, Graph, Layout, Table, 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
Expand Down

0 comments on commit f07b84e

Please sign in to comment.