-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
166 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,3 +76,9 @@ Explore | |
:titlesonly: | ||
|
||
demo/* | ||
|
||
.. toctree:: | ||
:hidden: | ||
:caption: API demo | ||
|
||
autoapi/api/index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""A module for demonstrating how styles for docs produced by sphinx-autoapi look like.""" | ||
|
||
from __future__ import annotations | ||
|
||
|
||
def prompt(message: str, default: str | None = None) -> str | None: | ||
"""Prompt the user for a value. | ||
Parameters | ||
---------- | ||
message: str | ||
The message to prompt the user with. | ||
default: str | None | ||
The default value, by default None. | ||
Returns: | ||
-------- | ||
str | None | ||
The value entered by the user or the default value, | ||
if the user didn't enter anything. | ||
""" | ||
text = f"{message} [{default}]" if default else message | ||
return input(text).strip() or default | ||
|
||
|
||
def add(a: int, b: int) -> int: | ||
"""Returns the sum of two numbers. | ||
Parameters | ||
---------- | ||
a: int | ||
The first number. | ||
b: int | ||
The second number. | ||
Returns: | ||
-------- | ||
int | ||
The sum of a and b. | ||
""" | ||
return a + b |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.