# HG changeset patch # User Matt Harbison # Date 1615613939 18000 # Node ID 521ac0d7047f1b9c9a1ac4e4a681802d802ebeb1 # Parent 65f437c240f201a9675fe3a9d32ba1c7ed775558 typing: disable import error warnings that are already handled I'm assuming that the cffi ones are handled somewhere, but the others definitely are. Differential Revision: https://phab.mercurial-scm.org/D10207 diff -r 65f437c240f2 -r 521ac0d7047f mercurial/cffi/bdiff.py --- a/mercurial/cffi/bdiff.py Fri Mar 12 17:22:35 2021 -0500 +++ b/mercurial/cffi/bdiff.py Sat Mar 13 00:38:59 2021 -0500 @@ -10,7 +10,7 @@ import struct from ..pure.bdiff import * -from . import _bdiff +from . import _bdiff # pytype: disable=import-error ffi = _bdiff.ffi lib = _bdiff.lib diff -r 65f437c240f2 -r 521ac0d7047f mercurial/cffi/mpatch.py --- a/mercurial/cffi/mpatch.py Fri Mar 12 17:22:35 2021 -0500 +++ b/mercurial/cffi/mpatch.py Sat Mar 13 00:38:59 2021 -0500 @@ -9,7 +9,7 @@ from ..pure.mpatch import * from ..pure.mpatch import mpatchError # silence pyflakes -from . import _mpatch +from . import _mpatch # pytype: disable=import-error ffi = _mpatch.ffi lib = _mpatch.lib diff -r 65f437c240f2 -r 521ac0d7047f mercurial/cffi/osutil.py --- a/mercurial/cffi/osutil.py Fri Mar 12 17:22:35 2021 -0500 +++ b/mercurial/cffi/osutil.py Sat Mar 13 00:38:59 2021 -0500 @@ -15,7 +15,7 @@ from .. import pycompat if pycompat.isdarwin: - from . import _osutil + from . import _osutil # pytype: disable=import-error ffi = _osutil.ffi lib = _osutil.lib diff -r 65f437c240f2 -r 521ac0d7047f mercurial/debugcommands.py --- a/mercurial/debugcommands.py Fri Mar 12 17:22:35 2021 -0500 +++ b/mercurial/debugcommands.py Sat Mar 13 00:38:59 2021 -0500 @@ -1622,7 +1622,7 @@ ) try: - from . import rustext + from . import rustext # pytype: disable=import-error rustext.__doc__ # trigger lazy import except ImportError: diff -r 65f437c240f2 -r 521ac0d7047f mercurial/sslutil.py --- a/mercurial/sslutil.py Fri Mar 12 17:22:35 2021 -0500 +++ b/mercurial/sslutil.py Sat Mar 13 00:38:59 2021 -0500 @@ -269,7 +269,7 @@ if b'SSLKEYLOGFILE' in encoding.environ: try: - import sslkeylog + import sslkeylog # pytype: disable=import-error sslkeylog.set_keylog( pycompat.fsdecode(encoding.environ[b'SSLKEYLOGFILE']) diff -r 65f437c240f2 -r 521ac0d7047f mercurial/testing/revlog.py --- a/mercurial/testing/revlog.py Fri Mar 12 17:22:35 2021 -0500 +++ b/mercurial/testing/revlog.py Sat Mar 13 00:38:59 2021 -0500 @@ -24,7 +24,7 @@ try: - from ..cext import parsers as cparsers + from ..cext import parsers as cparsers # pytype: disable=import-error except ImportError: cparsers = None diff -r 65f437c240f2 -r 521ac0d7047f mercurial/urllibcompat.py --- a/mercurial/urllibcompat.py Fri Mar 12 17:22:35 2021 -0500 +++ b/mercurial/urllibcompat.py Sat Mar 13 00:38:59 2021 -0500 @@ -148,6 +148,7 @@ else: + # pytype: disable=import-error import BaseHTTPServer import CGIHTTPServer import SimpleHTTPServer @@ -155,6 +156,8 @@ import urllib import urlparse + # pytype: enable=import-error + urlreq._registeraliases( urllib, ( diff -r 65f437c240f2 -r 521ac0d7047f mercurial/utils/hashutil.py --- a/mercurial/utils/hashutil.py Fri Mar 12 17:22:35 2021 -0500 +++ b/mercurial/utils/hashutil.py Sat Mar 13 00:38:59 2021 -0500 @@ -3,7 +3,7 @@ import hashlib try: - from ..thirdparty import sha1dc + from ..thirdparty import sha1dc # pytype: disable=import-error sha1 = sha1dc.sha1 except (ImportError, AttributeError):