Mercurial > hg
changeset 46682:8f8fce2dd594 stable
typing: switch an argument type to the generic form
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, ...)
Differential Revision: https://phab.mercurial-scm.org/D10167
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 11 Mar 2021 17:02:28 -0500 |
parents | ae62ab82a345 |
children | b0253377e170 |
files | mercurial/logcmdutil.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/logcmdutil.py Thu Mar 11 21:25:28 2021 -0500 +++ b/mercurial/logcmdutil.py Thu Mar 11 17:02:28 2021 -0500 @@ -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().