Skip to content

Commit 2e39470

Browse files
authored
Better column definitions. (#31)
* Better column definitions. * Address review comments. * Simplifies the code of `_build_column`. * parametrized tests.
1 parent e8075e9 commit 2e39470

File tree

3 files changed

+932
-272
lines changed

3 files changed

+932
-272
lines changed

src/appui/enhanced_data_table.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import sys
1515
from dataclasses import KW_ONLY, dataclass
1616
from functools import total_ordering
17-
from typing import TYPE_CHECKING, Generic, TypeVar
17+
from typing import TYPE_CHECKING, ClassVar, Generic, TypeVar
1818

1919
from rich.text import Text
2020
from textual.binding import BindingsMap
@@ -47,6 +47,8 @@
4747
class EnhancedTableCell: # pragma: no cover
4848
"""Rich-renderable table cell with an ordering key."""
4949

50+
default_justification: ClassVar[Justify] = Justify.RIGHT
51+
5052
def __init__(
5153
self,
5254
sort_key: tuple[object, ...],

0 commit comments

Comments
 (0)