Coverage for python3_module_template/subproject/myexample.py: 100%
6 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-03 02:15 +0200
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-03 02:15 +0200
1# -*- coding: utf-8 -*-
3"""
4@file
5@brief This the documentation of this module (myexampleb).
6"""
9class myclass:
11 """
12 This is the documentation for this class.
14 **example with a sphinx directives**
16 It works everywhere in the documentation.
18 .. exref::
19 :title: an example of use
21 Just for documentation purpose.
23 ::
25 m = myclass(0)
27 The old way:
29 @example(an old example of use)
31 This only works from the code,
32 not inserted in a RST file. The source
33 documentation is parsed and every such example is
34 collected and placed in a page ``all_examples.rst``
35 (look at the source).
37 @code
38 m = myclass(0)
39 @endcode
41 @endexample
43 **FAQ**
45 .. faqref::
46 :title: How to add a question ?
48 Just look a this section.
49 Look also :ref:`l-FAQ2`.
51 .. faqref::
52 :title: Add a label
53 :lid: label1
55 Look also :ref:`l-FAQ2`.
57 **BLOC**
59 .. blocref::
60 :title: How to add a bloc
61 :tag: aaaa
63 Just look a this bloc.
64 Look also :ref:`l-FAQ2`.
66 An accent, é, to check it is working.
68 A link to github source: :githublink:`source|py`.
69 """
71 def __init__(self, pa):
72 """
73 documentation for the constructor
74 @param pa first parameter
75 """
76 self.pa = pa
78 def get_value(self, mul):
79 """
80 returns the parameter multiplied by a value
81 @param mul a float
82 @return a float
83 """
84 return self.pa * mul