# HG changeset patch # User Anton Shestakov # Date 1704060981 10800 # Node ID 5d6d1ce4905b9eb523dc68436b95d98ce769adcc # Parent 7580aa2ac660d6cb212d4521f9223fcedfcba92d evolve: make pytype ignore some old attributes present in Mercurial 5.0 diff -r 7580aa2ac660 -r 5d6d1ce4905b hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Sun Dec 31 17:51:27 2023 -0300 +++ b/hgext3rd/evolve/__init__.py Sun Dec 31 19:16:21 2023 -0300 @@ -1181,6 +1181,7 @@ continuefunc=cmdrewrite.hgcontinuefixup) else: # hg <= 5.0 (5f2f6912c9e6) + # pytype: disable=module-attr estate = (b'evolvestate', False, False, _(b'evolve in progress'), _(b"use 'hg evolve --continue' or 'hg evolve --abort' to abort")) cmdutil.unfinishedstates.append(estate) @@ -1197,13 +1198,16 @@ cmdutil.afterresolvedstates.append(afterresolved) cmdutil.afterresolvedstates.append(pickresolved) cmdutil.afterresolvedstates.append(fixupresolved) + # pytype: enable=module-attr # hg <= 5.0 (12243f15d53e) if util.safehasattr(cmdutil, 'STATES'): + # pytype: disable=module-attr cmdutil.STATES = ( (b'evolve', cmdutil.fileexistspredicate(b'evolvestate'), _evolvemessage), (b'fixup', cmdutil.fileexistspredicate(b'fixup-state'), _fixupmessage), ) + cmdutil.STATES + # pytype: enable=module-attr @eh.wrapfunction(hg, 'clean') def clean(orig, repo, *args, **kwargs):