Debian Codegraph @

docs/source/sphinx/sphinx_demo.py

raw symbols SCIP
1 # coding: utf-8
2 from deprecated.sphinx import deprecated
3 from deprecated.sphinx import versionadded
4 from deprecated.sphinx import versionchanged
5
6
7 @deprecated(
8 reason="""
9 This is deprecated, really. So you need to use another function.
10 But I don\'t know which one.
11
12 - The first,
13 - The second.
14
15 Just guess!
16 """,
17 version='0.3.0',
18 )
19 @versionchanged(
20 reason='Well, I add a new feature in this function. '
21 'It is very useful as you can see in the example below, so try it. '
22 'This is a very very very very very long sentence.',
23 version='0.2.0',
24 )
25 @versionadded(reason='Here is my new function.', version='0.1.0')
26 def successor(n):
27 """
28 Calculate the successor of a number.
29
30 :param n: a number
31 :return: number + 1
32 """
33 return n + 1