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

@@ -45,7 +45,9 @@ query_birth_names = {
QUERY_OBJECTS: Dict[str, Dict[str, object]] = {
"birth_names": query_birth_names,
# `:suffix` are overrides only
"birth_names:include_time": {"groupby": [DTTM_ALIAS, "name"],},
"birth_names:include_time": {
"groupby": [DTTM_ALIAS, "name"],
},
"birth_names:orderby_dup_alias": {
"metrics": [
{
@@ -93,7 +95,9 @@ QUERY_OBJECTS: Dict[str, Dict[str, object]] = {
],
],
},
"birth_names:only_orderby_has_metric": {"metrics": [],},
"birth_names:only_orderby_has_metric": {
"metrics": [],
},
}
ANNOTATION_LAYERS = {
@@ -182,17 +186,27 @@ POSTPROCESSING_OPERATIONS = {
# https://numpy.org/doc/stable/reference/generated/numpy.percentile.html
"options": {"q": 25, "interpolation": "lower"},
},
"median": {"operator": "median", "column": "sum__num",},
"median": {
"operator": "median",
"column": "sum__num",
},
},
},
},
{"operation": "sort", "options": {"columns": {"q1": False, "name": True},},},
{
"operation": "sort",
"options": {
"columns": {"q1": False, "name": True},
},
},
]
}
def get_query_object(
query_name: str, add_postprocessing_operations: bool, add_time_offsets: bool,
query_name: str,
add_postprocessing_operations: bool,
add_time_offsets: bool,
) -> Dict[str, Any]:
if query_name not in QUERY_OBJECTS:
raise Exception(f"QueryObject fixture not defined for datasource: {query_name}")
@@ -247,7 +261,9 @@ class QueryContextGenerator:
"datasource": {"id": table.id, "type": table.type},
"queries": [
get_query_object(
query_name, add_postprocessing_operations, add_time_offsets,
query_name,
add_postprocessing_operations,
add_time_offsets,
)
],
"result_type": ChartDataResultType.FULL,