From patchwork Tue Dec 17 08:51:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7681: pytype: suppress warnings about no 'open_binary' on importlib.resources From: phabricator X-Patchwork-Id: 43911 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 17 Dec 2019 08:51:43 +0000 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 To: mharbison72, #hg-reviewers, pulkit Cc: mercurial-devel 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) )