Patchwork D12571: packaging: fix the type hint on the download_entry function

login
register
mail settings
Submitter phabricator
Date April 18, 2022, 8:36 p.m.
Message ID <differential-rev-PHID-DREV-woabgvr2m6cede6fpq3j-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50918/
State New
Headers show

Comments

phabricator - April 18, 2022, 8:36 p.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Flagged by PyCharm.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12571

AFFECTED FILES
  contrib/packaging/hgpackaging/downloads.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/contrib/packaging/hgpackaging/downloads.py b/contrib/packaging/hgpackaging/downloads.py
--- a/contrib/packaging/hgpackaging/downloads.py
+++ b/contrib/packaging/hgpackaging/downloads.py
@@ -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']