Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Nov 28, 2022
1 parent 2ddc3ae commit 1d4dab9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions superset/connectors/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def data_for_slices( # pylint: disable=too-many-locals
@staticmethod
def filter_values_handler( # pylint: disable=too-many-arguments
values: Optional[FilterValues],
op: str,
operator: str,
target_generic_type: GenericDataType,
target_native_type: Optional[str] = None,
is_list_target: bool = False,
Expand All @@ -406,7 +406,7 @@ def filter_values_handler( # pylint: disable=too-many-arguments
return None

def handle_single_value(value: Optional[FilterValue]) -> Optional[FilterValue]:
if op == utils.FilterOperator.TEMPORAL_RANGE:
if operator == utils.FilterOperator.TEMPORAL_RANGE:
return value
if (
isinstance(value, (float, int))
Expand Down
2 changes: 1 addition & 1 deletion superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma
target_generic_type = GenericDataType.STRING
eq = self.filter_values_handler(
values=val,
op=op,
operator=op,
target_generic_type=target_generic_type,
target_native_type=col_type,
is_list_target=is_list_target,
Expand Down
6 changes: 3 additions & 3 deletions superset/models/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ def template_params_dict(self) -> Dict[Any, Any]:
@staticmethod
def filter_values_handler( # pylint: disable=too-many-arguments
values: Optional[FilterValues],
op: str,
operator: str,
target_generic_type: utils.GenericDataType,
target_native_type: Optional[str] = None,
is_list_target: bool = False,
Expand All @@ -1108,7 +1108,7 @@ def filter_values_handler( # pylint: disable=too-many-arguments
return None

def handle_single_value(value: Optional[FilterValue]) -> Optional[FilterValue]:
if op == utils.FilterOperator.TEMPORAL_RANGE:
if operator == utils.FilterOperator.TEMPORAL_RANGE:
return value
if (
isinstance(value, (float, int))
Expand Down Expand Up @@ -1695,7 +1695,7 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma
target_generic_type = utils.GenericDataType.STRING
eq = self.filter_values_handler(
values=val,
op=op,
operator=op,
target_generic_type=target_generic_type,
target_native_type=col_type,
is_list_target=is_list_target,
Expand Down

0 comments on commit 1d4dab9

Please sign in to comment.