packaging: fix the type hint on the download_entry function
authorMatt Harbison <matt_harbison@yahoo.com>
Mon, 18 Apr 2022 16:18:33 -0400
changeset 49081 a7fe96abcf56
parent 49080 b44678aeb460
child 49082 dd381b973efc
packaging: fix the type hint on the download_entry function Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D12571
contrib/packaging/hgpackaging/downloads.py
--- a/contrib/packaging/hgpackaging/downloads.py	Mon Apr 18 16:11:52 2022 -0400
+++ b/contrib/packaging/hgpackaging/downloads.py	Mon Apr 18 16:18:33 2022 -0400
@@ -10,6 +10,7 @@
 import gzip
 import hashlib
 import pathlib
+import typing
 import urllib.request
 
 
@@ -126,8 +127,8 @@
 
 
 def download_entry(
-    name: dict, dest_path: pathlib.Path, local_name=None
-) -> pathlib.Path:
+    name: str, dest_path: pathlib.Path, local_name=None
+) -> typing.Tuple[pathlib.Path, typing.Dict[str, typing.Union[str, int]]]:
     entry = DOWNLOADS[name]
 
     url = entry['url']