Patchwork D11468: typing: suppress an import-error warning in `mercurial/utils/resourceutil.py`

login
register
mail settings
Submitter phabricator
Date Sept. 21, 2021, 3:38 p.m.
Message ID <differential-rev-PHID-DREV-uc4mprmmmggfbennup6b-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49784/
State Superseded
Headers show

Comments

phabricator - Sept. 21, 2021, 3:38 p.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Newly caught by pytype 2021-09-09.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/utils/resourceutil.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, 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
@@ -57,7 +57,7 @@ 
 try:
     # importlib.resources exists from Python 3.7; see fallback in except clause
     # further down
-    from importlib import resources
+    from importlib import resources  # pytype: disable=import-error
 
     # Force loading of the resources module
     resources.open_binary  # pytype: disable=module-attr