Update gguf-py/gguf/gguf_reader.py type hint

Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com>
This commit is contained in:
Kerfuffle 2023-11-09 00:22:00 -07:00 committed by GitHub
parent 2af29ffeaa
commit 855486c912
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,7 @@ class GGUFReader:
alignment: int = GGUF_DEFAULT_ALIGNMENT alignment: int = GGUF_DEFAULT_ALIGNMENT
# Note: Internal helper, API may change. # Note: Internal helper, API may change.
gguf_scalar_to_np: Dict[GGUFValueType, npt.DTypeLike] = { gguf_scalar_to_np: dict[GGUFValueType, type[np.generic]] = {
GGUFValueType.UINT8: np.uint8, GGUFValueType.UINT8: np.uint8,
GGUFValueType.INT8: np.int8, GGUFValueType.INT8: np.int8,
GGUFValueType.UINT16: np.uint16, GGUFValueType.UINT16: np.uint16,