mercurial/utils/hashutil.py
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 13 Mar 2021 00:38:59 -0500
branchstable
changeset 46785 521ac0d7047f
parent 44059 7126d8b8e0e6
child 48875 6000f5b25c9b
permissions -rw-r--r--
typing: disable import error warnings that are already handled I'm assuming that the cffi ones are handled somewhere, but the others definitely are. Differential Revision: https://phab.mercurial-scm.org/D10207

from __future__ import absolute_import

import hashlib

try:
    from ..thirdparty import sha1dc  # pytype: disable=import-error

    sha1 = sha1dc.sha1
except (ImportError, AttributeError):
    sha1 = hashlib.sha1