D10167: typing: switch an argument type to the generic form
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Fri Mar 12 18:08:37 UTC 2021
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This fixes the following pytype complaint:
File "/mnt/c/Users/Matt/hg/mercurial/commands.py", line 4672, in log: Function mercurial.logcmdutil.parseopts was called with the wrong arguments [wrong-arg-types]
Expected: (ui, pats: List[Union[bytearray, bytes, memoryview]], ...)
Actually passed: (ui, pats: tuple, ...)
REPOSITORY
rHG Mercurial
BRANCH
stable
REVISION DETAIL
https://phab.mercurial-scm.org/D10167
AFFECTED FILES
mercurial/logcmdutil.py
CHANGE DETAILS
diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py
+++ b/mercurial/logcmdutil.py
@@ -51,6 +51,7 @@
Dict,
List,
Optional,
+ Sequence,
Tuple,
)
@@ -723,7 +724,7 @@
def parseopts(ui, pats, opts):
- # type: (Any, List[bytes], Dict[bytes, Any]) -> walkopts
+ # type: (Any, Sequence[bytes], Dict[bytes, Any]) -> walkopts
"""Parse log command options into walkopts
The returned walkopts will be passed in to getrevs() or makewalker().
To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list