File: inspect_attrs.MyClass.html

package info (click to toggle)
taskflow 3.9.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 45,948 kB
  • sloc: cpp: 39,058; xml: 35,572; python: 12,935; javascript: 1,732; makefile: 59; sh: 16
file content (132 lines) | stat: -rw-r--r-- 5,468 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
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>inspect_attrs.MyClass | My Python Project</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<header><nav id="navigation">
  <div class="m-container">
    <div class="m-row">
      <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
    </div>
  </div>
</nav></header>
<main><article>
  <div class="m-container m-container-inflatable">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        <h1>
          <span class="m-breadcrumb"><a href="inspect_attrs.html">inspect_attrs</a>.<wbr/></span>MyClass <span class="m-thin">class</span>
        </h1>
        <p>A class with attr-defined properties</p>
        <nav class="m-block m-default">
          <h3>Contents</h3>
          <ul>
            <li>
              Reference
              <ul>
                <li><a href="#dunder-methods">Special methods</a></li>
                <li><a href="#properties">Properties</a></li>
                <li><a href="#data">Data</a></li>
              </ul>
            </li>
          </ul>
        </nav>
        <section id="dunder-methods">
          <h2><a href="#dunder-methods">Special methods</a></h2>
          <dl class="m-doc">
            <dt>
              <span class="m-doc-wrap-bumper">def <a href="#__init__" class="m-doc">__init__</a>(</span><span class="m-doc-wrap">self,
              annotated: float,
              unannotated = 4,
              complex_annotation: typing.List[typing.Tuple[int, float]] = [],
              complex_annotation_in_attr: typing.List[typing.Tuple[int, float]] = [],
              hidden_property: float = 3) -&gt; None</span>
            </dt>
            <dd>External docs for the init</dd>
          </dl>
        </section>
        <section id="properties">
          <h2><a href="#properties">Properties</a></h2>
          <dl class="m-doc">
            <dt id="annotated">
              <a href="#annotated" class="m-doc-self">annotated</a>: float <span class="m-label m-flat m-success">get set del</span>
            </dt>
            <dd></dd>
            <dt id="complex_annotation">
              <a href="#complex_annotation" class="m-doc-self">complex_annotation</a>: typing.List[typing.Tuple[int, float]] <span class="m-label m-flat m-success">get set del</span>
            </dt>
            <dd></dd>
            <dt id="unannotated">
              <a href="#unannotated" class="m-doc-self">unannotated</a> <span class="m-label m-flat m-success">get set del</span>
            </dt>
            <dd>External docs for this property</dd>
            <dt id="complex_annotation_in_attr">
              <a href="#complex_annotation_in_attr" class="m-doc-self">complex_annotation_in_attr</a>: typing.List[typing.Tuple[int, float]] <span class="m-label m-flat m-success">get set del</span>
            </dt>
            <dd></dd>
          </dl>
        </section>
        <section id="data">
          <h2><a href="#data">Data</a></h2>
          <dl class="m-doc">
            <dt id="plain_data">
              <a href="#plain_data" class="m-doc-self">plain_data</a>: float = 35
            </dt>
            <dd>This is plain data, not handled by attrs</dd>
          </dl>
        </section>
        <section>
          <h2>Method documentation</h2>
          <section class="m-doc-details" id="__init__"><div>
            <h3>
              <span class="m-doc-wrap-bumper">def inspect_attrs.<wbr />MyClass.<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#__init__" class="m-doc-self">__init__</a>(</span><span class="m-doc-wrap">self,
              annotated: float,
              unannotated = 4,
              complex_annotation: typing.List[typing.Tuple[int, float]] = [],
              complex_annotation_in_attr: typing.List[typing.Tuple[int, float]] = [],
              hidden_property: float = 3) -&gt; None</span></span>
            </h3>
            <p>External docs for the init</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">annotated</td>
                  <td>The first argument</td>
                </tr>
                <tr>
                  <td>unannotated</td>
                  <td>This gets the default of four</td>
                </tr>
                <tr>
                  <td>complex_annotation</td>
                  <td>Yes, a list</td>
                </tr>
                <tr>
                  <td>complex_annotation_in_attr</td>
                  <td>Annotated using <code>attr.ib(type=)</code>,
should be shown as well</td>
                </tr>
                <tr>
                  <td>hidden_property</td>
                  <td>Interesting, but I don't care.</td>
                </tr>
              </tbody>
            </table>
<p>The <code>hidden_property</code> isn't shown in the output as it's prefixed with
an underscore.</p>
          </div></section>
        </section>
      </div>
    </div>
  </div>
</article></main>
</body>
</html>