D7681: pytype: suppress warnings about no 'open_binary' on importlib.resources

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Tue Dec 17 08:51:43 UTC 2019


Closed by commit rHG4d59cc8bda65: pytype: suppress warnings about no 'open_binary' on importlib.resources (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7681?vs=18785&id=18800

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

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

AFFECTED FILES
  mercurial/utils/resourceutil.py

CHANGE DETAILS

diff --git a/mercurial/utils/resourceutil.py b/mercurial/utils/resourceutil.py
--- a/mercurial/utils/resourceutil.py
+++ b/mercurial/utils/resourceutil.py
@@ -40,11 +40,11 @@
     import importlib
 
     # Force loading of the resources module
-    importlib.resources.open_binary
+    importlib.resources.open_binary  # pytype: disable=module-attr
 
     def open_resource(package, name):
         package = b'mercurial.' + package
-        return importlib.resources.open_binary(
+        return importlib.resources.open_binary(  # pytype: disable=module-attr
             pycompat.sysstr(package), pycompat.sysstr(name)
         )
 



To: mharbison72, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list