Skip to content

Commit dfd84b9

Browse files
committed
7.6.0 copy empty string when copying cells that are None to clipboard
Copying cells to clipboard which are `None` now copies an empty string `""`, previously copied `"None"` to clipboard.
1 parent fa97f07 commit dfd84b9

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### Version 7.6.0
2+
#### Changed:
3+
- Copying cells to clipboard which are `None` now copies an empty string `""`, previously copied `"None"` to clipboard.
4+
15
### Version 7.5.19
26
#### Addressed:
37
- Issue where non-hashable values are used with data formatting and `nullable=True`. [#314](https://github.com/ragardner/tksheet/issues/314).

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "tksheet"
77
description = "Tkinter table / sheet and treeview widget"
88
readme = "README.md"
9-
version = "7.5.19"
9+
version = "7.6.0"
1010
authors = [{ name = "ragardner", email = "github@ragardner.simplelogin.com" }]
1111
requires-python = ">=3.8"
1212
license = "MIT"

tksheet/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
tksheet - A Python tkinter table widget
55
"""
66

7-
__version__ = "7.5.19"
7+
__version__ = "7.6.0"
88

99
from .colors import (
1010
color_map,

tksheet/main_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8323,7 +8323,7 @@ def get_cell_clipboard(self, datarn: int, datacn: int) -> str | int | float | bo
83238323
# assumed given formatter class has get_clipboard_data() function
83248324
# and it returns one of above type hints
83258325
return value.get_clipboard_data()
8326-
return f"{value}"
8326+
return "" if value is None else value if isinstance(value, str) else f"{value}"
83278327

83288328
def get_cell_kwargs(
83298329
self,

0 commit comments

Comments
 (0)