out.is_gettable = True
out.is_settable = True
out.is_deletable = True
+
+ # Call all scope enter hooks before rendering the docs
+ for hook in state.hooks_pre_scope:
+ hook(type=entry.type, path=entry.path)
+
# Unfortunately we can't get any docstring for these
out.summary, out.content = extract_docs(state, state.property_docs, entry.type, entry.path, '')
+
+ # Call all scope exit hooks after rendering the docs
+ for hook in state.hooks_post_scope:
+ hook(type=entry.type, path=entry.path)
+
out.has_details = bool(out.content)
# First try to get fully dereferenced type hints (with strings
<li>module <a href="content.docstring_summary.html" class="m-doc">docstring_summary</a> <span class="m-doc">This module retains summary from the docstring</span></li>
<li>module <a href="content.submodule.html" class="m-doc">submodule</a> <span class="m-doc">This submodule has an external summary.</span></li>
<li>class <a href="content.Class.html" class="m-doc">Class</a> <span class="m-doc">This overwrites the docstring for <a class="m-doc" href="content.Class.html">Class</a>.</span></li>
+ <li>class <a href="content.ClassWithSlots.html" class="m-doc">ClassWithSlots</a> <span class="m-doc">This class has slots and those have to be documented externally</span></li>
<li>class <a href="content.ClassWithSummary.html" class="m-doc">ClassWithSummary</a> <span class="m-doc">This class has summary from the docstring</span></li>
</ul>
</li>
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>content.ClassWithSlots | 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="content.html">content</a>.<wbr/></span>ClassWithSlots <span class="m-thin">class</span>
+ </h1>
+ <p>This class has slots and those have to be documented externally</p>
+ <div class="m-block m-default">
+ <h3>Contents</h3>
+ <ul>
+ <li>
+ Reference
+ <ul>
+ <li><a href="#properties">Properties</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <section id="properties">
+ <h2><a href="#properties">Properties</a></h2>
+ <dl class="m-doc">
+ <dt id="hello">
+ <a href="#hello" class="m-doc-self">hello</a> <span class="m-label m-flat m-success">get set del</span>
+ </dt>
+ <dd>This is a slot, another is <a class="m-doc" href="content.ClassWithSlots.html#this_is_a_slot">this_is_a_slot</a></dd>
+ <dt id="this_is_a_slot">
+ <a href="#this_is_a_slot" class="m-doc-self">this_is_a_slot</a> <span class="m-label m-flat m-success">get set del</span>
+ </dt>
+ <dd>This the <strong>other one</strong>.</dd>
+ </dl>
+ </section>
+ </div>
+ </div>
+ </div>
+</article></main>
+</body>
+</html>
<dl class="m-doc">
<dt>class <a href="content.Class.html" class="m-doc">Class</a></dt>
<dd>This overwrites the docstring for <a class="m-doc" href="content.Class.html">Class</a>.</dd>
+ <dt>class <a href="content.ClassWithSlots.html" class="m-doc">ClassWithSlots</a></dt>
+ <dd>This class has slots and those have to be documented externally</dd>
<dt>class <a href="content.ClassWithSummary.html" class="m-doc">ClassWithSummary</a></dt>
<dd>This class has summary from the docstring</dd>
</dl>
class ClassWithSummary:
"""This class has summary from the docstring"""
+class ClassWithSlots:
+ """This class has slots and those have to be documented externally"""
+
+ __slots__ = ['hello', 'this_is_a_slot']
+
class Enum(enum.Enum):
"""This summary gets ignored"""
This class has external details but summary from the docstring.
+.. py:property:: content.ClassWithSlots.hello
+ :summary: This is a slot, another is :ref:`this_is_a_slot`
+
+.. py:property:: content.ClassWithSlots.this_is_a_slot
+ :summary: This the **other one**.
+
.. py:enum:: content.Enum
:summary: This overwrites the docstring for :ref:`Enum`, but doesn't
add any detailed block.