packaging: fix the type hint on the download_entry function
Flagged by PyCharm.
Differential Revision: https://phab.mercurial-scm.org/D12571
--- 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']