Skip to content

Commit 4872b1c

Browse files
committed
fix(lst): use generic type for occurrences parameter
1 parent 2b9af3c commit 4872b1c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

stdl/lst.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ def every_nth(items: list[T], n: int) -> list[T]:
9191
return items[n - 1 :: n]
9292

9393

94-
def occurrences(items: Sequence[T], val: object) -> int:
94+
def occurrences(items: Sequence[T], val: T) -> int:
9595
"""
9696
Count the number of occurrences of a value in a list.
9797
9898
Args:
9999
items (Sequence[T]): The list to count values in.
100-
val (object): The value to count.
100+
val: The value to count.
101101
102102
Returns:
103103
int: Number of occurrences.

0 commit comments

Comments
 (0)