File: flavors_rst.py

package info (click to toggle)
python-pdoc 15.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,192 kB
  • sloc: python: 8,013; javascript: 1,156; makefile: 18; sh: 3
file content (194 lines) | stat: -rw-r--r-- 3,989 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
__docformat__ = "restructuredtext"


def links():
    """
    For type hints, read `PEP 484`_.
    See the `Python home page <http://www.python.org>`_ for info.

    .. _PEP 484:
        https://www.python.org/dev/peps/pep-0484/

    """


def refs():
    """Here we have refs to :py:obj:`links` and :func:`admonitions`."""


def admonitions():
    """

    .. note::

       This function is not suitable for sending spam e-mails.

    .. warning::
       This function is not suitable for sending spam e-mails.

    .. danger::
       This function is not suitable for sending **spam** e-mails.

    .. warning::  Be Careful!
       This warning has both a title and content.

    .. warning::  This warning has a title only.

    .. versionadded:: 2.5
       The *spam* parameter.

    .. versionchanged:: 2.5
       The *spam* parameter.

    .. code-block::
        This is a code block.

    .. deprecated:: 3.1
       Use :func:`spam` instead.

    .. deprecated:: 3.1

    This text is not part of the deprecation notice.
    """


def seealso():
    # this is not properly supported yet
    """
    .. seealso::

       Module :py:mod:`zipfile`
          Documentation of the :py:mod:`zipfile` standard module.

       `GNU tar manual, Basic Tar Format <http://link>`_
          Documentation for tar archive files, including GNU tar extensions.
    """


def seealso_short():
    # this is not properly supported yet
    """
    .. seealso:: modules :py:mod:`zipfile`, :py:mod:`tarfile`
    """


def tables():
    """
    | Header 1 | *Header* 2 |
    | -------- | -------- |
    | `Cell 1` | [Cell 2](http://example.com) link |
    | Cell 3 | **Cell 4** |
    """


def footnote1():
    """
    Cite the relevant literature, e.g. [1]_.  You may also cite these
    references in the notes section above.

    .. [1] O. McNoleg, "The integration of GIS, remote sensing,
       expert systems and adaptive co-kriging for environmental habitat
       modelling of the Highland Haggis using object-oriented, fuzzy-logic
       and neural-network techniques," Computers & Geosciences, vol. 22,
       pp. 585-588, 1996.
    """


def footnote2():
    """
    Autonumbered footnotes are
    possible, like using [#]_ and [#]_.

    .. [#] This is the first one.
    .. [#] This is the second one.

    They may be assigned 'autonumber
    labels' - for instance,
    [#fourth]_ and [#third]_.

    .. [#third] a.k.a. third_

    .. [#fourth] a.k.a. fourth_
    """


def footnote3():
    """
    Auto-symbol footnotes are also
    possible, like this: [*]_ and [*]_.

    .. [*] This is the first one.
    .. [*] This is the second one.
    """


def footnote4():
    """
    There is no footnote for this reference [#]_.
    """


def include():
    """
    Included from another file:

    .. include:: flavors_rst_include/include.rst
    """


def include_options():
    """
    Included from another file:

    .. include:: flavors_rst_include/include_2.md
       :start-line: 2
       :end-line: 5


    Also included:

    .. include:: flavors_rst_include/include_2.md
       :start-after: <!-- start here -->
       :end-before: <!-- end here -->
    """


def fields(foo: str = "foo", bar: bool = True) -> str:
    """This method has field descriptions.

    :param foo: A string,
        defaults to None
    :type foo: string, optional
    :param bar: Another
     boolean.
    :return: Another string,
        or maybe `None`.
    :rtype: A string.
    """
    raise NotImplementedError


def fields_text_after_param(foo):
    """This method has text after the `:param` fields.

    :param foo: Some text.

    Here's some more text.
    """


def fields_invalid(foo: str = "foo") -> str:
    """This method has invalid `:param` definitions.

    :param: What is this for?

    :unknown: This is an unknown field name.
    """
    raise NotImplementedError


def fields_exception():
    """
    :raises RuntimeError: Some multi-line
        exception description.
    """