# HG changeset patch # User Matt Harbison # Date 1721859420 14400 # Node ID 92845af308b4539e1ce02feea522fa08f505259d # Parent 278af66e6595ff3baff92416839f7dbc427e24fd typing: narrow the scope of some recent disabled import warnings These comments were added in 39e2b2d062c1, but had the effect of changing the known type to `Any`, which cascaded through a few function signatures. Just ignore the import error instead. diff -r 278af66e6595 -r 92845af308b4 mercurial/chgserver.py --- a/mercurial/chgserver.py Tue Jul 23 19:20:22 2024 -0400 +++ b/mercurial/chgserver.py Wed Jul 24 18:17:00 2024 -0400 @@ -151,7 +151,7 @@ """ 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 -r 278af66e6595 -r 92845af308b4 mercurial/policy.py --- a/mercurial/policy.py Tue Jul 23 19:20:22 2024 -0400 +++ b/mercurial/policy.py Wed Jul 24 18:17:00 2024 -0400 @@ -45,7 +45,7 @@ } try: - from . import __modulepolicy__ # type: ignore + from . import __modulepolicy__ # pytype: disable=import-error policy: bytes = __modulepolicy__.modulepolicy except ImportError: diff -r 278af66e6595 -r 92845af308b4 mercurial/util.py --- a/mercurial/util.py Tue Jul 23 19:20:22 2024 -0400 +++ b/mercurial/util.py Wed Jul 24 18:17:00 2024 -0400 @@ -1162,7 +1162,7 @@ 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: