# HG changeset patch # User Matt Harbison # Date 2021-04-14 13:49:36 # Node ID e050efe97fbe4fec7d0d02b95c46cbbc9d05737e # Parent 27602e030a1f1b53b88d5897716b9e83aed54478 typing: enable pytype processing on mercurial/upgrade_utils/actions.py This was the suggested workaround for the pytype bug that caused this file to be processed forever. Differential Revision: https://phab.mercurial-scm.org/D10460 diff --git a/mercurial/upgrade_utils/actions.py b/mercurial/upgrade_utils/actions.py --- a/mercurial/upgrade_utils/actions.py +++ b/mercurial/upgrade_utils/actions.py @@ -5,15 +5,13 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -# See https://github.com/google/pytype/issues/860 -# pytype: skip-file - from __future__ import absolute_import from ..i18n import _ from .. import ( error, localrepo, + pycompat, requirements, revlog, util, @@ -21,6 +19,13 @@ from .. import ( from ..utils import compression +if pycompat.TYPE_CHECKING: + from typing import ( + List, + Type, + ) + + # list of requirements that request a clone of all revlog if added/removed RECLONES_REQUIREMENTS = { requirements.GENERALDELTA_REQUIREMENT, @@ -110,7 +115,7 @@ class improvement(object): return hash(self.name) -allformatvariant = [] +allformatvariant = [] # type: List[Type['formatvariant']] def registerformatvariant(cls):