diff --git a/vizro-core/changelog.d/20240523_094341_maximilian_schulz_clean_up_api_docs.md b/vizro-core/changelog.d/20240523_094341_maximilian_schulz_clean_up_api_docs.md new file mode 100644 index 000000000..f1f65e73c --- /dev/null +++ b/vizro-core/changelog.d/20240523_094341_maximilian_schulz_clean_up_api_docs.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-core/docs/pages/API-reference/models.md b/vizro-core/docs/pages/API-reference/models.md index c90273126..1297586c0 100644 --- a/vizro-core/docs/pages/API-reference/models.md +++ b/vizro-core/docs/pages/API-reference/models.md @@ -4,6 +4,8 @@ API reference for all [`pydantic`](https://docs.pydantic.dev/latest/) models used. ::: vizro.models + options: + filters: ["!^_","!build"] # Don't show underscore methods and build method ::: vizro.models.types options: diff --git a/vizro-core/src/vizro/models/_action/_action.py b/vizro-core/src/vizro/models/_action/_action.py index e55a8501b..792a95e0e 100644 --- a/vizro-core/src/vizro/models/_action/_action.py +++ b/vizro-core/src/vizro/models/_action/_action.py @@ -145,11 +145,11 @@ def _action_callback_function( return return_value @_log_call - def build(self): + def build(self) -> html.Div: """Builds a callback for the Action model and returns required components for the callback. Returns - List of required components (e.g. dcc.Download) for the Action model added to the `Dashboard` container. + Div containing a list of required components (e.g. dcc.Download) for the Action model """ external_callback_inputs, external_callback_outputs, action_components = self._get_callback_mapping() diff --git a/vizro-core/src/vizro/models/types.py b/vizro-core/src/vizro/models/types.py index aea1a100f..41e9f0657 100644 --- a/vizro-core/src/vizro/models/types.py +++ b/vizro-core/src/vizro/models/types.py @@ -22,7 +22,7 @@ from vizro.charts._charts_utils import _DashboardReadyFigure -# Used to describe _DashboardReadyFigure so we can keep CapturedCallable generic rather than referring to +# Used to describe _DashboardReadyFigure, so we can keep CapturedCallable generic rather than referring to # _DashboardReadyFigure explicitly. @runtime_checkable class _SupportsCapturedCallable(Protocol):