From a627d4b3fa984da117fd05c4b6515f214e3e06a6 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Wed, 8 Feb 2023 09:12:22 +0000 Subject: [PATCH] Docstring for DataTable sort method --- src/textual/widgets/_data_table.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/textual/widgets/_data_table.py b/src/textual/widgets/_data_table.py index 413365fb6..e7a02458a 100644 --- a/src/textual/widgets/_data_table.py +++ b/src/textual/widgets/_data_table.py @@ -1432,6 +1432,13 @@ class DataTable(ScrollView, Generic[CellType], can_focus=True): *columns: ColumnKey | str, reverse: bool = False, ) -> None: + """Sort the rows in the DataTable by one or more column keys. + + Args: + columns: One or more columns to sort by the values in. + reverse: If True, the sort order will be reversed. + """ + def sort_by_column_keys( row: tuple[RowKey, dict[ColumnKey | str, CellType]] ) -> Any: