durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I suspect a bug in pytype here, but I'll follow up with that later. We
  have good enough coverage on this that I'm happy to move on for now.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/extensions.py

CHANGE DETAILS

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)
+        # pytype seems to think `fd` is a str, but I'm pretty sure
+        # it's wrong. This may be a bug we need to report upstream.
+        return imp.load_module(
+            module_name, fd, fpath, desc  # pytype: disable=wrong-arg-types
+        )
     else:
         try:
             return imp.load_source(module_name, path)



To: durin42, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to