comparison mercurial/extensions.py @ 43707:da5ccc591cff

extensions: suppress a pytype failure due to a typeshed bug Bug filed upstream, suppress the failure here so we can move on. Differential Revision: https://phab.mercurial-scm.org/D7410
author Augie Fackler <augie@google.com>
date Fri, 15 Nov 2019 11:30:33 -0500
parents 1ea33dff7841
children 9d2b2df2c2ba
comparison
equal deleted inserted replaced
43706:ac8fd215a776 43707:da5ccc591cff
90 path = pycompat.fsdecode(path) 90 path = pycompat.fsdecode(path)
91 if os.path.isdir(path): 91 if os.path.isdir(path):
92 # module/__init__.py style 92 # module/__init__.py style
93 d, f = os.path.split(path) 93 d, f = os.path.split(path)
94 fd, fpath, desc = imp.find_module(f, [d]) 94 fd, fpath, desc = imp.find_module(f, [d])
95 return imp.load_module(module_name, fd, fpath, desc) 95 # When https://github.com/python/typeshed/issues/3466 is fixed
96 # and in a pytype release we can drop this disable.
97 return imp.load_module(
98 module_name, fd, fpath, desc # pytype: disable=wrong-arg-types
99 )
96 else: 100 else:
97 try: 101 try:
98 return imp.load_source(module_name, path) 102 return imp.load_source(module_name, path)
99 except IOError as exc: 103 except IOError as exc:
100 if not exc.filename: 104 if not exc.filename: