Patchwork D7410: extensions: suppress a pytype failure due to a typeshed bug

login
register
mail settings
Submitter phabricator
Date Nov. 15, 2019, 4:32 p.m.
Message ID <02aab344847bfdc46f69dc8f2260b117@localhost.localdomain>
Download mbox | patch
Permalink /patch/43271/
State Not Applicable
Headers show

Comments

phabricator - Nov. 15, 2019, 4:32 p.m.
durin42 edited the summary of this revision.
durin42 retitled this revision from "extensions: suppress a strange pytype failure" to "extensions: suppress a pytype failure due to a typeshed bug".
durin42 updated this revision to Diff 18159.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7410?vs=18103&id=18159

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7410/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7410

AFFECTED FILES
  mercurial/extensions.py

CHANGE DETAILS




To: durin42, #hg-reviewers, dlax
Cc: dlax, mercurial-devel

Patch

diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -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)