Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjinliu committed Mar 10, 2024
1 parent e8b729f commit 246c74b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,5 @@ exclude_lines = [
"if TYPE_CHECKING:",
"@overload",
"@abstractmethod",
"@deprecated",
]
1 change: 1 addition & 0 deletions tests/test_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def test_texts(backend: str):
layer.with_face_multi(color=colors).with_edge_multi(width=np.arange(10) / 4)
layer.data
layer.data = np.arange(10), np.zeros(10), list("abcdefghij")
layer.data = np.arange(10) * 2, np.zeros(10), "single"
layer.set_pos(x=np.arange(10) * 2)

def test_with_text(backend: str):
Expand Down
10 changes: 1 addition & 9 deletions whitecanvas/layers/_primitive/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,7 @@ def _get_layer_data(self) -> XYTextData:

def _norm_layer_data(self, data: Any) -> XYTextData:
xpos, ypos, t = data
if xpos is None or ypos is None:
x0, y0 = self.pos
if xpos is None:
xpos = x0
if ypos is None:
ypos = y0
if t is None:
t = self._backend._plt_get_text()
elif isinstance(t, str):
if isinstance(t, str):
t = [t] * self.ndata
else:
t = [str(t0) for t0 in t]
Expand Down

0 comments on commit 246c74b

Please sign in to comment.