Skip to content

Commit d09ac36

Browse files
committed
reduce imports
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent c4f7281 commit d09ac36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cyclonedx/model/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
# SPDX-License-Identifier: Apache-2.0
1414
# Copyright (c) OWASP Foundation. All Rights Reserved.
1515

16-
import hashlib
1716
import re
1817
from datetime import datetime, timezone
1918
from enum import Enum
19+
from hashlib import sha1
2020
from itertools import zip_longest
2121
from typing import Any, Iterable, Optional, Tuple, TypeVar
2222

@@ -55,7 +55,7 @@ def sha1sum(filename: str) -> str:
5555
Returns:
5656
SHA-1 hash
5757
"""
58-
h = hashlib.sha1()
58+
h = sha1()
5959
with open(filename, 'rb') as f:
6060
for byte_block in iter(lambda: f.read(4096), b""):
6161
h.update(byte_block)

0 commit comments

Comments
 (0)