Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/lsst/utils/iteration.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
__all__ = ["chunk_iterable", "ensure_iterable", "isplit", "sequence_to_string"]

import itertools
from collections.abc import Iterable, Iterator, Mapping
from collections.abc import Iterable, Iterator, Mapping, Sequence
from typing import Any, TypeGuard, TypeVar


Expand Down Expand Up @@ -207,7 +207,7 @@ def _is_list_of_ints(values: list[int | str]) -> TypeGuard[list[int]]:
return all(isinstance(v, int) for v in values)


def sequence_to_string(values: list[int | str]) -> str:
def sequence_to_string(values: Sequence[int | str]) -> str:
"""Convert a list of integers or strings into a compact string
representation by merging consecutive values or sequences.

Expand Down
Loading