Patchwork D7273: compression: tell pytype to not sweat a missing `zstd` module

login
register
mail settings
Submitter phabricator
Date Nov. 7, 2019, 8:33 a.m.
Message ID <5fcb7952553d43ba76f4b165d5548ada@localhost.localdomain>
Download mbox | patch
Permalink /patch/42871/
State Not Applicable
Headers show

Comments

phabricator - Nov. 7, 2019, 8:33 a.m.
Closed by commit rHG9ce76155e0da: compression: tell pytype to not sweat a missing `zstd` module (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7273?vs=17643&id=17690

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7273/new/

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

AFFECTED FILES
  mercurial/utils/compression.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/utils/compression.py b/mercurial/utils/compression.py
--- a/mercurial/utils/compression.py
+++ b/mercurial/utils/compression.py
@@ -646,7 +646,7 @@ 
         # Not all installs have the zstd module available. So defer importing
         # until first access.
         try:
-            from .. import zstd
+            from .. import zstd  # pytype: disable=import-error
 
             # Force delayed import.
             zstd.__version__