Skip to content

Commit f90dfb5

Browse files
committed
chore: fix incorrect Optional type annotation in utils
1 parent d7cc951 commit f90dfb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bittensor/utils/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def strtobool(val: str) -> Union[bool, Literal["==SUPRESS=="]]:
140140

141141
def _get_explorer_root_url_by_network_from_map(
142142
network: str, network_map: dict[str, dict[str, str]]
143-
) -> Optional[dict[str, str]]:
143+
) -> dict[str, str]:
144144
"""
145145
Returns the explorer root url for the given network name from the given network map.
146146
@@ -151,7 +151,7 @@ def _get_explorer_root_url_by_network_from_map(
151151
Returns:
152152
The explorer url for the given network. Or None if the network is not in the network map.
153153
"""
154-
explorer_urls: Optional[dict[str, str]] = {}
154+
explorer_urls: dict[str, str] = {}
155155
for entity_nm, entity_network_map in network_map.items():
156156
if network in entity_network_map:
157157
explorer_urls[entity_nm] = entity_network_map[network]
@@ -161,7 +161,7 @@ def _get_explorer_root_url_by_network_from_map(
161161

162162
def get_explorer_url_for_network(
163163
network: str, block_hash: str, network_map: dict[str, dict[str, str]]
164-
) -> Optional[dict[str, str]]:
164+
) -> dict[str, str]:
165165
"""
166166
Returns the explorer url for the given block hash and network.
167167

0 commit comments

Comments
 (0)