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

login
register
mail settings
Submitter phabricator
Date Nov. 19, 2019, 3:51 a.m.
Message ID <a129f77d4ae358c4ab403f64429a5f94@localhost.localdomain>
Download mbox | patch
Permalink /patch/43348/
State Not Applicable
Headers show

Comments

phabricator - Nov. 19, 2019, 3:51 a.m.
Closed by commit rHGda5ccc591cff: extensions: suppress a pytype failure due to a typeshed bug (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

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

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, indygreg
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)