Skip to content

Commit 9ad5d9f

Browse files
committed
import instead of make variables
1 parent 7b0d290 commit 9ad5d9f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

adafruit_hashlib/__init__.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,8 @@
2323
https://github.com/adafruit/circuitpython/releases
2424
"""
2525
try:
26-
import hashlib
27-
# pylint: disable=invalid-name
28-
md5 = hashlib.md5
29-
sha1 = hashlib.sha1
30-
sha224 = hashlib.sha224
31-
sha256 = hashlib.sha256
32-
sha384 = hashlib.sha384
33-
sha512 = hashlib.sha512
26+
from hashlib import md5, sha1, sha224, sha256, sha512
27+
from hashlib import sha3_384 as sha384
3428
except ImportError:
3529
from adafruit_hashlib._sha256 import sha224, sha256
3630
from adafruit_hashlib._sha512 import sha384, sha512

0 commit comments

Comments
 (0)