-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from sirosen/fix-source-link-alignment
- Loading branch information
Showing
5 changed files
with
49 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
******* | ||
Autodoc | ||
******* | ||
|
||
This is a run of automodule to grab classes, functions, and members from the | ||
demo module. | ||
|
||
.. automodule:: furo_demo_module | ||
:members: |
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,28 @@ | ||
""" | ||
This is a demo module included in the docs in order to exercise viewcode, | ||
autodoc, and other related functionality. | ||
""" | ||
|
||
|
||
class Foo: | ||
""" | ||
A demo class of type Foo. | ||
Has a method baz() returning ints. | ||
""" | ||
|
||
def baz(self) -> int: | ||
""" | ||
Return a random integer. | ||
See also: https://xkcd.com/221/ | ||
""" | ||
return 3 | ||
|
||
|
||
def bar(f: Foo) -> Foo: | ||
""" | ||
the identity function, but only for Foos | ||
""" | ||
if isinstance(f, Foo): | ||
return f | ||
raise TypeError("Expected a Foo!") |
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 |
---|---|---|
|
@@ -12,4 +12,5 @@ demo | |
lists_tables | ||
really-long | ||
structure | ||
autodoc | ||
``` |
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