From 2cb28d0964530b565c250614cc58b3b2d4083a6c Mon Sep 17 00:00:00 2001 From: barrust Date: Fri, 27 Dec 2024 00:30:39 -0500 Subject: [PATCH] attempt to use typealias --- probables/hashes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/probables/hashes.py b/probables/hashes.py index f2080b8..2026bb9 100644 --- a/probables/hashes.py +++ b/probables/hashes.py @@ -5,11 +5,11 @@ from functools import wraps from hashlib import md5, sha256 from struct import unpack -from typing import Callable, Union +from typing import Callable, TypeAlias from probables.constants import UINT32_T_MAX, UINT64_T_MAX -KeyT = Union[str, bytes] +KeyT: TypeAlias = str | bytes SimpleHashT = Callable[[KeyT, int], int] HashResultsT = list[int] HashFuncT = Callable[[KeyT, int], HashResultsT]