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 25, 2024
1 parent 985ec4c commit 66da134
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vizro-core/src/vizro/models/_controls/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def _get_min_max(targeted_data: pd.DataFrame, current_value=None) -> tuple[float
def _get_options(targeted_data: pd.DataFrame, current_value=None) -> list[Any]:
# The dropna() isn't strictly required here but will be in future pandas versions when the behavior of stack
# changes. See https://pandas.pydata.org/docs/whatsnew/v2.1.0.html#whatsnew-210-enhancements-new-stack.
options = set(targeted_data.stack().dropna()) # noqa: PD013
options = set(targeted_data.stack().dropna()) # noqa: PD013

# AM comment: I refactored this function to work analogously to _get_min_max.
# Completely untested though so please do check!!
Expand All @@ -314,4 +314,3 @@ def _get_options(targeted_data: pd.DataFrame, current_value=None) -> list[Any]:
options = options | current_value - {ALL_OPTION}

return sorted(options)

0 comments on commit 66da134

Please sign in to comment.