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

login
register
mail settings
Submitter phabricator
Date Dec. 17, 2019, 8:51 a.m.
Message ID <a00d344457cf5d732540af8c70014de9@localhost.localdomain>
Download mbox | patch
Permalink /patch/43911/
State Not Applicable
Headers show

Comments

phabricator - Dec. 17, 2019, 8:51 a.m.
Closed by commit rHG4d59cc8bda65: pytype: suppress warnings about no &#039;open_binary&#039; 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




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

Patch

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