@@ -140,7 +140,7 @@ def strtobool(val: str) -> Union[bool, Literal["==SUPRESS=="]]:
140140
141141def _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
162162def 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
@@ -174,10 +174,10 @@ def get_explorer_url_for_network(
174174 The explorer url for the given block hash and network. Or None if the network is not known.
175175 """
176176
177- explorer_urls : Optional [ dict [str , str ] ] = {}
178- # Will be None if the network is not known. i.e. not in network_map
179- explorer_root_urls : Optional [ dict [str , str ]] = (
180- _get_explorer_root_url_by_network_from_map ( network , network_map )
177+ explorer_urls : dict [str , str ] = {}
178+
179+ explorer_root_urls : dict [str , str ] = _get_explorer_root_url_by_network_from_map (
180+ network , network_map
181181 )
182182
183183 if explorer_root_urls != {}:
0 commit comments