diff --git a/anyplotlib/keys.py b/anyplotlib/keys.py index 4de24ba8..6c7e16c6 100644 --- a/anyplotlib/keys.py +++ b/anyplotlib/keys.py @@ -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 @@ -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 ────────────────────────────────────────────── diff --git a/upcoming_changes/53.doc.rst b/upcoming_changes/53.doc.rst new file mode 100644 index 00000000..31f0e3e2 --- /dev/null +++ b/upcoming_changes/53.doc.rst @@ -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.