From ee045d39c9d3172b9af3af623ba73abd27c9a203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lker=20O=C4=9Fulcan=20Say=C4=B1n?= <47698920+iosayin@users.noreply.github.com> Date: Tue, 6 Oct 2026 21:42:41 +0300 Subject: [PATCH] refactor(hashing): modernize HashMap with PEP 695 type parameter syntax --- data_structures/hashing/hash_map.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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. """