Skip to content

Commit 6dbf118

Browse files
author
Roman
committed
refactoring in subtensors
1 parent 7fbfe8f commit 6dbf118

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

bittensor/core/async_subtensor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@
5858
publish_metadata,
5959
get_metadata,
6060
)
61-
from bittensor.core.extrinsics.asyncex.start_call import start_call_extrinsic
6261
from bittensor.core.extrinsics.asyncex.serving import serve_axon_extrinsic
6362
from bittensor.core.extrinsics.asyncex.staking import (
6463
add_stake_extrinsic,
6564
add_stake_multiple_extrinsic,
6665
)
66+
from bittensor.core.extrinsics.asyncex.start_call import start_call_extrinsic
6767
from bittensor.core.extrinsics.asyncex.take import (
6868
decrease_take_extrinsic,
6969
increase_take_extrinsic,
@@ -135,7 +135,6 @@ def __init__(
135135
self.chain_endpoint, self.network = AsyncSubtensor.setup_config(
136136
network, self._config
137137
)
138-
self._mock = _mock
139138

140139
self.log_verbose = log_verbose
141140
self._check_and_log_network_settings()
@@ -229,7 +228,7 @@ async def encode_params(
229228
call_definition: dict[str, list["ParamWithTypes"]],
230229
params: Union[list[Any], dict[str, Any]],
231230
) -> str:
232-
"""Returns a hex encoded string of the params using their types."""
231+
"""Returns a hex-encoded string of the params using their types."""
233232
param_data = scalecodec.ScaleBytes(b"")
234233

235234
for i, param in enumerate(call_definition["params"]):

bittensor/core/subtensor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@
6161
get_metadata,
6262
serve_axon_extrinsic,
6363
)
64-
from bittensor.core.extrinsics.start_call import start_call_extrinsic
6564
from bittensor.core.extrinsics.set_weights import set_weights_extrinsic
6665
from bittensor.core.extrinsics.staking import (
6766
add_stake_extrinsic,
6867
add_stake_multiple_extrinsic,
6968
)
69+
from bittensor.core.extrinsics.start_call import start_call_extrinsic
7070
from bittensor.core.extrinsics.take import (
7171
decrease_take_extrinsic,
7272
increase_take_extrinsic,
@@ -110,7 +110,7 @@
110110

111111

112112
class Subtensor(SubtensorMixin):
113-
"""Thin layer for interacting with Substrate Interface. Mostly a collection of frequently-used calls."""
113+
"""Thin layer for interacting with Substrate Interface. Mostly a collection of frequently used calls."""
114114

115115
def __init__(
116116
self,
@@ -135,7 +135,6 @@ def __init__(
135135
config = self.config()
136136
self._config = copy.deepcopy(config)
137137
self.chain_endpoint, self.network = self.setup_config(network, self._config)
138-
self._mock = _mock
139138

140139
self.log_verbose = log_verbose
141140
self._check_and_log_network_settings()

0 commit comments

Comments
 (0)