Skip to content

Commit abfdc87

Browse files
committed
docstring
1 parent 7f357ad commit abfdc87

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/textual/_unique.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@
88
T = TypeVar("T")
99

1010

11-
def unique_ordered(*widgets: Iterable[T]) -> list[T]:
11+
def unique_ordered(*values: Iterable[T]) -> list[T]:
1212
"""Converts a number of iterables of an object in to a list
13-
where each value appears only once, while preserving order."""
14-
unique_objects = list(dict.fromkeys(chain(*widgets)))
13+
where each value appears only once, while preserving order.
14+
15+
Args:
16+
*values: A number of iterables of values to make unique.
17+
18+
Returns:
19+
A list of values, where each value appears exactly once, in the order they were given.
20+
21+
"""
22+
unique_objects = list(dict.fromkeys(chain(*values)))
1523
return unique_objects

0 commit comments

Comments
 (0)