remove unneeded parentheses (#14654)

This commit is contained in:
Kyle Altendorf 2023-02-23 08:42:44 -08:00 committed by GitHub
parent c098ee9166
commit 96dad39392
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

View File

@ -246,7 +246,7 @@ def derive_sk_from_hd_path(master_sk: PrivateKey, hd_path_root: str) -> Tuple[Pr
current_sk: PrivateKey = master_sk
# Derive keys along the path
for (current_index, derivation_type) in index_and_derivation_types:
for current_index, derivation_type in index_and_derivation_types:
if derivation_type == DerivationType.NONOBSERVER:
current_sk = _derive_path(current_sk, [current_index])
elif derivation_type == DerivationType.OBSERVER:
@ -384,7 +384,7 @@ def _search_derived(
if len(found_items) > 0 and show_progress:
print()
for (term, found_item, found_item_type) in found_items:
for term, found_item, found_item_type in found_items:
# Update remaining_search_terms and found_search_terms
del remaining_search_terms[term]
found_search_terms.append(term)

View File

@ -181,7 +181,7 @@ async def print_fee_info(node_client: FullNodeRpcClient) -> None:
print("\nFee Rate Estimates:")
max_name_len = max(len(name) for name in target_times_names)
for (n, e) in zip(target_times_names, res["estimates"]):
for n, e in zip(target_times_names, res["estimates"]):
print(f" {n:>{max_name_len}}: {e:.3f} mojo per CLVM cost")
print("")

View File

@ -179,7 +179,7 @@ def check_plots(root_path, num, challenge_start, grep_string, list_duplicates, d
log.info("Summary")
total_plots: int = sum(list(total_good_plots.values()))
log.info(f"Found {total_plots} valid plots, total size {total_size / (1024 * 1024 * 1024 * 1024):.5f} TiB")
for (k, count) in sorted(dict(total_good_plots).items()):
for k, count in sorted(dict(total_good_plots).items()):
log.info(f"{count} plots of size {k}")
grand_total_bad = len(bad_plots_list) + len(plot_manager.failed_to_open_filenames)
if grand_total_bad > 0:

View File

@ -194,7 +194,7 @@ def fix_ssl(root_path: Path) -> None:
certs_to_check, keys_to_check = get_all_ssl_file_paths(root_path)
files_to_fix = verify_ssl_certs_and_keys(certs_to_check, keys_to_check)
for (file, mask, updated_mode) in files_to_fix:
for file, mask, updated_mode in files_to_fix:
# Check that permissions are correct, and if not, attempt to fix
(valid, fixed) = check_and_fix_permissions_for_ssl_file(file, mask, updated_mode)
if fixed:

View File

@ -53,7 +53,7 @@ class TransactionRecord(Streamable):
def is_in_mempool(self) -> bool:
# If one of the nodes we sent it to responded with success, we set it to success
for (_, mis, _) in self.sent_to:
for _, mis, _ in self.sent_to:
if MempoolInclusionStatus(mis) == MempoolInclusionStatus.SUCCESS:
return True
# Note, transactions pending inclusion (pending) return false

View File

@ -50,7 +50,7 @@ async def generate_coins(
requested_coins: Dict[Optional[str], List[uint64]],
) -> Dict[Optional[str], List[Coin]]:
await sim.farm_block(acs_ph)
parent_coin: Coin = [cr.coin for cr in await (sim_client.get_coin_records_by_puzzle_hash(acs_ph))][0]
parent_coin: Coin = [cr.coin for cr in await sim_client.get_coin_records_by_puzzle_hash(acs_ph)][0]
# We need to gather a list of initial coins to create as well as spends that do the eve spend for every CAT
payments: List[Payment] = []
@ -100,7 +100,7 @@ async def generate_coins(
tail_hash: bytes32 = str_to_tail_hash(tail_str)
cat_ph: bytes32 = construct_cat_puzzle(CAT_MOD, tail_hash, acs).get_tree_hash()
coin_dict[tail_str] = [
cr.coin for cr in await (sim_client.get_coin_records_by_puzzle_hash(cat_ph, include_spent_coins=False))
cr.coin for cr in await sim_client.get_coin_records_by_puzzle_hash(cat_ph, include_spent_coins=False)
]
else:
coin_dict[None] = list(
@ -108,7 +108,7 @@ async def generate_coins(
lambda c: c.amount < 250000000000,
[
cr.coin
for cr in await (sim_client.get_coin_records_by_puzzle_hash(acs_ph, include_spent_coins=False))
for cr in await sim_client.get_coin_records_by_puzzle_hash(acs_ph, include_spent_coins=False)
],
)
)