changeset 49081:a7fe96abcf56

packaging: fix the type hint on the download_entry function Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D12571
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 18 Apr 2022 16:18:33 -0400
parents b44678aeb460
children dd381b973efc
files contrib/packaging/hgpackaging/downloads.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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']