Skip to content

Commit ee46d8c

Browse files
committed
Use type parameter in is_ordered_subset
1 parent d0e68e3 commit ee46d8c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

toponetx/utils/iterable.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
"""Module with iterable-related utility functions."""
22

33
from collections.abc import Sequence
4-
from typing import TypeVar
54

65
__all__ = ["is_ordered_subset"]
76

8-
T = TypeVar("T")
97

10-
11-
def is_ordered_subset(one: Sequence[T], other: Sequence[T]) -> bool:
8+
def is_ordered_subset[T](one: Sequence[T], other: Sequence[T]) -> bool:
129
"""Return True if the first iterable is a subset of the second iterable.
1310
1411
This method is specifically optimized for ordered iterables to use return as early as possible for non-subsets.

0 commit comments

Comments
 (0)