Skip to content

Commit a5afbdd

Browse files
author
Roman
committed
remove nested else
1 parent 3f98a07 commit a5afbdd

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

bittensor/core/async_subtensor.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -986,11 +986,11 @@ async def get_parents(
986986
storage function to get the children and formats them before returning as a tuple.
987987
988988
Arguments:
989-
hotkey (str): The child hotkey SS58.
990-
netuid (int): The netuid value.
991-
block (Optional[int]): The block number for which the children are to be retrieved.
992-
block_hash (Optional[str]): The hash of the block to retrieve the subnet unique identifiers from.
993-
reuse_block (bool): Whether to reuse the last-used block hash.
989+
hotkey: The child hotkey SS58.
990+
netuid: The netuid value.
991+
block: The block number for which the children are to be retrieved.
992+
block_hash: The hash of the block to retrieve the subnet unique identifiers from.
993+
reuse_block: Whether to reuse the last-used block hash.
994994
995995
Returns:
996996
A list of formatted parents [(proportion, parent)]
@@ -1011,8 +1011,8 @@ async def get_parents(
10111011
normalized_proportion = u64_normalized_float(proportion)
10121012
formatted_parents.append((normalized_proportion, formatted_child))
10131013
return formatted_parents
1014-
else:
1015-
return []
1014+
1015+
return []
10161016

10171017
async def get_children(
10181018
self,

bittensor/core/subtensor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,9 @@ def get_parents(
759759
storage function to get the children and formats them before returning as a tuple.
760760
761761
Arguments:
762-
hotkey (str): The child hotkey SS58.
763-
netuid (int): The netuid.
764-
block (Optional[int]): The block number for which the children are to be retrieved.
762+
hotkey: The child hotkey SS58.
763+
netuid: The netuid.
764+
block: The block number for which the children are to be retrieved.
765765
766766
Returns:
767767
A list of formatted parents [(proportion, parent)]
@@ -780,8 +780,8 @@ def get_parents(
780780
normalized_proportion = u64_normalized_float(proportion)
781781
formatted_parents.append((normalized_proportion, formatted_child))
782782
return formatted_parents
783-
else:
784-
return []
783+
784+
return []
785785

786786
def get_children(
787787
self, hotkey: str, netuid: int, block: Optional[int] = None

0 commit comments

Comments
 (0)