Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions anyplotlib/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ class KeyOverlay:
key = plot.add_key(ipf_triangle, corner="bottom-right")
key.set(size=0.3, bgcolor="none")
key.visible = False # plain attribute assignment also pushes

Attributes
----------
id : str
Short unique identifier.
name : str
Caller-supplied name, or the id when none was given. Use it with
:meth:`~anyplotlib.Plot2D.get_key`.
"""

#: Fields that live on the light view channel. The image itself does NOT
Expand All @@ -68,10 +60,15 @@ def __init__(self, plot, image_url: str, *, name=None, **kwargs):

@property
def id(self) -> str:
"""Short unique identifier."""
return self._id

@property
def name(self) -> str:
"""Caller-supplied name, or the id when none was given.

Use it with :meth:`~anyplotlib.Plot2D.get_key`.
"""
return self._name

# ── attribute access ──────────────────────────────────────────────
Expand Down
4 changes: 4 additions & 0 deletions upcoming_changes/53.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fixed the documentation build failing on
:class:`~anyplotlib.keys.KeyOverlay`, whose ``id`` and ``name`` were described
both in the class docstring and by the properties themselves — a duplicate
object description, which the build treats as an error.
Loading