From 731609cf37bd41f6fb116e9f4ff18a05b0395323 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: Mon, 5 Oct 2026 18:38:46 +0300 Subject: [PATCH] refactor(sorts): remove redundant TypeVar in strand_sort --- sorts/strand_sort.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sorts/strand_sort.py b/sorts/strand_sort.py index ee41aa5df51d..e203dd267079 100644 --- a/sorts/strand_sort.py +++ b/sorts/strand_sort.py @@ -1,5 +1,5 @@ import operator -from typing import Protocol, TypeVar +from typing import Protocol class Comparable(Protocol): @@ -8,10 +8,7 @@ def __lt__(self, other: object, /) -> bool: ... def __gt__(self, other: object, /) -> bool: ... -T = TypeVar("T", bound=Comparable) - - -def strand_sort[T]( +def strand_sort[T: Comparable]( arr: list[T], reverse: bool = False, solution: list[T] | None = None ) -> list[T]: """