Add black formating.

pull/600/head
Andrey Dolgolev 2022-05-05 13:24:00 +03:00
rodzic 5df12db95c
commit a9b0831740
2 zmienionych plików z 21 dodań i 6 usunięć

Wyświetl plik

@ -100,7 +100,10 @@ def main():
parser_cmc = subcommands.add_parser("cmc", description="Coinmarketcap commands")
parser_cmc.set_defaults(func=lambda _: parser_cmc.print_help())
parser_cmc.add_argument(
"-s", "--sandbox", action="store_true", help="Target to sandbox API",
"-s",
"--sandbox",
action="store_true",
help="Target to sandbox API",
)
subcommands_parser_cmc = parser_cmc.add_subparsers(

Wyświetl plik

@ -128,7 +128,11 @@ def generate_data(
end = datetime.utcnow()
time_series_subquery = db_session.query(
func.generate_series(start, end, time_step,).label("timeseries_points")
func.generate_series(
start,
end,
time_step,
).label("timeseries_points")
)
time_series_subquery = time_series_subquery.subquery(name="time_series_subquery")
@ -523,7 +527,8 @@ def generate_web3_metrics(
abi_external_calls = [item for item in abi_json if item["type"] == "external_call"]
extention_data = process_external(
abi_external_calls=abi_external_calls, blockchain=blockchain_type,
abi_external_calls=abi_external_calls,
blockchain=blockchain_type,
)
extention_data.append(
@ -702,7 +707,10 @@ def stats_generate_handler(args: argparse.Namespace):
key = subscription_by_id[subscription_id].resource_data[
"s3_path"
]
abi = s3_client.get_object(Bucket=bucket, Key=key,)
abi = s3_client.get_object(
Bucket=bucket,
Key=key,
)
abi_json = json.loads(abi["Body"].read())
methods = generate_list_of_names(
type="function",
@ -812,7 +820,8 @@ def stats_generate_handler(args: argparse.Namespace):
# result is a {call_hash: value} dictionary.
external_calls_results = process_external_merged(
external_calls=merged_external_calls["merged"], blockchain=blockchain_type,
external_calls=merged_external_calls["merged"],
blockchain=blockchain_type,
)
for address in address_dashboard_id_subscription_id_tree.keys():
@ -1040,7 +1049,10 @@ def stats_generate_api_task(
bucket = subscription_by_id[subscription_id].resource_data["bucket"]
key = subscription_by_id[subscription_id].resource_data["s3_path"]
abi = s3_client.get_object(Bucket=bucket, Key=key,)
abi = s3_client.get_object(
Bucket=bucket,
Key=key,
)
abi_json = json.loads(abi["Body"].read())
methods = generate_list_of_names(