Skip to content

Commit

Permalink
Add a demo with Python types (regression test for #1196), rebuild the…
Browse files Browse the repository at this point in the history
…me.js
  • Loading branch information
benjaoming committed Aug 19, 2022
1 parent f65b6bf commit 85123c4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
21 changes: 21 additions & 0 deletions docs/demo/test_py_module/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def add(self, val1, val2):
:type val2: int
:rtype: int
The parameters of this method are described in the parameter list.
"""

return val1 + val2
Expand Down Expand Up @@ -111,3 +112,23 @@ def another_function(self, a, b, **kwargs):
This is deprecated since 3.0
"""
return sum(kwargs.values()) / len(kwargs), a + b


def add_numbers(a: int, b: int = 0) -> int:
"""Add two numbers together
:param a: The first number
:param b: The second number
Here is some more text.
"""
return a + b


def subtract_numbers(a: int, b: int = 0) -> int:
"""Subtract two numbers
:param a: The first number
:param b: The second number
"""
return a - b
4 changes: 2 additions & 2 deletions sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

0 comments on commit 85123c4

Please sign in to comment.