@@ -26,7 +26,7 @@ class SubtensorApi:
26
26
config: Bittensor configuration object. Defaults to `None`.
27
27
log_verbose: If `True`, sets the subtensor to log verbosely. Defaults to `False`.
28
28
async_subtensor: If `True`, uses the async subtensor to create the connection. Defaults to `False`.
29
- subtensor_fields : If `True`, all methods from the Subtensor class will be added to the root level of this class.
29
+ backward_compatibility : If `True`, all methods from the Subtensor class will be added to the root level of this class.
30
30
31
31
Example:
32
32
# sync version
@@ -46,10 +46,10 @@ class SubtensorApi:
46
46
print(await subtensor.delegates.get_delegate_identities())
47
47
print(await subtensor.chain.tx_rate_limit())
48
48
49
- # using `subtensor_fields `
49
+ # using `backward_compatibility `
50
50
import bittensor as bt
51
51
52
- subtensor = bt.SubtensorApi(subtensor_fields =True)
52
+ subtensor = bt.SubtensorApi(backward_compatibility =True)
53
53
print(subtensor.bonds(0))
54
54
"""
55
55
@@ -59,7 +59,7 @@ def __init__(
59
59
config : Optional ["Config" ] = None ,
60
60
log_verbose : bool = False ,
61
61
async_subtensor : bool = False ,
62
- subtensor_fields : bool = False ,
62
+ backward_compatibility : bool = False ,
63
63
_mock : bool = False ,
64
64
):
65
65
self .network = network
@@ -88,7 +88,9 @@ def __init__(
88
88
self .sign_and_send_extrinsic = self ._subtensor .sign_and_send_extrinsic
89
89
self .start_call = self ._subtensor .start_call
90
90
self .wait_for_block = self ._subtensor .wait_for_block
91
- if subtensor_fields :
91
+
92
+ # adds all Subtensor methods into main level os SubtensorApi class
93
+ if backward_compatibility :
92
94
_add_classic_fields (self )
93
95
94
96
def _get_subtensor (self ) -> Union ["_Subtensor" , "_AsyncSubtensor" ]:
0 commit comments