extensions: suppress a pytype failure due to a typeshed bug
authorAugie Fackler <augie@google.com>
Fri, 15 Nov 2019 11:30:33 -0500
changeset 43707 da5ccc591cff
parent 43706 ac8fd215a776
child 43708 cd822413b9aa
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
mercurial/extensions.py
--- a/mercurial/extensions.py	Thu Nov 14 15:49:21 2019 -0500
+++ b/mercurial/extensions.py	Fri Nov 15 11:30:33 2019 -0500
@@ -92,7 +92,11 @@
         # module/__init__.py style
         d, f = os.path.split(path)
         fd, fpath, desc = imp.find_module(f, [d])
-        return imp.load_module(module_name, fd, fpath, desc)
+        # When https://github.com/python/typeshed/issues/3466 is fixed
+        # and in a pytype release we can drop this disable.
+        return imp.load_module(
+            module_name, fd, fpath, desc  # pytype: disable=wrong-arg-types
+        )
     else:
         try:
             return imp.load_source(module_name, path)