Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG9ce76155e0da: compression: tell pytype to not sweat a missing `zstd` module
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
indygreg |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/utils/compression.py (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
a3a4fd72fb60 | a0431d5d43d5 | Augie Fackler | Nov 6 2019, 2:20 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 |
def name(self): | def name(self): | ||||
return b'zstd' | return b'zstd' | ||||
@propertycache | @propertycache | ||||
def _module(self): | def _module(self): | ||||
# Not all installs have the zstd module available. So defer importing | # Not all installs have the zstd module available. So defer importing | ||||
# until first access. | # until first access. | ||||
try: | try: | ||||
from .. import zstd | from .. import zstd # pytype: disable=import-error | ||||
# Force delayed import. | # Force delayed import. | ||||
zstd.__version__ | zstd.__version__ | ||||
return zstd | return zstd | ||||
except ImportError: | except ImportError: | ||||
return None | return None | ||||
def available(self): | def available(self): |