diff --git a/great_tables/_body.py b/great_tables/_body.py index 0e6d158be..594d1e369 100644 --- a/great_tables/_body.py +++ b/great_tables/_body.py @@ -10,11 +10,6 @@ def body_reassemble(body: Body, row_groups: RowGroups, stub_df: Stub, boxhead: Boxhead) -> Body: - cols = [col_info.var for col_info in boxhead] - - start_final = get_row_reorder_df(row_groups, stub_df) - rows = [final for _, final in start_final] - - # TODO: once body is just a DataFrame, we can call reorder directly on it - # return body.__class__(reorder(body.body, rows, cols)) + # Note that this used to order the body based on groupings, but now that occurs in the + # renderer itself. return body.__class__(copy_data(body.body)) diff --git a/great_tables/_boxhead.py b/great_tables/_boxhead.py index f1963b7ed..41ea5f634 100644 --- a/great_tables/_boxhead.py +++ b/great_tables/_boxhead.py @@ -90,7 +90,6 @@ def cols_label(self: GTSelf, **kwargs: Any) -> GTSelf: return self mod_columns = list(kwargs.keys()) - new_labels = list(kwargs.values()) # Get the full list of column names for the data column_names = self._boxhead._get_columns() diff --git a/great_tables/_utils.py b/great_tables/_utils.py index d7ccbb0fc..c98d999df 100644 --- a/great_tables/_utils.py +++ b/great_tables/_utils.py @@ -64,7 +64,7 @@ def _assert_str_list(x: Any) -> None: def _assert_str_in_set(x: str, set: List[str]): - while x not in set: + if x not in set: raise AssertionError(f"The string `{x}` is not part of the defined `set`.") @@ -72,8 +72,6 @@ def _assert_list_is_subset(x: List[Any], set_list: List[Any]) -> None: if not set(x).issubset(set(set_list)): raise AssertionError("The columns provided are not present in the table.") - return - def _str_scalar_to_list(x: str): _assert_str_scalar(x)