Skip to content

Commit 398edf1

Browse files
committed
Updated docs.
1 parent 252e0dc commit 398edf1

File tree

3 files changed

+28
-9
lines changed

3 files changed

+28
-9
lines changed

doc-source/conf.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
'sphinxcontrib.toctree_plus',
5656
'seed_intersphinx_mapping',
5757
'sphinx.ext.autosectionlabel',
58-
'patched_autosummary',
5958
]
6059

6160
sphinxemoji_style = 'twemoji'
@@ -100,7 +99,21 @@
10099
man_pages = [('index', slug, project, [author], 1)]
101100
texinfo_documents = [('index', slug, project, author, slug, project, 'Miscellaneous')]
102101

103-
toctree_plus_types = {"class", "function", "method", "data"}
102+
toctree_plus_types = {
103+
"class",
104+
"function",
105+
"method",
106+
"data",
107+
"enum",
108+
"flag",
109+
"confval",
110+
"directive",
111+
"confval",
112+
"protocol",
113+
"typeddict",
114+
}
115+
116+
add_module_names = False
104117

105118

106119
autodoc_default_options = {

doc-source/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
autodocsumm>=0.2.0
2-
default_values>=0.0.10
2+
default_values>=0.0.11
33
domdf_sphinx_theme>=0.1.0
44
extras_require>=0.2.0
55
seed_intersphinx_mapping>=0.1.1
@@ -8,7 +8,7 @@ sphinx-copybutton>=0.2.12
88
sphinx-notfound-page>=0.5
99
sphinx-prompt>=1.1.0
1010
sphinx-tabs>=1.1.13
11-
sphinx-toolbox>=0.5.0
11+
sphinx-toolbox>=0.5.1
1212
sphinxcontrib-httpdomain>=1.7.0
1313
sphinxemoji>=0.1.6
1414
toctree_plus>=0.0.4

domdf_python_tools/typing.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
:data:`~.MethodWrapperType`, The type of *bound* methods of some built-in data types and base classes.
1616
:data:`~.MethodDescriptorType`, The type of methods of some built-in data types.
1717
:data:`~.ClassMethodDescriptorType`, The type of *unbound* class methods of some built-in data types.
18-
:data:`~.String`, :class:`~typing.Protocol` for classes that implement ``__str__``.
19-
:data:`~.HasHead`, :class:`typing.Protocol` for classes that have a ``head``.
2018
2119
"""
2220
#
@@ -186,18 +184,26 @@ def __str__(self) -> str:
186184
@runtime_checkable
187185
class HasHead(Protocol):
188186
"""
189-
:class:`typing.Protocol` for classes that have a ``head``.
187+
:class:`typing.Protocol` for classes that have a ``head`` method.
190188
191189
This includes :class:`pandas.DataFrame` and :class:`pandas.Series`.
192190
193191
.. versionadded:: 0.8.0
194192
"""
195193

196194
def head(self: "FrameOrSeries", n: int = 5) -> "FrameOrSeries":
197-
... # pragma: no cover
195+
"""
196+
Return the first n rows.
197+
198+
:param n: Number of rows to select.
199+
200+
:return: The first n rows of the caller object.
201+
"""
198202

199203
def to_string(self, *args, **kwargs) -> Optional[str]:
200-
... # pragma: no cover
204+
"""
205+
Render the object to a console-friendly tabular output.
206+
"""
201207

202208

203209
# class SupportsLessThan(Protocol):

0 commit comments

Comments
 (0)