Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tidy] Remove docstrings from build methods to harmonize overall #495

Merged
merged 7 commits into from
May 30, 2024
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨

- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Removed

- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Added

- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Changed

- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Deprecated

- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Fixed

- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Security

- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
8 changes: 2 additions & 6 deletions vizro-core/src/vizro/models/_action/_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,10 @@ def _action_callback_function(
# This could be a list of outputs, dictionary of outputs or any single value including None.
return return_value

# Builds a callback for the Action model and returns required components for the callback.
# Returns a list of required components (e.g. dcc.Download) for the Action model added to the `Dashboard` container.
@_log_call
def build(self):
"""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.

"""
external_callback_inputs, external_callback_outputs, action_components = self._get_callback_mapping()
callback_inputs = {
"external": external_callback_inputs,
Expand Down
3 changes: 1 addition & 2 deletions vizro-core/src/vizro/models/_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ def component_grid_lines(self):
# Another alternative is to take [component.build() for component in components] as an argument
# in the build method here.
@_log_call
def build(self):
"""Creates empty container with inline style to later position components in."""
def build(self): # creates empty container with inline style to later position components in.
components_content = [
html.Div(
id=f"{self.id}_{component_idx}",
Expand Down