-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: do not cast None to str in ArrowBackend * fix: add test for null rep
- Loading branch information
Showing
5 changed files
with
190 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
tests/snapshot_tests/snapshot_apps/data_table_null_mixed_cols.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from textual.app import App, ComposeResult | ||
from textual_fastdatatable import ArrowBackend, DataTable | ||
|
||
ROWS = [ | ||
("lane", "swimmer", "country", "time"), | ||
(3, "Li Zhuhao", "China", 51.26), | ||
("eight", None, "France", 51.58), | ||
("seven", "Tom Shields", "United States", None), | ||
(1, "Aleksandr Sadovnikov", "Russia", 51.84), | ||
(None, "Darren Burns", "Scotland", 51.84), | ||
] | ||
|
||
|
||
class TableApp(App): | ||
def compose(self) -> ComposeResult: | ||
backend = ArrowBackend.from_records(ROWS, has_header=True) | ||
yield DataTable(backend=backend, null_rep="[dim]∅ null[/]") | ||
|
||
|
||
app = TableApp() | ||
if __name__ == "__main__": | ||
app.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters