5
5
import webbrowser
6
6
import netaddr
7
7
from dataclasses import asdict , is_dataclass
8
- from typing import Any , Dict , List
8
+ from typing import Any
9
9
from pywry import PyWry
10
10
11
11
from bittensor_cli .src .bittensor .balances import Balance
@@ -149,7 +149,7 @@ def get_identity(
149
149
150
150
async def fetch_subnet_data (
151
151
wallet : Wallet , subtensor : "SubtensorInterface"
152
- ) -> Dict [str , Any ]:
152
+ ) -> dict [str , Any ]:
153
153
"""
154
154
Fetch subnet data from the network.
155
155
"""
@@ -187,7 +187,7 @@ async def fetch_subnet_data(
187
187
}
188
188
189
189
190
- def process_subnet_data (raw_data : Dict [str , Any ]) -> Dict [str , Any ]:
190
+ def process_subnet_data (raw_data : dict [str , Any ]) -> dict [str , Any ]:
191
191
"""
192
192
Process and prepare subnet data.
193
193
"""
@@ -206,7 +206,7 @@ def process_subnet_data(raw_data: Dict[str, Any]) -> Dict[str, Any]:
206
206
total_slippage_value = Balance .from_tao (0 )
207
207
208
208
# Process stake
209
- stake_dict : Dict [int , List [ Dict [str , Any ]]] = {}
209
+ stake_dict : dict [int , list [ dict [str , Any ]]] = {}
210
210
for stake in stake_info :
211
211
if stake .stake .tao > 0 :
212
212
slippage_value , _ , slippage_percentage = pool_info [
@@ -367,7 +367,7 @@ def _has_exited(handler) -> bool:
367
367
)
368
368
369
369
370
- def generate_full_page (data : Dict [str , Any ]) -> str :
370
+ def generate_full_page (data : dict [str , Any ]) -> str :
371
371
"""
372
372
Generate full HTML content for the interface.
373
373
"""
@@ -673,7 +673,7 @@ def generate_neuron_details() -> str:
673
673
"""
674
674
675
675
676
- def generate_main_header (wallet_info : Dict [str , Any ], block_number : int ) -> str :
676
+ def generate_main_header (wallet_info : dict [str , Any ], block_number : int ) -> str :
677
677
truncated_coldkey = f"{ wallet_info ['coldkey' ][:6 ]} ...{ wallet_info ['coldkey' ][- 6 :]} "
678
678
679
679
# Calculate slippage percentage
@@ -746,7 +746,7 @@ def generate_main_filters() -> str:
746
746
"""
747
747
748
748
749
- def generate_subnets_table (subnets : List [ Dict [str , Any ]]) -> str :
749
+ def generate_subnets_table (subnets : list [ dict [str , Any ]]) -> str :
750
750
rows = []
751
751
for subnet in subnets :
752
752
total_your_stake = sum (stake ["amount" ] for stake in subnet ["your_stakes" ])
0 commit comments