You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 18, 2026. It is now read-only.
Let's document all coroutines with @commands.command() with a numpy doc style doc string. We'll later process the doc strings and build a pretty help command for the user. This will allow source to be neater as well. I found this while looking through this source
Take a look at how this could be done:
fromnumpydoc.docscrapeimportNumpyDocStringclassPhoto():
""" Array with associated photographic information. Parameters ---------- x : type Description of parameter `x`. y Description of parameter `y` (with type not specified) Attributes ---------- exposure : float Exposure in seconds. Methods ------- colorspace(c='rgb') Represent the photo in the given colorspace. gamma(n=1.0) Change the photo's gamma exposure. """def__init__(x, y):
print("Snap!")
doc=NumpyDocString(Photo.__doc__)
print(doc["Summary"])
print(doc["Parameters"])
print(doc["Attributes"])
print(doc["Methods"])
Note: for branch
rewriteLet's document all coroutines with
@commands.command()with a numpy doc style doc string. We'll later process the doc strings and build a pretty help command for the user. This will allow source to be neater as well. I found this while looking through this sourceTake a look at how this could be done: