@@ -451,11 +451,11 @@ def _get_archives_base(self, name, target_packages):
451
451
452
452
self ._parse_update_xmls (update_xmls , target_packages )
453
453
454
- def _download_update_xml (self , update_xml_path : str , silent = False ) -> Optional [str ]:
454
+ def _download_update_xml (self , update_xml_path : str , silent : bool = False ) -> Optional [str ]:
455
455
"""Hook for unit test."""
456
456
if not Settings .ignore_hash :
457
457
try :
458
- xml_hash = get_hash (update_xml_path , Settings .hash_algorithm , self .timeout )
458
+ xml_hash : Optional [ bytes ] = get_hash (update_xml_path , Settings .hash_algorithm , self .timeout )
459
459
except ChecksumDownloadFailure :
460
460
if silent :
461
461
return None
@@ -470,7 +470,7 @@ def _download_update_xml(self, update_xml_path: str, silent=False) -> Optional[s
470
470
xml_hash = None
471
471
return getUrl (posixpath .join (self .base , update_xml_path ), self .timeout , xml_hash )
472
472
473
- def _parse_update_xml (self , os_target_folder , update_xml_text , target_packages : Optional [ModuleToPackage ]):
473
+ def _parse_update_xml (self , os_target_folder : str , update_xml_text : str , target_packages : Optional [ModuleToPackage ]) -> None :
474
474
if not target_packages :
475
475
target_packages = ModuleToPackage ({})
476
476
update_xml = Updates .fromstring (self .base , update_xml_text )
@@ -510,7 +510,7 @@ def _parse_update_xml(self, os_target_folder, update_xml_text, target_packages:
510
510
)
511
511
)
512
512
513
- def _parse_update_xmls (self , update_xmls , target_packages : Optional [ModuleToPackage ]):
513
+ def _parse_update_xmls (self , update_xmls : list [ UpdateXmls ] , target_packages : Optional [ModuleToPackage ]) -> None :
514
514
if not target_packages :
515
515
target_packages = ModuleToPackage ({})
516
516
for update_xml in update_xmls :
@@ -701,7 +701,7 @@ def handle_missing_updates_xml(self, e: ArchiveDownloadError):
701
701
def _get_archives (self ):
702
702
self ._get_archives_base (self .tool_name , None )
703
703
704
- def _parse_update_xml (self , os_target_folder , update_xml_text , * ignored ):
704
+ def _parse_update_xml (self , os_target_folder : str , update_xml_text : str , * ignored ) -> None :
705
705
update_xml = Updates .fromstring (self .base , update_xml_text )
706
706
self ._append_tool_update (os_target_folder , update_xml , self .arch , self .tool_version_str )
707
707
0 commit comments