From e418349ef93499f9dc4d8a423c5ca706b6d49eac 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:32:23 +0300 Subject: [PATCH] refactor(data_structures): remove redundant TypeVar from segment tree and skip list --- data_structures/binary_tree/non_recursive_segment_tree.py | 4 +--- data_structures/linked_list/skip_list.py | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/data_structures/binary_tree/non_recursive_segment_tree.py b/data_structures/binary_tree/non_recursive_segment_tree.py index d2f36547ca69..f5a6e9ab1849 100644 --- a/data_structures/binary_tree/non_recursive_segment_tree.py +++ b/data_structures/binary_tree/non_recursive_segment_tree.py @@ -39,9 +39,7 @@ from __future__ import annotations from collections.abc import Callable -from typing import TypeVar, cast - -T = TypeVar("T") +from typing import cast class SegmentTree[T]: diff --git a/data_structures/linked_list/skip_list.py b/data_structures/linked_list/skip_list.py index 214f32b55eda..3c2cb366f921 100644 --- a/data_structures/linked_list/skip_list.py +++ b/data_structures/linked_list/skip_list.py @@ -7,10 +7,6 @@ from itertools import pairwise from random import random -from typing import TypeVar - -KT = TypeVar("KT") -VT = TypeVar("VT") class Node[KT, VT]: