chore: upgrade black (#19410)

This commit is contained in:
Ville Brofeldt
2022-03-29 20:03:09 +03:00
committed by GitHub
parent 816a2c3e1e
commit a619cb4ea9
204 changed files with 2125 additions and 608 deletions

View File

@@ -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)