comparison mercurial/utils/compression.py @ 43523:9ce76155e0da

compression: tell pytype to not sweat a missing `zstd` module Differential Revision: https://phab.mercurial-scm.org/D7273
author Augie Fackler <augie@google.com>
date Wed, 06 Nov 2019 14:20:27 -0500
parents c59eb1560c44
children 9f70512ae2cf
comparison
equal deleted inserted replaced
43522:70d42e2ad9b4 43523:9ce76155e0da
644 @propertycache 644 @propertycache
645 def _module(self): 645 def _module(self):
646 # Not all installs have the zstd module available. So defer importing 646 # Not all installs have the zstd module available. So defer importing
647 # until first access. 647 # until first access.
648 try: 648 try:
649 from .. import zstd 649 from .. import zstd # pytype: disable=import-error
650 650
651 # Force delayed import. 651 # Force delayed import.
652 zstd.__version__ 652 zstd.__version__
653 return zstd 653 return zstd
654 except ImportError: 654 except ImportError: