diff --git a/data_structures/hashing/hash_map.py b/data_structures/hashing/hash_map.py index 0d99e578b73e..28aac296288f 100644 --- a/data_structures/hashing/hash_map.py +++ b/data_structures/hashing/hash_map.py @@ -10,10 +10,6 @@ from collections.abc import Iterator, MutableMapping from dataclasses import dataclass -from typing import TypeVar - -KEY = TypeVar("KEY") -VAL = TypeVar("VAL") @dataclass(slots=True) @@ -33,7 +29,7 @@ def __bool__(self) -> bool: _deleted = _DeletedItem() -class HashMap(MutableMapping[KEY, VAL]): +class HashMap[KEY, VAL](MutableMapping[KEY, VAL]): """ Hash map with open addressing. """