mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
chore: upgrade black (#19410)
This commit is contained in:
@@ -148,7 +148,8 @@ def validate_column_args(*argnames: str) -> Callable[..., Any]:
|
||||
|
||||
|
||||
def _get_aggregate_funcs(
|
||||
df: DataFrame, aggregates: Dict[str, Dict[str, Any]],
|
||||
df: DataFrame,
|
||||
aggregates: Dict[str, Dict[str, Any]],
|
||||
) -> Dict[str, NamedAgg]:
|
||||
"""
|
||||
Converts a set of aggregate config objects into functions that pandas can use as
|
||||
@@ -170,7 +171,10 @@ def _get_aggregate_funcs(
|
||||
)
|
||||
if "operator" not in agg_obj:
|
||||
raise InvalidPostProcessingError(
|
||||
_("Operator undefined for aggregator: %(name)s", name=name,)
|
||||
_(
|
||||
"Operator undefined for aggregator: %(name)s",
|
||||
name=name,
|
||||
)
|
||||
)
|
||||
operator = agg_obj["operator"]
|
||||
if callable(operator):
|
||||
@@ -179,7 +183,10 @@ def _get_aggregate_funcs(
|
||||
func = NUMPY_FUNCTIONS.get(operator)
|
||||
if not func:
|
||||
raise InvalidPostProcessingError(
|
||||
_("Invalid numpy function: %(operator)s", operator=operator,)
|
||||
_(
|
||||
"Invalid numpy function: %(operator)s",
|
||||
operator=operator,
|
||||
)
|
||||
)
|
||||
options = agg_obj.get("options", {})
|
||||
aggfunc = partial(func, **options)
|
||||
|
||||
Reference in New Issue
Block a user