|
7 | 7 | import importlib
|
8 | 8 | import sys
|
9 | 9 |
|
10 |
| -from bittensor_wallet import Keypair # noqa: F401 |
11 |
| -from bittensor_wallet.errors import KeyFileError # noqa: F401 |
12 |
| -from bittensor_wallet.keyfile import ( # noqa: F401 |
| 10 | +from bittensor_wallet import Keypair |
| 11 | +from bittensor_wallet.errors import KeyFileError |
| 12 | +from bittensor_wallet.keyfile import ( |
13 | 13 | serialized_keypair_to_keyfile_data,
|
14 | 14 | deserialize_keypair_from_keyfile_data,
|
15 | 15 | validate_password,
|
|
25 | 25 | decrypt_keyfile_data,
|
26 | 26 | Keyfile,
|
27 | 27 | )
|
28 |
| -from bittensor_wallet.wallet import display_mnemonic_msg, Wallet # noqa: F401 |
| 28 | +from bittensor_wallet.wallet import display_mnemonic_msg, Wallet |
29 | 29 |
|
30 |
| -from bittensor.core import settings, timelock # noqa: F401 |
| 30 | +from bittensor.core import settings, timelock |
31 | 31 | from bittensor.core.async_subtensor import AsyncSubtensor
|
32 | 32 | from bittensor.core.axon import Axon
|
33 |
| -from bittensor.core.chain_data import ( # noqa: F401 |
| 33 | +from bittensor.core.chain_data import ( |
34 | 34 | AxonInfo,
|
35 | 35 | ChainIdentity,
|
36 | 36 | DelegateInfo,
|
|
55 | 55 | SubnetState,
|
56 | 56 | WeightCommitInfo,
|
57 | 57 | )
|
58 |
| -from bittensor.core.config import ( # noqa: F401 |
59 |
| - InvalidConfigFile, |
60 |
| - DefaultConfig, |
61 |
| - Config, |
62 |
| - T, |
63 |
| -) |
64 |
| -from bittensor.core.dendrite import Dendrite # noqa: F401 |
65 |
| -from bittensor.core.errors import ( # noqa: F401 |
| 58 | +from bittensor.core.config import Config |
| 59 | +from bittensor.core.dendrite import Dendrite |
| 60 | +from bittensor.core.errors import ( |
66 | 61 | BlacklistedException,
|
67 | 62 | ChainConnectionError,
|
68 | 63 | ChainError,
|
|
102 | 97 | )
|
103 | 98 | from bittensor.core.metagraph import Metagraph
|
104 | 99 | from bittensor.core.settings import BLOCKTIME
|
105 |
| -from bittensor.core.stream import StreamingSynapse # noqa: F401 |
| 100 | +from bittensor.core.stream import StreamingSynapse |
106 | 101 | from bittensor.core.subtensor import Subtensor
|
107 |
| -from bittensor.core.subtensor_api import SubtensorApi # noqa: F401 |
108 |
| -from bittensor.core.synapse import TerminalInfo, Synapse # noqa: F401 |
109 |
| -from bittensor.core.tensor import Tensor # noqa: F401 |
110 |
| -from bittensor.core.threadpool import ( # noqa: F401 |
111 |
| - PriorityThreadPoolExecutor as PriorityThreadPoolExecutor, |
112 |
| -) |
113 |
| -from bittensor.utils import ( # noqa: F401 |
| 102 | +from bittensor.core.subtensor_api import SubtensorApi |
| 103 | +from bittensor.core.synapse import TerminalInfo, Synapse |
| 104 | +from bittensor.core.tensor import Tensor |
| 105 | +from bittensor.core.threadpool import PriorityThreadPoolExecutor |
| 106 | +from bittensor.utils import ( |
114 | 107 | ss58_to_vec_u8,
|
115 | 108 | version_checking,
|
116 | 109 | strtobool,
|
|
120 | 113 | u64_normalized_float,
|
121 | 114 | get_hash,
|
122 | 115 | )
|
123 |
| -from bittensor.utils.balance import Balance as Balance # noqa: F401 |
| 116 | +from bittensor.utils.balance import Balance |
124 | 117 | from bittensor.utils.balance import tao, rao
|
125 | 118 | from bittensor.utils.btlogging import logging
|
126 |
| -from bittensor.utils.mock.subtensor_mock import MockSubtensor as MockSubtensor # noqa: F401 |
127 |
| -from bittensor.utils.subnets import SubnetsAPI # noqa: F401 |
| 119 | +from bittensor.utils.mock.subtensor_mock import MockSubtensor |
| 120 | +from bittensor.utils.subnets import SubnetsAPI |
128 | 121 |
|
129 |
| -tao = tao |
130 |
| -rao = rao |
131 | 122 |
|
132 | 123 | # Backwards compatibility with previous bittensor versions.
|
133 | 124 | async_subtensor = AsyncSubtensor
|
|
140 | 131 | subtensor = Subtensor
|
141 | 132 | synapse = Synapse
|
142 | 133 |
|
143 |
| -__blocktime__ = BLOCKTIME |
144 |
| -__network_explorer_map__ = settings.NETWORK_EXPLORER_MAP |
145 |
| -__pipaddress__ = settings.PIPADDRESS |
146 |
| -__ss58_format__ = settings.SS58_FORMAT |
147 |
| -__type_registry__ = settings.TYPE_REGISTRY |
148 |
| -__ss58_address_length__ = settings.SS58_ADDRESS_LENGTH |
149 |
| - |
150 |
| -__networks__ = settings.NETWORKS |
151 |
| - |
152 |
| -__finney_entrypoint__ = settings.FINNEY_ENTRYPOINT |
153 |
| -__finney_test_entrypoint__ = settings.FINNEY_TEST_ENTRYPOINT |
154 |
| -__archive_entrypoint__ = settings.ARCHIVE_ENTRYPOINT |
155 |
| -__local_entrypoint__ = settings.LOCAL_ENTRYPOINT |
156 |
| - |
157 |
| -__tao_symbol__ = settings.TAO_SYMBOL |
158 |
| -__rao_symbol__ = settings.RAO_SYMBOL |
159 |
| - |
160 | 134 | # Makes the `bittensor.utils.mock` subpackage available as `bittensor.mock` for backwards compatibility.
|
161 | 135 | mock_subpackage = importlib.import_module("bittensor.utils.mock")
|
162 | 136 | sys.modules["bittensor.mock"] = mock_subpackage
|
@@ -201,3 +175,128 @@ def info(on: bool = True):
|
201 | 175 | on (bool): If True, enables info logging. If False, disables info logging and sets default (WARNING) level.
|
202 | 176 | """
|
203 | 177 | logging.set_info(on)
|
| 178 | + |
| 179 | + |
| 180 | +__all__ = [ |
| 181 | + "Keypair", |
| 182 | + "KeyFileError", |
| 183 | + "serialized_keypair_to_keyfile_data", |
| 184 | + "deserialize_keypair_from_keyfile_data", |
| 185 | + "validate_password", |
| 186 | + "ask_password_to_encrypt", |
| 187 | + "keyfile_data_is_encrypted_nacl", |
| 188 | + "keyfile_data_is_encrypted_ansible", |
| 189 | + "keyfile_data_is_encrypted_legacy", |
| 190 | + "keyfile_data_is_encrypted", |
| 191 | + "keyfile_data_encryption_method", |
| 192 | + "legacy_encrypt_keyfile_data", |
| 193 | + "encrypt_keyfile_data", |
| 194 | + "get_coldkey_password_from_environment", |
| 195 | + "decrypt_keyfile_data", |
| 196 | + "Keyfile", |
| 197 | + "display_mnemonic_msg", |
| 198 | + "Wallet", |
| 199 | + "settings", |
| 200 | + "timelock", |
| 201 | + "AsyncSubtensor", |
| 202 | + "Axon", |
| 203 | + "AxonInfo", |
| 204 | + "ChainIdentity", |
| 205 | + "DelegateInfo", |
| 206 | + "DelegateInfoLite", |
| 207 | + "DynamicInfo", |
| 208 | + "IPInfo", |
| 209 | + "MetagraphInfo", |
| 210 | + "MetagraphInfoEmissions", |
| 211 | + "MetagraphInfoParams", |
| 212 | + "MetagraphInfoPool", |
| 213 | + "NeuronInfo", |
| 214 | + "NeuronInfoLite", |
| 215 | + "PrometheusInfo", |
| 216 | + "ProposalCallData", |
| 217 | + "ProposalVoteData", |
| 218 | + "ScheduledColdkeySwapInfo", |
| 219 | + "SelectiveMetagraphIndex", |
| 220 | + "StakeInfo", |
| 221 | + "SubnetHyperparameters", |
| 222 | + "SubnetIdentity", |
| 223 | + "SubnetInfo", |
| 224 | + "SubnetState", |
| 225 | + "WeightCommitInfo", |
| 226 | + "Config", |
| 227 | + "Dendrite", |
| 228 | + "BlacklistedException", |
| 229 | + "ChainConnectionError", |
| 230 | + "ChainError", |
| 231 | + "ChainQueryError", |
| 232 | + "ChainTransactionError", |
| 233 | + "DelegateTakeTooHigh", |
| 234 | + "DelegateTakeTooLow", |
| 235 | + "DelegateTxRateLimitExceeded", |
| 236 | + "DuplicateChild", |
| 237 | + "HotKeyAccountNotExists", |
| 238 | + "IdentityError", |
| 239 | + "InternalServerError", |
| 240 | + "InvalidChild", |
| 241 | + "InvalidRequestNameError", |
| 242 | + "MetadataError", |
| 243 | + "NominationError", |
| 244 | + "NonAssociatedColdKey", |
| 245 | + "NotDelegateError", |
| 246 | + "NotEnoughStakeToSetChildkeys", |
| 247 | + "NotRegisteredError", |
| 248 | + "NotVerifiedException", |
| 249 | + "PostProcessException", |
| 250 | + "PriorityException", |
| 251 | + "ProportionOverflow", |
| 252 | + "RegistrationError", |
| 253 | + "RegistrationNotPermittedOnRootSubnet", |
| 254 | + "RunException", |
| 255 | + "StakeError", |
| 256 | + "SubNetworkDoesNotExist", |
| 257 | + "SynapseDendriteNoneException", |
| 258 | + "SynapseParsingError", |
| 259 | + "TooManyChildren", |
| 260 | + "TransferError", |
| 261 | + "TxRateLimitExceeded", |
| 262 | + "UnknownSynapseError", |
| 263 | + "UnstakeError", |
| 264 | + "Metagraph", |
| 265 | + "BLOCKTIME", |
| 266 | + "StreamingSynapse", |
| 267 | + "Subtensor", |
| 268 | + "SubtensorApi", |
| 269 | + "TerminalInfo", |
| 270 | + "Synapse", |
| 271 | + "Tensor", |
| 272 | + "PriorityThreadPoolExecutor", |
| 273 | + "ss58_to_vec_u8", |
| 274 | + "version_checking", |
| 275 | + "strtobool", |
| 276 | + "get_explorer_url_for_network", |
| 277 | + "ss58_address_to_bytes", |
| 278 | + "u16_normalized_float", |
| 279 | + "u64_normalized_float", |
| 280 | + "get_hash", |
| 281 | + "Balance", |
| 282 | + "tao", |
| 283 | + "rao", |
| 284 | + "logging", |
| 285 | + "MockSubtensor", |
| 286 | + "SubnetsAPI", |
| 287 | + "async_subtensor", |
| 288 | + "axon", |
| 289 | + "config", |
| 290 | + "dendrite", |
| 291 | + "keyfile", |
| 292 | + "metagraph", |
| 293 | + "wallet", |
| 294 | + "subtensor", |
| 295 | + "synapse", |
| 296 | + "trace", |
| 297 | + "debug", |
| 298 | + "warning", |
| 299 | + "info", |
| 300 | + "mock_subpackage", |
| 301 | + "extrinsics_subpackage", |
| 302 | +] |
0 commit comments