Patchwork D7469: profiling: disable the import-error warning for the flamegraph module

login
register
mail settings
Submitter phabricator
Date Nov. 21, 2019, 11:23 p.m.
Message ID <differential-rev-PHID-DREV-4fzh2fimlzfevatjcghj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43393/
State Superseded
Headers show

Comments

phabricator - Nov. 21, 2019, 11:23 p.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The module being missing is properly handled, but pytype was complaining.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/profiling.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/profiling.py b/mercurial/profiling.py
--- a/mercurial/profiling.py
+++ b/mercurial/profiling.py
@@ -77,7 +77,7 @@ 
 @contextlib.contextmanager
 def flameprofile(ui, fp):
     try:
-        from flamegraph import flamegraph
+        from flamegraph import flamegraph  # pytype: disable=import-error
     except ImportError:
         raise error.Abort(
             _(