Skip to content

Commit daeb3e2

Browse files
authored
Merge pull request #3016 from Arthurdw/PATCH-reflect-correct-types-for-get_delegated
fix: reflect correct return types for get_delegated
2 parents 2e903fc + 688eba2 commit daeb3e2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bittensor/core/async_subtensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,7 @@ async def get_delegated(
18801880
block: Optional[int] = None,
18811881
block_hash: Optional[str] = None,
18821882
reuse_block: bool = False,
1883-
) -> list[tuple[DelegateInfo, Balance]]:
1883+
) -> list[DelegatedInfo]:
18841884
"""
18851885
Retrieves a list of delegates and their associated stakes for a given coldkey. This function identifies the
18861886
delegates that a specific account has staked tokens on.
@@ -1892,7 +1892,7 @@ async def get_delegated(
18921892
reuse_block: Whether to reuse the last-used blockchain block hash.
18931893
18941894
Returns:
1895-
A list of tuples, each containing a delegate's information and staked amount.
1895+
A list containing the delegated information for the specified coldkey.
18961896
18971897
This function is important for account holders to understand their stake allocations and their involvement in
18981898
the network's delegation and consensus mechanisms.

bittensor/core/subtensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ def get_delegate_take(self, hotkey_ss58: str, block: Optional[int] = None) -> fl
12231223

12241224
def get_delegated(
12251225
self, coldkey_ss58: str, block: Optional[int] = None
1226-
) -> list[tuple["DelegateInfo", Balance]]:
1226+
) -> list[DelegatedInfo]:
12271227
"""
12281228
Retrieves a list of delegates and their associated stakes for a given coldkey. This function identifies the
12291229
delegates that a specific account has staked tokens on.
@@ -1233,7 +1233,7 @@ def get_delegated(
12331233
block (Optional[int]): The blockchain block number for the query.
12341234
12351235
Returns:
1236-
A list of tuples, each containing a delegate's information and staked amount.
1236+
A list containing the delegated information for the specified coldkey.
12371237
12381238
This function is important for account holders to understand their stake allocations and their involvement in
12391239
the network's delegation and consensus mechanisms.

0 commit comments

Comments
 (0)