Skip to content

Commit f0af642

Browse files
authored
Adds note in config get and fixes default (#121)
1 parent 73ca875 commit f0af642

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

bittensor_cli/cli.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
print_error,
4040
)
4141
from typing_extensions import Annotated
42+
from textwrap import dedent
4243
from websockets import ConnectionClosed
4344
from yaml import safe_dump, safe_load
4445

@@ -1005,17 +1006,23 @@ def get_config(self):
10051006
)
10061007

10071008
for key, value in self.config.items():
1009+
if key == "network" and value is None:
1010+
value = "None (default = finney)"
10081011
if isinstance(value, dict):
1009-
if key == "network" and value is None:
1010-
value = "None (default = finney)"
1011-
10121012
# Nested dictionaries: only metagraph for now, but more may be added later
10131013
for idx, (sub_key, sub_value) in enumerate(value.items()):
10141014
table.add_row(key if idx == 0 else "", str(sub_key), str(sub_value))
10151015
else:
10161016
table.add_row(str(key), str(value), "")
10171017

10181018
console.print(table)
1019+
console.print(
1020+
dedent(
1021+
"""
1022+
Note: The chain endpoint will take precedence over network.
1023+
"""
1024+
)
1025+
)
10191026

10201027
def wallet_ask(
10211028
self,

0 commit comments

Comments
 (0)