We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f357ad commit abfdc87Copy full SHA for abfdc87
src/textual/_unique.py
@@ -8,8 +8,16 @@
8
T = TypeVar("T")
9
10
11
-def unique_ordered(*widgets: Iterable[T]) -> list[T]:
+def unique_ordered(*values: Iterable[T]) -> list[T]:
12
"""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)))
+ where each value appears only once, while preserving order.
+
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)))
23
return unique_objects
0 commit comments