diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py --- a/mercurial/chgserver.py +++ b/mercurial/chgserver.py @@ -151,7 +151,7 @@ def _getmtimepaths(ui): """ modules = [m for n, m in extensions.extensions(ui)] try: - from . import __version__ # type: ignore + from . import __version__ # pytype: disable=import-error modules.append(__version__) except ImportError: diff --git a/mercurial/policy.py b/mercurial/policy.py --- a/mercurial/policy.py +++ b/mercurial/policy.py @@ -45,7 +45,7 @@ policy: bytes = b'allow' } try: - from . import __modulepolicy__ # type: ignore + from . import __modulepolicy__ # pytype: disable=import-error policy: bytes = __modulepolicy__.modulepolicy except ImportError: diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1162,7 +1162,7 @@ def makeloggingsocket( def version(): """Return version information if available.""" try: - from . import __version__ # type: ignore + from . import __version__ # pytype: disable=import-error return __version__.version except ImportError: