Skip to content

Commit 22fa56f

Browse files
committed
Improve example in of name classVar in its docstring
1 parent eb559e1 commit 22fa56f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/icalendar/cal/component.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,17 @@ class Component(CaselessDict):
5555
name: ClassVar[str | None] = None
5656
"""The name of the component.
5757
58-
This should be defined in each component class.
58+
This is defined in each component class.
59+
60+
Example:
61+
62+
.. code-block:: pycon
63+
64+
>>> from icalendar import Calendar
65+
>>> cal = Calendar.new()
66+
>>> cal.name
67+
'VCALENDAR'
5968
60-
Example: ``VCALENDAR``.
6169
"""
6270

6371
required: ClassVar[tuple[()]] = ()

0 commit comments

Comments
 (0)