Skip to content

Commit bbc4705

Browse files
authored
Merge pull request #590 from opentensor/chore/thewhaleking/better-naming
2 parents db8387a + fc69e80 commit bbc4705

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

bittensor_cli/src/commands/sudo.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
SubtensorInterface,
3535
ProposalVoteData,
3636
)
37+
from scalecodec.types import GenericMetadataVersioned
3738

3839

3940
# helpers and extrinsics
@@ -91,8 +92,8 @@ def search_metadata(
9192
param_name: str,
9293
value: Union[str, bool, float, list[float]],
9394
netuid: int,
94-
metadata,
95-
pallet: str = DEFAULT_PALLET,
95+
metadata: "GenericMetadataVersioned",
96+
pallet_name: str = DEFAULT_PALLET,
9697
) -> tuple[bool, Optional[dict]]:
9798
"""
9899
Searches the substrate metadata AdminUtils pallet for a given parameter name. Crafts a response dict to be used
@@ -103,7 +104,7 @@ def search_metadata(
103104
value: the value to set the hyperparameter
104105
netuid: the specified netuid
105106
metadata: the subtensor.substrate.metadata
106-
pallet: the name of the module to use for the query. If not set, the default value is DEFAULT_PALLET
107+
pallet_name: the name of the module to use for the query. If not set, the default value is DEFAULT_PALLET
107108
108109
Returns:
109110
(success, dict of call params)
@@ -125,7 +126,7 @@ def type_converter_with_retry(type_, val, arg_name):
125126

126127
call_crafter = {"netuid": netuid}
127128

128-
pallet = metadata.get_metadata_pallet(pallet)
129+
pallet = metadata.get_metadata_pallet(pallet_name)
129130
for call in pallet.calls:
130131
if call.name == param_name:
131132
if "netuid" not in [x.name for x in call.args]:

0 commit comments

Comments
 (0)