diff --git a/background_tasks.py b/background_tasks.py index f748696..6f5f848 100755 --- a/background_tasks.py +++ b/background_tasks.py @@ -79,7 +79,7 @@ def run(self): sync_gaps = get_sync_gaps(self.blockprint_url) chunks = explode_gaps(sync_gaps) - for (start_slot, end_slot) in chunks: + for start_slot, end_slot in chunks: print(f"Downloading backfill blocks {start_slot}..={end_slot}") block_rewards = download_block_rewards( start_slot, end_slot, beacon_node=self.bn_url diff --git a/build_db.py b/build_db.py index afc1205..be7965e 100755 --- a/build_db.py +++ b/build_db.py @@ -178,7 +178,7 @@ def get_sync_gaps(block_db): missing_parent_slots = get_missing_parent_blocks(block_db) gaps = [] - for (block_slot, parent_slot) in missing_parent_slots: + for block_slot, parent_slot in missing_parent_slots: prior_slot = get_greatest_prior_block_slot(block_db, parent_slot) if prior_slot is None: @@ -221,7 +221,7 @@ def get_blocks_per_client(block_db, start_slot, end_slot): (start_slot, end_slot), ) - for (client, count) in client_counts: + for client, count in client_counts: blocks_per_client[client] = int(count) return blocks_per_client diff --git a/compute_periods.py b/compute_periods.py index 155d3e1..f2b708c 100644 --- a/compute_periods.py +++ b/compute_periods.py @@ -316,7 +316,7 @@ def get_validators_per_client(period_db, period_id, guess_column=DEFAULT_GUESS): (period_id,), ) - for (client, count) in client_counts: + for client, count in client_counts: validators_per_client[client] = int(count) return validators_per_client @@ -339,7 +339,7 @@ def period_db_to_csv(period_db, output_file, guess_column=DEFAULT_GUESS): periods = period_db.execute("SELECT * FROM periods") - for (period_id, end_slot, num_active_validators) in periods: + for period_id, end_slot, num_active_validators in periods: row = { "period_id": period_id, "end_slot": end_slot, diff --git a/multi_classifier.py b/multi_classifier.py index 3ace8ac..4ebfc82 100644 --- a/multi_classifier.py +++ b/multi_classifier.py @@ -31,7 +31,7 @@ def __init__(self, data_dir): def classify(self, block_reward): slot = int(block_reward["meta"]["slot"]) - for (i, (start_slot, end_slot, classifier)) in enumerate(self.classifiers): + for i, (start_slot, end_slot, classifier) in enumerate(self.classifiers): # Allow the last classifier to be used for slots beyond its end slot if start_slot <= slot and ( slot <= end_slot or i + 1 == len(self.classifiers) diff --git a/prepare_training_data.py b/prepare_training_data.py index af55e40..c7e5941 100755 --- a/prepare_training_data.py +++ b/prepare_training_data.py @@ -30,7 +30,7 @@ def check_graffiti(graffiti: str, disabled_clients=[]) -> str: - for (client, regexes) in REGEX.items(): + for client, regexes in REGEX.items(): if client in disabled_clients: continue @@ -66,7 +66,7 @@ def process_file( res = classify_rewards_by_graffiti(rewards, disabled_clients=disabled_clients) - for (client, examples) in res.items(): + for client, examples in res.items(): for block_rewards in examples: store_block_rewards(block_rewards, client, proc_data_dir)