changeset 43911:4d59cc8bda65

pytype: suppress warnings about no 'open_binary' on importlib.resources Fixes these pytype warnings: line 43, in <module>: No attribute 'open_binary' on module 'importlib.resources' [module-attr] line 47, in open_resource: No attribute 'open_binary' on module 'importlib.resources' [module-attr] For some reason, I can't upgrade from 3.6.8 in my WSL environment. Differential Revision: https://phab.mercurial-scm.org/D7681
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 15 Dec 2019 23:46:10 -0500
parents 1b26cb044097
children 727cf6acadfe
files mercurial/utils/resourceutil.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/utils/resourceutil.py	Mon Dec 16 17:10:51 2019 -0500
+++ b/mercurial/utils/resourceutil.py	Sun Dec 15 23:46:10 2019 -0500
@@ -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)
         )