D7384: commands: necessary annotations and suppresssions to pass pytype

dlax (Denis Laxalde) phabricator at mercurial-scm.org
Fri Nov 15 12:40:53 EST 2019


dlax added inline comments.

INLINE COMMENTS

> commands.py:4742
> +            # warning about list not having a max() method.
> +            endrev = revs.max() + 1  # pytype: disable=attribute-error
>          getcopies = scmutil.getcopiesfn(repo, endrev=endrev)

`revs` is always a `smartset.baseset` per af9c73f26371 <https://phab.mercurial-scm.org/rHGaf9c73f263713a7d379c629006be6701dd9956c2> so there should be no attribute error. Or is it because `logcmdutil.getlinerangerevs()` has no type annotation (whereas `logcmdutil.getrevs()` has some)?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7384/new/

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

To: durin42, #hg-reviewers, dlax
Cc: dlax, mercurial-devel


More information about the Mercurial-devel mailing list