Skip to content

Commit 85eac5b

Browse files
committed
Add a Google-style docstring for the classes
1 parent 5846bf6 commit 85eac5b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,14 @@ menu = Menu(
251251
**Also good**
252252
```python
253253
class MenuConfig:
254+
"""A configuration for the Menu.
255+
256+
Attributes:
257+
title: The title of the Menu.
258+
body: The body of the Menu.
259+
button_text: The text for the button label.
260+
cancellable: Can it be cancelled?
261+
"""
254262
title: str
255263
body: str
256264
button_text: str
@@ -279,6 +287,14 @@ from typing import NamedTuple
279287

280288

281289
class MenuConfig(NamedTuple):
290+
"""A configuration for the Menu.
291+
292+
Attributes:
293+
title: The title of the Menu.
294+
body: The body of the Menu.
295+
button_text: The text for the button label.
296+
cancellable: Can it be cancelled?
297+
"""
282298
title: str
283299
body: str
284300
button_text: str

0 commit comments

Comments
 (0)